Adjust share options view title depending on create mode

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-03-06 23:44:34 +08:00
Родитель 70cb2bd4c1
Коммит a7637257d5
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -11,6 +11,7 @@ import NextcloudKit
import OSLog
class ShareOptionsView: NSView {
@IBOutlet private weak var optionsTitleTextField: NSTextField!
@IBOutlet private weak var labelTextField: NSTextField!
@IBOutlet private weak var uploadEditPermissionCheckbox: NSButton!
@IBOutlet private weak var hideDownloadCheckbox: NSButton!
@ -35,6 +36,7 @@ class ShareOptionsView: NSView {
var controller: ShareController? {
didSet {
guard controller != nil else { return }
optionsTitleTextField.stringValue = "Share options"
cancellable?.cancel()
createMode = false
update()
@ -47,6 +49,7 @@ class ShareOptionsView: NSView {
shareTypePicker.isHidden = !createMode
labelTextField.isHidden = createMode // Cannot set label on create API call
guard createMode else { return }
optionsTitleTextField.stringValue = "Create new share"
cancellable?.cancel()
cancellable = nil
controller = nil

Просмотреть файл

@ -434,6 +434,7 @@
<outlet property="labelTextField" destination="CXW-ZO-B2f" id="otQ-jh-Psr"/>
<outlet property="noteForRecipientCheckbox" destination="c10-ub-U31" id="aG6-4P-cBv"/>
<outlet property="noteTextField" destination="io6-Kg-fLl" id="JKm-A1-SqR"/>
<outlet property="optionsTitleTextField" destination="AWy-Qo-wHH" id="BjX-oW-0Lp"/>
<outlet property="passwordProtectCheckbox" destination="ylD-hi-7Oq" id="qdw-aF-uh2"/>
<outlet property="passwordSecureField" destination="pkv-9L-nhv" id="992-i5-CPF"/>
<outlet property="publicLinkShareMenuItem" destination="JhA-rv-1xy" id="usv-L6-M7k"/>