From 322ae529b75ed618d6ecf37dd077b1689210a401 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 28 Feb 2024 22:37:01 +0800 Subject: [PATCH] Add a ShareOptionsView class Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareOptionsView.swift | 22 +++++++++++++ .../FileProviderUIExt/ShareViewController.xib | 33 ++++++++++--------- .../project.pbxproj | 4 +++ 3 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift new file mode 100644 index 000000000..4ad2f2861 --- /dev/null +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift @@ -0,0 +1,22 @@ +// +// ShareOptionsView.swift +// FileProviderUIExt +// +// Created by Claudio Cambra on 28/2/24. +// + +import AppKit + +class ShareOptionsView: NSView { + @IBOutlet weak var labelTextField: NSTextField! + @IBOutlet weak var uploadEditPermissionCheckbox: NSButton! + @IBOutlet weak var hideDownloadCheckbox: NSButton! + @IBOutlet weak var passwordProtectCheckbox: NSButton! + @IBOutlet weak var passwordSecureField: NSSecureTextField! + @IBOutlet weak var expirationDateCheckbox: NSButton! + @IBOutlet weak var expirationDatePicker: NSDatePicker! + @IBOutlet weak var noteForRecipientCheckbox: NSButton! + @IBOutlet weak var noteTextField: NSTextField! + @IBOutlet weak var saveButton: NSButton! + @IBOutlet weak var deleteButton: NSButton! +} diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib index 27ffb97d4..938862bb6 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.xib @@ -158,7 +158,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -249,39 +249,27 @@ - - - @@ -335,6 +323,19 @@ Gw + + + + + + + + + + + + + diff --git a/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.pbxproj b/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.pbxproj index 0e4e2802c..eebc0fa41 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.pbxproj +++ b/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.pbxproj @@ -58,6 +58,7 @@ 53FE14592B8E3F6C006C4193 /* ShareTableItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FE14582B8E3F6C006C4193 /* ShareTableItemView.swift */; }; 53FE145B2B8F1305006C4193 /* NKShare+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FE145A2B8F1305006C4193 /* NKShare+Extensions.swift */; }; 53FE14652B8F6700006C4193 /* ShareViewDataSourceUIDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FE14642B8F6700006C4193 /* ShareViewDataSourceUIDelegate.swift */; }; + 53FE14672B8F78B6006C4193 /* ShareOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FE14662B8F78B6006C4193 /* ShareOptionsView.swift */; }; C2B573BA1B1CD91E00303B36 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573B91B1CD91E00303B36 /* main.m */; }; C2B573D21B1CD94B00303B36 /* main.m in Resources */ = {isa = PBXBuildFile; fileRef = C2B573B91B1CD91E00303B36 /* main.m */; }; C2B573DE1B1CD9CE00303B36 /* FinderSync.m in Sources */ = {isa = PBXBuildFile; fileRef = C2B573DD1B1CD9CE00303B36 /* FinderSync.m */; }; @@ -206,6 +207,7 @@ 53FE14582B8E3F6C006C4193 /* ShareTableItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareTableItemView.swift; sourceTree = ""; }; 53FE145A2B8F1305006C4193 /* NKShare+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NKShare+Extensions.swift"; sourceTree = ""; }; 53FE14642B8F6700006C4193 /* ShareViewDataSourceUIDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewDataSourceUIDelegate.swift; sourceTree = ""; }; + 53FE14662B8F78B6006C4193 /* ShareOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareOptionsView.swift; sourceTree = ""; }; C2B573B11B1CD91E00303B36 /* desktopclient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = desktopclient.app; sourceTree = BUILT_PRODUCTS_DIR; }; C2B573B51B1CD91E00303B36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C2B573B91B1CD91E00303B36 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -359,6 +361,7 @@ children = ( 5376307B2B85E2E00026BFAB /* Extensions */, 53B979802B84C81F002DA742 /* DocumentActionViewController.swift */, + 53FE14662B8F78B6006C4193 /* ShareOptionsView.swift */, 53FE14582B8E3F6C006C4193 /* ShareTableItemView.swift */, 531522812B8E01C6002E31BE /* ShareTableItemView.xib */, 53FE144F2B8E0658006C4193 /* ShareTableViewDataSource.swift */, @@ -735,6 +738,7 @@ buildActionMask = 2147483647; files = ( 537630932B85F4B00026BFAB /* ShareViewController.swift in Sources */, + 53FE14672B8F78B6006C4193 /* ShareOptionsView.swift in Sources */, 53FE14652B8F6700006C4193 /* ShareViewDataSourceUIDelegate.swift in Sources */, 53B979812B84C81F002DA742 /* DocumentActionViewController.swift in Sources */, 53FE145B2B8F1305006C4193 /* NKShare+Extensions.swift in Sources */,