Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp Settings Section: Complete Migration to Swift & SwiftUI #2826

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e891877
Added Navigation between NCSettings + NCMore
adityagi02 Mar 2, 2024
c10a33d
Added Settings screen UI
adityagi02 Mar 3, 2024
fffd8c9
Added common NCWebBrowserView + AcknowledgementsView
adityagi02 Mar 4, 2024
4ff2489
Added Settings ViewModel & connected with View
adityagi02 Mar 5, 2024
76f270c
Added AutoUpload UI
adityagi02 Mar 6, 2024
ecf6e7f
Updated AutoUpload UI
adityagi02 Mar 6, 2024
dfbe5d2
Added AutoUpload ViewModel + UI Integration
adityagi02 Mar 8, 2024
c754419
Added Advanced View UI
adityagi02 Mar 8, 2024
ad68d56
Added CCAdvancedViewModel + UI Integration
adityagi02 Mar 9, 2024
d9d8cda
Updated CCAdvanced ViewModel + View
adityagi02 Mar 10, 2024
6d3622b
Added ManageAutoUploadView
adityagi02 Mar 11, 2024
5ec0d91
Added AutoUploadFileNamesViewModel + UI Intetegration
adityagi02 Mar 12, 2024
b06e480
Added Protocols + Updated ViewModel & View Integration
adityagi02 Mar 17, 2024
f0e0bda
Added protocol for AutoUpload
adityagi02 Mar 17, 2024
019fbe4
Added & Updated protocols for Settings
adityagi02 Mar 17, 2024
f086183
Added protocol + Updated Settings ViewModels
adityagi02 Mar 17, 2024
33f330e
Updated Settings brand strings
adityagi02 Mar 17, 2024
bdaa216
Added Passcode View
adityagi02 Mar 28, 2024
a73f29a
Added Capabilities Navigation
adityagi02 Mar 29, 2024
55a222d
Added E2EE View + Auto Folder Upload Path
adityagi02 Apr 6, 2024
e0b7dfd
Added standard File Header
adityagi02 Apr 6, 2024
a36acb5
Added lockScreen toggle logic
adityagi02 Apr 7, 2024
1962dfb
Implemented UI update on account switch
adityagi02 Apr 7, 2024
094f60c
Updated project file
adityagi02 Apr 7, 2024
b7a3b19
Removed failing defaultViewModifier
adityagi02 Apr 7, 2024
8998532
Requested Changes Added
adityagi02 Apr 9, 2024
fda1a64
OpenSSL switched back to remote
adityagi02 Apr 11, 2024
89164bd
Merge branch 'develop' into settings-revamp
adityagi02 Apr 11, 2024
2028072
Added serverUrl in SelectView
adityagi02 Apr 12, 2024
5534689
Improved scene (#2875)
marinofaggiana Apr 12, 2024
343fc0b
fix
marinofaggiana Apr 12, 2024
e6a298a
Test fix
mpivchev Apr 12, 2024
0b8ec9c
Lint
marinofaggiana Apr 12, 2024
ed46c49
Merge branch 'develop' into settings-revamp
adityagi02 Apr 14, 2024
e51a268
Removed new DB instances
adityagi02 Apr 24, 2024
825d0dc
Resolved unwanted E2EE Api calls
adityagi02 Apr 24, 2024
fe5562f
Cleared out lint warnings
adityagi02 Apr 24, 2024
465b57f
Updated Localizable + WebVeiw Lint
adityagi02 Apr 25, 2024
4f2030c
Merge branch 'develop' of https://github.com/nextcloud/ios into pr/2826
mpivchev Apr 26, 2024
76e08ac
Updated ViewModel to model + Removed protocols
adityagi02 Apr 27, 2024
56f2e36
Updated Text font & Image color
adityagi02 Apr 27, 2024
fa54801
Removed XLForm/Obj-C legacy code
adityagi02 Apr 27, 2024
5586462
Removed background thread warning
adityagi02 May 3, 2024
879f6f6
Resolved reviewed code bugs
adityagi02 May 4, 2024
36e6e67
Fixed some minor bugs
adityagi02 May 4, 2024
f4f40ae
Removed unneccessary space string/ added buttons
adityagi02 May 6, 2024
13cb8c4
Merge
adityagi02 May 7, 2024
767cbcc
Added Dark Mode UI image color
adityagi02 May 7, 2024
e1e2ead
Merge branch 'develop'
adityagi02 May 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 47 additions & 27 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 60;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -16,6 +16,11 @@
371B5A2E23D0B04500FAFAE9 /* NCMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371B5A2D23D0B04500FAFAE9 /* NCMenu.swift */; };
3781B9B023DB2B7E006B4B1D /* AppDelegate+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3781B9AF23DB2B7E006B4B1D /* AppDelegate+Menu.swift */; };
8491B1CD273BBA82001C8C5B /* UIViewController+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8491B1CC273BBA82001C8C5B /* UIViewController+Menu.swift */; };
AC454FF72B9585FB00BED89C /* AcknowledgementsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC454FF62B9585FB00BED89C /* AcknowledgementsView.swift */; };
AC454FF92B958B6A00BED89C /* NCWebBrowserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC454FF82B958B6A00BED89C /* NCWebBrowserView.swift */; };
ACFC775B2B9368AA008BF302 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = ACFC775A2B9368AA008BF302 /* OpenSSL */; };
ACFC775D2B9368D3008BF302 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = ACFC775C2B9368D3008BF302 /* OpenSSL */; };
ACFC775F2B944B17008BF302 /* NCSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACFC775E2B944B17008BF302 /* NCSettings.swift */; };
AF1A9B6427D0CA1E00F17A9E /* UIAlertController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1A9B6327D0CA1E00F17A9E /* UIAlertController+Extension.swift */; };
AF1A9B6527D0CC0500F17A9E /* UIAlertController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1A9B6327D0CA1E00F17A9E /* UIAlertController+Extension.swift */; };
AF22B206277B4E4C00DAB0CC /* NCCreateFormUploadConflict.swift in Sources */ = {isa = PBXBuildFile; fileRef = F704B5E42430AA8000632F5F /* NCCreateFormUploadConflict.swift */; };
Expand Down Expand Up @@ -531,7 +536,6 @@
F771E3F820E239B500AFB62D /* FileProviderExtension+Thumbnail.swift in Sources */ = {isa = PBXBuildFile; fileRef = F771E3F520E239B400AFB62D /* FileProviderExtension+Thumbnail.swift */; };
F7725A60251F33BB00D125E0 /* NCFiles.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7725A5E251F33BB00D125E0 /* NCFiles.swift */; };
F7725A61251F33BB00D125E0 /* NCFiles.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7725A5F251F33BB00D125E0 /* NCFiles.storyboard */; };
F77333882927A72100466E35 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = F77333872927A72100466E35 /* OpenSSL */; };
F774264A22EB4D0000B23912 /* NCSearchUserDropDownCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F774264822EB4D0000B23912 /* NCSearchUserDropDownCell.xib */; };
F77444F522281649000D5EB0 /* NCGridMediaCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77444F322281649000D5EB0 /* NCGridMediaCell.swift */; };
F77444F622281649000D5EB0 /* NCGridMediaCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F77444F422281649000D5EB0 /* NCGridMediaCell.xib */; };
Expand All @@ -556,7 +560,6 @@
F77BC3ED293E528A005F2B08 /* NCConfigServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77BC3EC293E528A005F2B08 /* NCConfigServer.swift */; };
F77C97392953131000FDDD09 /* NCCameraRoll.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77C97382953131000FDDD09 /* NCCameraRoll.swift */; };
F77C973A2953143A00FDDD09 /* NCCameraRoll.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77C97382953131000FDDD09 /* NCCameraRoll.swift */; };
F77CB6A92AA08053000C3CA4 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = F77CB6A82AA08053000C3CA4 /* OpenSSL */; };
F77ED59128C9CE9D00E24ED0 /* ToolbarData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77ED59028C9CE9D00E24ED0 /* ToolbarData.swift */; };
F77ED59328C9CEA000E24ED0 /* ToolbarWidgetProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77ED59228C9CEA000E24ED0 /* ToolbarWidgetProvider.swift */; };
F77ED59528C9CEA400E24ED0 /* ToolbarWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77ED59428C9CEA300E24ED0 /* ToolbarWidgetView.swift */; };
Expand Down Expand Up @@ -920,6 +923,9 @@
371B5A3223D0BD5500FAFAE9 /* FloatingPanel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FloatingPanel.framework; path = Carthage/Build/iOS/FloatingPanel.framework; sourceTree = "<group>"; };
3781B9AF23DB2B7E006B4B1D /* AppDelegate+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Menu.swift"; sourceTree = "<group>"; };
8491B1CC273BBA82001C8C5B /* UIViewController+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Menu.swift"; sourceTree = "<group>"; };
AC454FF62B9585FB00BED89C /* AcknowledgementsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcknowledgementsView.swift; sourceTree = "<group>"; };
AC454FF82B958B6A00BED89C /* NCWebBrowserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCWebBrowserView.swift; sourceTree = "<group>"; };
ACFC775E2B944B17008BF302 /* NCSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCSettings.swift; sourceTree = "<group>"; };
AF1A9B6327D0CA1E00F17A9E /* UIAlertController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+Extension.swift"; sourceTree = "<group>"; };
AF22B20B277C6F4D00DAB0CC /* NCShareCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCShareCell.swift; sourceTree = "<group>"; };
AF22B215277D196700DAB0CC /* NCShareExtension+DataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NCShareExtension+DataSource.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1575,10 +1581,10 @@
F711A4EF2AF932B900095DD8 /* SVGKitSwift in Frameworks */,
F710FC80277B7D2700AA9FBF /* RealmSwift in Frameworks */,
F74C863D2AEFBFD9009A1D4A /* LRUCache in Frameworks */,
ACFC775D2B9368D3008BF302 /* OpenSSL in Frameworks */,
F72AD70F28C24BA1006CB92D /* NextcloudKit in Frameworks */,
F737DA992B7B864E0063BAFC /* TOPasscodeViewController.xcframework in Frameworks */,
F72CD01227A7E92400E59476 /* JGProgressHUD in Frameworks */,
F77CB6A92AA08053000C3CA4 /* OpenSSL in Frameworks */,
F760DE092AE66ED00027D78A /* KeychainAccess in Frameworks */,
F73ADD2126554F8E0069EA0D /* SwiftEntryKit in Frameworks */,
F7A560482AE15D5000BE8FD6 /* Queuer in Frameworks */,
Expand Down Expand Up @@ -1628,11 +1634,11 @@
F7BB7E4727A18C56009B9F29 /* Parchment in Frameworks */,
F734B06628E75C0100E180D5 /* TLPhotoPicker in Frameworks */,
F787AC09298BCB4A0001BB00 /* SVGKitSwift in Frameworks */,
ACFC775B2B9368AA008BF302 /* OpenSSL in Frameworks */,
F760DE032AE66EA80027D78A /* KeychainAccess in Frameworks */,
F770768E263A8C3400A1BA94 /* FloatingPanel in Frameworks */,
F710FC7C277B7D0000AA9FBF /* RealmSwift in Frameworks */,
F758A01227A7F03E0069468B /* JGProgressHUD in Frameworks */,
F77333882927A72100466E35 /* OpenSSL in Frameworks */,
F7792DE529EEE02D005930CE /* MobileVLCKit.xcframework in Frameworks */,
F753BA93281FD8020015BFB6 /* EasyTipView in Frameworks */,
F76DA95B277B75A90082465B /* TOPasscodeViewController.xcframework in Frameworks */,
Expand Down Expand Up @@ -1697,6 +1703,14 @@
path = Menu;
sourceTree = "<group>";
};
ACFC77602B944B1E008BF302 /* Settings */ = {
isa = PBXGroup;
children = (
ACFC775E2B944B17008BF302 /* NCSettings.swift */,
);
path = Settings;
sourceTree = "<group>";
};
AF8ED1FA2757821000B8DBC4 /* NextcloudUnitTests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -2324,6 +2338,9 @@
F7CB689F254169530050EC94 /* NCSettings.storyboard */,
F77910AA25DD53C700CEDB9E /* NCSettingsBundleHelper.swift */,
F77910A425DD517B00CEDB9E /* Settings.bundle */,
ACFC77602B944B1E008BF302 /* Settings */,
AC454FF62B9585FB00BED89C /* AcknowledgementsView.swift */,
AC454FF82B958B6A00BED89C /* NCWebBrowserView.swift */,
);
path = Settings;
sourceTree = "<group>";
Expand Down Expand Up @@ -2942,11 +2959,11 @@
F72AD70E28C24BA1006CB92D /* NextcloudKit */,
F70821D729E59E6D001CA2D7 /* TagListView */,
F7F623B62A5EFA0C0022D3D4 /* Gzip */,
F77CB6A82AA08053000C3CA4 /* OpenSSL */,
F7A560472AE15D5000BE8FD6 /* Queuer */,
F760DE082AE66ED00027D78A /* KeychainAccess */,
F74C863C2AEFBFD9009A1D4A /* LRUCache */,
F711A4EE2AF932B900095DD8 /* SVGKitSwift */,
ACFC775C2B9368D3008BF302 /* OpenSSL */,
);
productName = "Share Ext";
productReference = F7CE8AFB1DC1F8D8009CAE48 /* Share.appex */;
Expand Down Expand Up @@ -3044,7 +3061,6 @@
F753BA92281FD8020015BFB6 /* EasyTipView */,
F72AD70C28C24B93006CB92D /* NextcloudKit */,
F734B06528E75C0100E180D5 /* TLPhotoPicker */,
F77333872927A72100466E35 /* OpenSSL */,
F77BC3EA293E5268005F2B08 /* Swifter */,
F7D56B192972405500FA46C4 /* Mantis */,
F787AC08298BCB4A0001BB00 /* SVGKitSwift */,
Expand All @@ -3053,6 +3069,7 @@
F7F623B42A5EF4D30022D3D4 /* Gzip */,
F76B649D2ADFFDEC00014640 /* LRUCache */,
F760DE022AE66EA80027D78A /* KeychainAccess */,
ACFC775A2B9368AA008BF302 /* OpenSSL */,
);
productName = "Crypto Cloud";
productReference = F7CE8AFA1DC1F8D8009CAE48 /* Nextcloud.app */;
Expand Down Expand Up @@ -3086,8 +3103,9 @@
F7F67BA01A24D27800EE80DA /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1430;
LastUpgradeCheck = 1400;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "Marino Faggiana";
TargetAttributes = {
2C33C47E23E2C475005F963B = {
Expand Down Expand Up @@ -3219,7 +3237,6 @@
F753BA91281FD8010015BFB6 /* XCRemoteSwiftPackageReference "EasyTipView" */,
F783034028B511D200B84583 /* XCRemoteSwiftPackageReference "NextcloudKit" */,
F734B06428E75C0100E180D5 /* XCRemoteSwiftPackageReference "TLPhotoPicker" */,
F77333862927A72100466E35 /* XCRemoteSwiftPackageReference "OpenSSL" */,
F77BC3E9293E5268005F2B08 /* XCRemoteSwiftPackageReference "swifter" */,
F7D56B182972405400FA46C4 /* XCRemoteSwiftPackageReference "Mantis" */,
F7A1050C29E587AF00FFD92B /* XCRemoteSwiftPackageReference "TagListView" */,
Expand All @@ -3229,6 +3246,7 @@
F7F623B32A5EF4D30022D3D4 /* XCRemoteSwiftPackageReference "GzipSwift" */,
F76B649A2ADFFAD200014640 /* XCRemoteSwiftPackageReference "LRUCache" */,
F760DE012AE66E860027D78A /* XCRemoteSwiftPackageReference "KeychainAccess" */,
ACFC77592B9368AA008BF302 /* XCLocalSwiftPackageReference "../../../Downloads/OpenSSL-main" */,
);
productRefGroup = F7F67B9F1A24D27800EE80DA;
projectDirPath = "";
Expand Down Expand Up @@ -3978,6 +3996,7 @@
F7651A8B23A2A3F2001403D2 /* NCCreateFormUploadDocuments.swift in Sources */,
F74AF3A4247FB6AE00AC767B /* NCUtilityFileSystem.swift in Sources */,
F7239871253D86B600257F49 /* NCEmptyDataSet.swift in Sources */,
AC454FF92B958B6A00BED89C /* NCWebBrowserView.swift in Sources */,
AFCE353327E4ED1900FEA6C2 /* UIToolbar+Extension.swift in Sources */,
8491B1CD273BBA82001C8C5B /* UIViewController+Menu.swift in Sources */,
F73EF7BF2B02250B0087E6E9 /* NCManageDatabase+GPS.swift in Sources */,
Expand Down Expand Up @@ -4016,6 +4035,7 @@
F769CA192966EA3C00039397 /* ComponentView.swift in Sources */,
F7C9B91D2B582F550064EA91 /* NCManageDatabase+SecurityGuard.swift in Sources */,
AF93474C27E34120002537EE /* NCUtility+Image.swift in Sources */,
ACFC775F2B944B17008BF302 /* NCSettings.swift in Sources */,
F702F30125EE5D2C008F8E80 /* NYMnemonic.m in Sources */,
AF93474E27E3F212002537EE /* NCShareNewUserAddComment.swift in Sources */,
F7C30DFD291BD0B80017149B /* NCNetworkingE2EEDelete.swift in Sources */,
Expand Down Expand Up @@ -4066,6 +4086,7 @@
F760DE172AE66F350027D78A /* NCKeychain.swift in Sources */,
F7C9555521F0C5470024296E /* NCActivity.swift in Sources */,
F7725A60251F33BB00D125E0 /* NCFiles.swift in Sources */,
AC454FF72B9585FB00BED89C /* AcknowledgementsView.swift in Sources */,
F3BB46522A39EC4900461F6E /* NCMoreAppSuggestionsCell.swift in Sources */,
F704B5E52430AA8000632F5F /* NCCreateFormUploadConflict.swift in Sources */,
F765608F23BF813600765969 /* NCContentPresenter.swift in Sources */,
Expand Down Expand Up @@ -4997,6 +5018,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_TESTING_SEARCH_PATHS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -5061,6 +5083,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_TESTING_SEARCH_PATHS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
Expand Down Expand Up @@ -5205,6 +5228,13 @@
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
ACFC77592B9368AA008BF302 /* XCLocalSwiftPackageReference "../../../Downloads/OpenSSL-main" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = "../../../Downloads/OpenSSL-main";
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
F31F694B2A2F6EFA00162F76 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
isa = XCRemoteSwiftPackageReference;
Expand Down Expand Up @@ -5350,14 +5380,6 @@
minimumVersion = 2.0.0;
};
};
F77333862927A72100466E35 /* XCRemoteSwiftPackageReference "OpenSSL" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/krzyzanowskim/OpenSSL";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.0;
};
};
F77BC3E9293E5268005F2B08 /* XCRemoteSwiftPackageReference "swifter" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/httpswift/swifter.git";
Expand Down Expand Up @@ -5425,6 +5447,14 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
ACFC775A2B9368AA008BF302 /* OpenSSL */ = {
isa = XCSwiftPackageProductDependency;
productName = OpenSSL;
};
ACFC775C2B9368D3008BF302 /* OpenSSL */ = {
isa = XCSwiftPackageProductDependency;
productName = OpenSSL;
};
F3131EDC2B038E4A0018DB28 /* XLForm */ = {
isa = XCSwiftPackageProductDependency;
package = F74E771E277A2EF40013B958 /* XCRemoteSwiftPackageReference "XLForm" */;
Expand Down Expand Up @@ -5665,21 +5695,11 @@
package = F770768C263A8C3400A1BA94 /* XCRemoteSwiftPackageReference "FloatingPanel" */;
productName = FloatingPanel;
};
F77333872927A72100466E35 /* OpenSSL */ = {
isa = XCSwiftPackageProductDependency;
package = F77333862927A72100466E35 /* XCRemoteSwiftPackageReference "OpenSSL" */;
productName = OpenSSL;
};
F77BC3EA293E5268005F2B08 /* Swifter */ = {
isa = XCSwiftPackageProductDependency;
package = F77BC3E9293E5268005F2B08 /* XCRemoteSwiftPackageReference "swifter" */;
productName = Swifter;
};
F77CB6A82AA08053000C3CA4 /* OpenSSL */ = {
isa = XCSwiftPackageProductDependency;
package = F77333862927A72100466E35 /* XCRemoteSwiftPackageReference "OpenSSL" */;
productName = OpenSSL;
};
F783030C28B4C59A00B84583 /* SwiftEntryKit */ = {
isa = XCSwiftPackageProductDependency;
package = F73ADD1A265546880069EA0D /* XCRemoteSwiftPackageReference "SwiftEntryKit" */;
Expand Down
15 changes: 13 additions & 2 deletions iOSClient/More/NCMore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import UIKit
import NextcloudKit
import SafariServices
import SwiftUI

class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {

Expand Down Expand Up @@ -403,9 +404,19 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
tapImageLogoManageAccount()
return
}

// Checking if the selected row is the Settings cell
if item.name == "_settings_" {
// Created an instance of the NCSettings view
let ncSettingsView = NCSettings(enableTouchID: false, lockScreen: false, privacyScreen: false, resetWrongAttempts: false)

// Created a hosting controller for the NCSettings view & performing the segue
let hostingController = UIHostingController(rootView: ncSettingsView)
self.navigationController?.pushViewController(hostingController, animated: true)
}

// Action
if item.url.contains("segue") && !item.url.contains("//") {
// Action conditions
if item.url.contains("segue") && item.name != "_settings_" && !item.url.contains("//") {
self.navigationController?.performSegue(withIdentifier: item.url, sender: self)
} else if item.url.contains("openStoryboard") && !item.url.contains("//") {
let nameStoryboard = item.url.replacingOccurrences(of: "openStoryboard", with: "")
Expand Down
81 changes: 81 additions & 0 deletions iOSClient/Settings/AcknowledgementsView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
//
// AcknowledgementsView.swift
// Nextcloud
//
// Created by Aditya Tyagi on 04/03/24.
// Copyright © 2024 Marino Faggiana. All rights reserved.
//

import SwiftUI
import Combine

struct AcknowledgementsView: View {
@State private var text = ""
@Binding var showText: Bool
var browserTitle: String
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>

var body: some View {
VStack(spacing: 0) {
HStack() {

HStack(alignment: .center) {
Text(browserTitle)
.font(.title3)
.foregroundColor(Color(UIColor.label))
.padding(.leading, 8)
}
.padding()

Spacer()

Button(action: {
self.showText = false
}) {
ZStack {
Circle()
.fill(Color(UIColor.secondarySystemBackground))
.frame(width: 25, height: 25)

Image(systemName: "xmark")
.resizable()
.renderingMode(.template)
.frame(width: 14, height: 14)
.foregroundColor(.gray)
}
}
.padding()
}

Divider()

if showText {
ScrollView {
Text(text)
.padding()
}
}
}
.navigationBarTitle("_acknowledgements_", displayMode: .inline)
.onAppear {
loadRTF()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.showText = true
}
}
}

func loadRTF() {
if let rtfPath = Bundle.main.url(forResource: "Acknowledgements", withExtension: "rtf"),
let attributedStringWithRtf = try? NSAttributedString(url: rtfPath, options: [.documentType: NSAttributedString.DocumentType.rtf], documentAttributes: nil) {
self.text = attributedStringWithRtf.string
}
}
}


/*
#Preview {
AcknowledgementsView(showText: false)
}
*/
Loading