Browse Source

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
94d2fd7ef3

+ 0 - 2
Nextcloud.xcodeproj/project.pbxproj

@@ -828,7 +828,6 @@
 		F75C0C4723D1FAE300163CC8 /* NCRichWorkspaceCommon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCRichWorkspaceCommon.swift; sourceTree = "<group>"; };
 		F75D19E225EFE09000D74598 /* NCTrash+Menu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NCTrash+Menu.swift"; sourceTree = "<group>"; };
 		F75DD768290ABB25002EB562 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/Intent.intentdefinition; sourceTree = "<group>"; };
-		F75DD76B290ABB2F002EB562 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Intent.strings; sourceTree = "<group>"; };
 		F75EDFBC1E8C112F00E6F369 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; };
 		F75EDFBE1E8C116D00E6F369 /* libstdc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.tbd"; path = "usr/lib/libstdc++.tbd"; sourceTree = SDKROOT; };
 		F760329D252F0F8E0015A421 /* NCTransferCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NCTransferCell.swift; path = iOSClient/Transfers/NCTransferCell.swift; sourceTree = SOURCE_ROOT; };
@@ -3157,7 +3156,6 @@
 			isa = PBXVariantGroup;
 			children = (
 				F75DD768290ABB25002EB562 /* Base */,
-				F75DD76B290ABB2F002EB562 /* en */,
 			);
 			name = Intent.intentdefinition;
 			sourceTree = "<group>";

+ 6 - 3
Widget/Dashboard/DashboardData.swift

@@ -152,7 +152,7 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis
     }
     let titleImage = imagetmp
         
-    NextcloudKit.shared.getDashboardWidgetsApplication(id, options: options) { account, results, data, error in
+    NextcloudKit.shared.getDashboardWidgetsApplication(id, options: options) { _, results, data, error in
 
         Task {
             var datas = [DashboardData]()
@@ -232,12 +232,15 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis
                 buttons = tableButton.filter(({ $0.type != "more" }))
             }
 
+            let alias = (account.alias.isEmpty) ? "" : (" (" + account.alias + ")")
+            let footerText = "Dashboard " + NSLocalizedString("_of_", comment: "") +  " " + account.displayName + alias
+
             if error != .success {
                 completion(DashboardDataEntry(date: Date(), datas: datasPlaceholder, dashboard: tableDashboard, buttons: buttons, isPlaceholder: true, isEmpty: false, titleImage: titleImage, title: title, footerImage: "xmark.icloud", footerText: error.errorDescription))
             } else if datas.isEmpty {
-                completion(DashboardDataEntry(date: Date(), datas: datasPlaceholder, dashboard: tableDashboard, buttons: buttons, isPlaceholder: false, isEmpty: true, titleImage: titleImage, title: title, footerImage: "checkmark.icloud", footerText: NSLocalizedString("_no_data_available_", comment: "")))
+                completion(DashboardDataEntry(date: Date(), datas: datasPlaceholder, dashboard: tableDashboard, buttons: buttons, isPlaceholder: false, isEmpty: true, titleImage: titleImage, title: title, footerImage: "checkmark.icloud", footerText: footerText))
             } else {
-                completion(DashboardDataEntry(date: Date(), datas: datas, dashboard: tableDashboard, buttons: buttons, isPlaceholder: false, isEmpty: false, titleImage: titleImage, title: title, footerImage: "checkmark.icloud", footerText: NCBrandOptions.shared.brand + " dashboard"))
+                completion(DashboardDataEntry(date: Date(), datas: datas, dashboard: tableDashboard, buttons: buttons, isPlaceholder: false, isEmpty: false, titleImage: titleImage, title: title, footerImage: "checkmark.icloud", footerText: footerText))
             }
         }
     }

+ 0 - 30
Widget/Intent/en.lproj/Intent.strings

@@ -1,30 +0,0 @@
-"13zjVT" = "Account";
-
-"296XDb" = "There are ${count} options matching ‘${Accounts}’.";
-
-"Am6y6p" = "Just to confirm, you wanted ‘${Applications}’?";
-
-"CAIVXf" = "Applications";
-
-"DN8Bxl" = "Account";
-
-"LIw8E9" = "Widget";
-
-"NO1rJU" = "Dashboard";
-
-"ObH8NN" = "There are ${count} options matching ‘${Accounts}’.";
-
-"TVGjNQ" = "Just to confirm, you wanted ‘${Accounts}’?";
-
-"V3exc2" = "Account";
-
-"VfbA9C" = "Account";
-
-"XjFf0X" = "There are ${count} options matching ‘${Applications}’.";
-
-"ZgvlYN" = "Dashboard Widget";
-
-"q5lvSu" = "Just to confirm, you wanted ‘${Accounts}’?";
-
-"tAlZ1R" = "Accounts";
-