Jelajahi Sumber

fix XCode 14

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 tahun lalu
induk
melakukan
570264e2f2

+ 2 - 2
Widget/Files/FilesWidgetView.swift

@@ -97,7 +97,7 @@ struct FilesWidgetView: View {
                     let brandTextColor = Color(NCBrandColor.shared.brandText)
                     
                     Link(destination: entry.isPlaceholder ? NCGlobal.shared.widgetActionNoAction : NCGlobal.shared.widgetActionUploadAsset, label: {
-                        Image("buttonAddImage")
+                        Image("addImage")
                             .resizable()
                             .renderingMode(.template)
                             .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)
@@ -109,7 +109,7 @@ struct FilesWidgetView: View {
                     })
 
                     Link(destination: entry.isPlaceholder ? NCGlobal.shared.widgetActionNoAction : NCGlobal.shared.widgetActionScanDocument, label: {
-                        Image("buttonAddScan")
+                        Image("scan")
                             .resizable()
                             .renderingMode(.template)
                             .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)

+ 2 - 2
Widget/Toolbar/ToolbarWidgetView.swift

@@ -46,7 +46,7 @@ struct ToolbarWidgetView: View {
                     let brandTextColor = Color(NCBrandColor.shared.brandText)
 
                     Link(destination: entry.isPlaceholder ? NCGlobal.shared.widgetActionNoAction : NCGlobal.shared.widgetActionUploadAsset, label: {
-                        Image("buttonAddImage")
+                        Image("addImage")
                             .resizable()
                             .renderingMode(.template)
                             .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)
@@ -58,7 +58,7 @@ struct ToolbarWidgetView: View {
                     })
 
                     Link(destination: entry.isPlaceholder ? NCGlobal.shared.widgetActionNoAction : NCGlobal.shared.widgetActionScanDocument, label: {
-                        Image("buttonAddScan")
+                        Image("scan")
                             .resizable()
                             .renderingMode(.template)
                             .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)

+ 4 - 1
iOSClient/Images.xcassets/buttonAddImage.imageset/Contents.json → iOSClient/Images.xcassets/addImage.imageset/Contents.json

@@ -1,12 +1,15 @@
 {
   "images" : [
     {
-      "filename" : "icons8-image.svg",
+      "filename" : "icons8-aggiungi-immagine.svg",
       "idiom" : "universal"
     }
   ],
   "info" : {
     "author" : "xcode",
     "version" : 1
+  },
+  "properties" : {
+    "preserves-vector-representation" : true
   }
 }

+ 1 - 0
iOSClient/Images.xcassets/addImage.imageset/icons8-aggiungi-immagine.svg

@@ -0,0 +1 @@
+<svg fill="#000000" xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 64 64" width="96px" height="96px"><path d="M 11 12 C 8.791 12 7 13.791 7 16 L 7 48 C 7 50.209 8.791 52 11 52 L 38.050781 52 C 38.024781 51.669 38 51.338 38 51 C 38 49.966 38.134281 48.965 38.363281 48 C 39.570281 42.918 43.761469 38.992828 48.980469 38.173828 L 44.224609 33.800781 C 42.307609 32.038781 39.361219 32.042594 37.449219 33.808594 L 29.085938 41.53125 L 24.505859 37.613281 C 22.628859 36.009281 19.863187 36.014953 17.992188 37.626953 L 11 43.650391 L 11 17 C 11 16.448 11.448 16 12 16 L 52 16 C 52.552 16 53 16.448 53 17 L 53 38.169922 C 54.422 38.390922 55.769 38.834516 57 39.478516 L 57 16 C 57 13.791 55.209 12 53 12 L 11 12 z M 23 20 C 20.791 20 19 21.791 19 24 C 19 26.209 20.791 28 23 28 C 25.209 28 27 26.209 27 24 C 27 21.791 25.209 20 23 20 z M 51 41 C 45.477 41 41 45.477 41 51 C 41 56.523 45.477 61 51 61 C 56.523 61 61 56.523 61 51 C 61 45.477 56.523 41 51 41 z M 51 45 C 51.553 45 52 45.448 52 46 L 52 50 L 56 50 C 56.553 50 57 50.448 57 51 C 57 51.552 56.553 52 56 52 L 52 52 L 52 56 C 52 56.552 51.553 57 51 57 C 50.447 57 50 56.552 50 56 L 50 52 L 46 52 C 45.447 52 45 51.552 45 51 C 45 50.448 45.447 50 46 50 L 50 50 L 50 46 C 50 45.448 50.447 45 51 45 z"/></svg>

+ 0 - 4
iOSClient/Images.xcassets/buttonAddImage.imageset/icons8-image.svg

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg fill="#000000" viewBox="0 0 512 512" width="512px" height="512px" xmlns="http://www.w3.org/2000/svg">
-  <path d="M 40 30 A 40.045 40.045 0 0 0 0 70 L 0 334.91211 A 40.121 40.121 0 0 0 40 375 L 240.32617 375 C 254.22017 436 309.08489 482.04492 374.46289 482.04492 C 450.30189 482.04492 512.16211 420.32337 512.16211 344.48438 C 512.16111 304.09238 494 267.69281 467 242.50781 L 467 70 C 467 47.944 448.73373 30 426.67773 30 L 40 30 z M 40 50 L 426.67773 50 A 20.3 20.3 0 0 1 447 70 L 447 227.45703 A 137.255 137.255 0 0 0 374.62305 206.92383 A 138.761 138.761 0 0 0 351.53906 208.85742 A 61.651 61.651 0 0 0 280.14453 213.59961 L 209.92383 272.19922 A 41.068 41.068 0 0 1 163.57227 276.37695 L 20 195.92383 L 20 70 A 20.024 20.024 0 0 1 40 50 z M 166.64648 80.462891 C 130.66548 80.462891 101.39258 108.64516 101.39258 143.28516 C 101.39258 177.92516 130.66548 206.10742 166.64648 206.10742 C 202.62748 206.10742 231.90039 177.92516 231.90039 143.28516 C 231.90039 108.64516 202.62748 80.462891 166.64648 80.462891 z M 166.64648 100.46289 C 191.59948 100.46289 211.90039 119.67316 211.90039 143.28516 C 211.90039 166.89716 191.60048 186.10742 166.64648 186.10742 C 141.69248 186.10742 121.39258 166.89716 121.39258 143.28516 C 121.39258 119.67316 141.69348 100.46289 166.64648 100.46289 z M 20 218.84961 L 153.80078 293.83203 A 60.969 60.969 0 0 0 222.66211 287.59961 L 292.86133 228.99805 A 41.216 41.216 0 0 1 316.54883 219.72852 A 137.781 137.781 0 0 0 236.91992 344.50586 C 236.91992 348.02086 237.05431 351 237.32031 355 L 40 355 A 20.1 20.1 0 0 1 20 334.91211 L 20 218.84961 z M 369.57227 227.02344 A 117.539 117.539 0 0 1 492 344.46289 A 117.672 117.672 0 0 1 374.46289 462 A 117.539 117.539 0 0 1 369.57227 227.02344 z M 374.69727 288.78516 A 10 10 0 0 0 368.03906 291.59961 L 329.89062 328.57617 A 10.000059 10.000059 0 1 0 343.81055 342.9375 L 365 322.40039 L 365 391.2207 A 10 10 0 0 0 385 391.2207 L 385 322.40039 L 406.18945 342.9375 A 10.000059 10.000059 0 0 0 420.10938 328.57617 L 381.96094 291.59961 A 10 10 0 0 0 374.69727 288.78516 z" style="fill: rgb(255, 255, 255);"/>
-</svg>

+ 0 - 4
iOSClient/Images.xcassets/buttonAddScan.imageset/icons8-scan.svg

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg fill="#000000" viewBox="0 0 24 24" width="384px" height="384px" xmlns="http://www.w3.org/2000/svg">
-  <path d="M 4 1.25 C 2.481 1.25 1.25 2.481 1.25 4 L 1.25 8 C 1.25 8.414 1.586 8.75 2 8.75 C 2.414 8.75 2.75 8.414 2.75 8 L 2.75 4 C 2.75 3.31 3.31 2.75 4 2.75 L 8 2.75 C 8.414 2.75 8.75 2.414 8.75 2 C 8.75 1.586 8.414 1.25 8 1.25 L 4 1.25 z M 16 1.25 C 15.586 1.25 15.25 1.586 15.25 2 C 15.25 2.414 15.586 2.75 16 2.75 L 20 2.75 C 20.69 2.75 21.25 3.31 21.25 4 L 21.25 8 C 21.25 8.414 21.586 8.75 22 8.75 C 22.414 8.75 22.75 8.414 22.75 8 L 22.75 4 C 22.75 2.481 21.519 1.25 20 1.25 L 16 1.25 z M 8 5.25 C 7.536 5.25 7.0916719 5.4346719 6.7636719 5.7636719 C 6.4346719 6.0916719 6.25 6.536 6.25 7 L 6.25 17 C 6.25 17.966 7.033 18.75 8 18.75 L 16 18.75 C 16.967 18.75 17.75 17.966 17.75 17 L 17.75 10.414062 C 17.75 9.9500625 17.565328 9.5057344 17.236328 9.1777344 C 16.497328 8.4377344 14.562266 6.5026719 13.822266 5.7636719 C 13.494266 5.4346719 13.049938 5.25 12.585938 5.25 L 8 5.25 z M 8 6.75 L 12.25 6.75 L 12.25 9 C 12.25 9.464 12.434672 9.9083281 12.763672 10.236328 C 13.091672 10.565328 13.536 10.75 14 10.75 L 16.25 10.75 L 16.25 17 C 16.25 17.138 16.138 17.25 16 17.25 L 8 17.25 C 7.862 17.25 7.75 17.138 7.75 17 L 7.75 7 C 7.75 6.934 7.7752656 6.8692656 7.8222656 6.8222656 C 7.8692656 6.7752656 7.934 6.75 8 6.75 z M 13.75 7.8085938 L 15.191406 9.25 L 14 9.25 C 13.934 9.25 13.869266 9.2247344 13.822266 9.1777344 C 13.775266 9.1307344 13.75 9.066 13.75 9 L 13.75 7.8085938 z M 2 15.25 C 1.586 15.25 1.25 15.586 1.25 16 L 1.25 20 C 1.25 21.519 2.481 22.75 4 22.75 L 8 22.75 C 8.414 22.75 8.75 22.414 8.75 22 C 8.75 21.586 8.414 21.25 8 21.25 L 4 21.25 C 3.31 21.25 2.75 20.69 2.75 20 L 2.75 16 C 2.75 15.586 2.414 15.25 2 15.25 z M 22 15.25 C 21.586 15.25 21.25 15.586 21.25 16 L 21.25 20 C 21.25 20.69 20.69 21.25 20 21.25 L 16 21.25 C 15.586 21.25 15.25 21.586 15.25 22 C 15.25 22.414 15.586 22.75 16 22.75 L 20 22.75 C 21.519 22.75 22.75 21.519 22.75 20 L 22.75 16 C 22.75 15.586 22.414 15.25 22 15.25 z" style="fill: rgb(255, 255, 255);"/>
-</svg>

+ 3 - 0
iOSClient/Images.xcassets/buttonAddScan.imageset/Contents.json → iOSClient/Images.xcassets/scan.imageset/Contents.json

@@ -8,5 +8,8 @@
   "info" : {
     "author" : "xcode",
     "version" : 1
+  },
+  "properties" : {
+    "preserves-vector-representation" : true
   }
 }

+ 1 - 0
iOSClient/Images.xcassets/scan.imageset/icons8-scan.svg

@@ -0,0 +1 @@
+<svg fill="#000000" xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 24 24" width="24px" height="24px"><path d="M 2,5 C 2,3.34 3.34,2 5,2 H 7.5 V 4 H 5 C 4.44,4 4,4.44 4,5 V 7.5 H 2 Z M 19,4 H 16.5 V 2 H 19 c 1.65,0 3,1.34 3,3 V 7.5 H 20 V 5 C 20,4.44 19.55,4 19,4 Z M 4,16.5 V 19 c 0,0.55 0.44,1 1,1 h 2.5 v 2 H 5 C 3.34,22 2,20.65 2,19 V 16.5 Z M 20,19 v -2.5 h 2 V 19 c 0,1.65 -1.35,3 -3,3 H 16.5 V 20 H 19 c 0.55,0 1,-0.45 1,-1 z M 17,13 H 7 v -2 h 10 z"/></svg>

+ 1 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -1680,7 +1680,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
 
                 header.delegate = self
                 if headerMenuButtonsCommand && !appDelegate.isSearchingMode {
-                    header.setButtonsCommand(heigt: NCGlobal.shared.heightButtonsCommand, imageButton1: UIImage(named: "buttonAddImage"), titleButton1: NSLocalizedString("_upload_", comment: ""), imageButton2: UIImage(named: "buttonAddFolder"), titleButton2: NSLocalizedString("_folder_", comment: ""), imageButton3: UIImage(named: "buttonAddScan"), titleButton3: NSLocalizedString("_scan_", comment: ""))
+                    header.setButtonsCommand(heigt: NCGlobal.shared.heightButtonsCommand, imageButton1: UIImage(named: "addImage"), titleButton1: NSLocalizedString("_upload_", comment: ""), imageButton2: UIImage(named: "buttonAddFolder"), titleButton2: NSLocalizedString("_folder_", comment: ""), imageButton3: UIImage(named: "scan"), titleButton3: NSLocalizedString("_scan_", comment: ""))
                 } else {
                     header.setButtonsCommand(heigt: 0)
                 }

+ 1 - 1
iOSClient/Menu/AppDelegate+Menu.swift

@@ -85,7 +85,7 @@ extension AppDelegate {
         if #available(iOS 13.0, *) {
             actions.append(
                 NCMenuAction(
-                    title: NSLocalizedString("_scans_document_", comment: ""), icon: NCUtility.shared.loadImage(named: "buttonAddScan"), action: { _ in
+                    title: NSLocalizedString("_scans_document_", comment: ""), icon: NCUtility.shared.loadImage(named: "scan"), action: { _ in
                         if let viewController = appDelegate.window?.rootViewController {
                             NCCreateScanDocument.shared.openScannerDocument(viewController: viewController)
                         }

+ 1 - 1
iOSClient/More/NCMore.swift

@@ -144,7 +144,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         if #available(iOS 13.0, *) {
             item = NKExternalSite()
             item.name = "_scanned_images_"
-            item.icon = "buttonAddScan"
+            item.icon = "scan"
             item.url = "openStoryboardNCScan"
             functionMenu.append(item)
         }