Przeglądaj źródła

Enable meeting URL input field

Replace the static placeholder label with an editable text field in the Join with URL section.

Made-with: Cursor
huzaifahayat12 2 tygodni temu
rodzic
commit
745b682a2c
1 zmienionych plików z 14 dodań i 5 usunięć
  1. 14 5
      meetings_app/ViewController.swift

+ 14 - 5
meetings_app/ViewController.swift

@@ -485,9 +485,17 @@ private extension ViewController {
485 485
         textFieldContainer.heightAnchor.constraint(equalToConstant: 40).isActive = true
486 486
         styleSurface(textFieldContainer, borderColor: palette.inputBorder, borderWidth: 1, shadow: false)
487 487
 
488
-        let placeholder = textLabel("Enter meeting URL...", font: typography.inputPlaceholder, color: palette.textMuted)
489
-        placeholder.translatesAutoresizingMaskIntoConstraints = false
490
-        textFieldContainer.addSubview(placeholder)
488
+        let urlField = NSTextField(string: "")
489
+        urlField.translatesAutoresizingMaskIntoConstraints = false
490
+        urlField.isEditable = true
491
+        urlField.isSelectable = true
492
+        urlField.isBordered = false
493
+        urlField.drawsBackground = false
494
+        urlField.placeholderString = "Enter meeting URL..."
495
+        urlField.font = typography.inputPlaceholder
496
+        urlField.textColor = palette.textPrimary
497
+        urlField.focusRingType = .none
498
+        textFieldContainer.addSubview(urlField)
491 499
 
492 500
         let actions = NSStackView()
493 501
         actions.orientation = .horizontal
@@ -511,8 +519,9 @@ private extension ViewController {
511 519
             textFieldContainer.trailingAnchor.constraint(equalTo: wrapper.trailingAnchor),
512 520
             textFieldContainer.topAnchor.constraint(equalTo: title.bottomAnchor, constant: 10),
513 521
 
514
-            placeholder.leadingAnchor.constraint(equalTo: textFieldContainer.leadingAnchor, constant: 12),
515
-            placeholder.centerYAnchor.constraint(equalTo: textFieldContainer.centerYAnchor),
522
+            urlField.leadingAnchor.constraint(equalTo: textFieldContainer.leadingAnchor, constant: 12),
523
+            urlField.trailingAnchor.constraint(equalTo: textFieldContainer.trailingAnchor, constant: -12),
524
+            urlField.centerYAnchor.constraint(equalTo: textFieldContainer.centerYAnchor),
516 525
 
517 526
             actions.trailingAnchor.constraint(equalTo: wrapper.trailingAnchor),
518 527
             actions.topAnchor.constraint(equalTo: textFieldContainer.bottomAnchor, constant: 14),