Browse Source

Improved code

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

+ 6 - 21
iOSClient/Main/Create cloud/NCUploadScanDocument.swift

@@ -45,6 +45,7 @@ struct NCUploadScanDocumentTest: View {
             VStack {
             VStack {
                 List {
                 List {
                     Section(header: Text(NSLocalizedString("_save_path_", comment: ""))) {
                     Section(header: Text(NSLocalizedString("_save_path_", comment: ""))) {
+
                         HStack {
                         HStack {
                             Label {
                             Label {
                                 Text("/")
                                 Text("/")
@@ -66,6 +67,7 @@ struct NCUploadScanDocumentTest: View {
                     }
                     }
 
 
                     Section(header: Text(NSLocalizedString("_quality_image_title_", comment: ""))) {
                     Section(header: Text(NSLocalizedString("_quality_image_title_", comment: ""))) {
+
                         VStack {
                         VStack {
                             Text("Current slider value")
                             Text("Current slider value")
                             Slider(value: $currentValue, in: 0...3, step: 1) { didChange in
                             Slider(value: $currentValue, in: 0...3, step: 1) { didChange in
@@ -76,18 +78,15 @@ struct NCUploadScanDocumentTest: View {
                     }
                     }
 
 
                     Section(header: Text(NSLocalizedString("_preview_", comment: ""))) {
                     Section(header: Text(NSLocalizedString("_preview_", comment: ""))) {
+
                         PDFKitRepresentedView(urlPreviewFile)
                         PDFKitRepresentedView(urlPreviewFile)
                             .frame(width: .infinity, height: geo.size.height / 4)
                             .frame(width: .infinity, height: geo.size.height / 4)
                     }
                     }
 
 
                     Section(header: Text(NSLocalizedString("_file_creation_", comment: ""))) {
                     Section(header: Text(NSLocalizedString("_file_creation_", comment: ""))) {
+
                         HStack {
                         HStack {
                             Group {
                             Group {
-                                Image(systemName: "ellipsis.rectangle")
-                                    .resizable()
-                                    .scaledToFit()
-                                    .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
-                                    .foregroundColor(Color(NCBrandColor.shared.brand))
                                 Text(NSLocalizedString("_password_", comment: ""))
                                 Text(NSLocalizedString("_password_", comment: ""))
                                 if isSecured {
                                 if isSecured {
                                     SecureField(NSLocalizedString("_enter_password_", comment: ""), text: $password)
                                     SecureField(NSLocalizedString("_enter_password_", comment: ""), text: $password)
@@ -106,27 +105,13 @@ struct NCUploadScanDocumentTest: View {
                         }
                         }
 
 
                         HStack {
                         HStack {
-                            Image(systemName: "text.viewfinder")
-                                .resizable()
-                                .scaledToFit()
-                                .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
-                                .foregroundColor(Color(NCBrandColor.shared.brand))
                             Toggle(NSLocalizedString("_text_recognition_", comment: ""), isOn: $isTextRecognition)
                             Toggle(NSLocalizedString("_text_recognition_", comment: ""), isOn: $isTextRecognition)
                                 .toggleStyle(SwitchToggleStyle(tint: Color(NCBrandColor.shared.brand)))
                                 .toggleStyle(SwitchToggleStyle(tint: Color(NCBrandColor.shared.brand)))
                         }
                         }
 
 
                         HStack {
                         HStack {
-                            Label {
-                                Text(NSLocalizedString("_filename_", comment: ""))
-                            } icon: {
-                                Image(systemName: "character.textbox")
-                                    .renderingMode(.template)
-                                    .resizable()
-                                    .scaledToFit()
-                                    .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
-                                    .foregroundColor(Color(NCBrandColor.shared.brand))
-                            }
-                            TextField(NSLocalizedString("_enter_password_", comment: ""), text: $password)
+                            Text(NSLocalizedString("_filename_", comment: ""))
+                            TextField(NSLocalizedString("_enter_filename_", comment: ""), text: $password)
                                 .multilineTextAlignment(.trailing)
                                 .multilineTextAlignment(.trailing)
                         }
                         }
                     }
                     }

+ 1 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -673,6 +673,7 @@
 "_use_folder_auto_upload_"          = "Use the \"Auto upload\" folder as destination";
 "_use_folder_auto_upload_"          = "Use the \"Auto upload\" folder as destination";
 "_rename_filename_"                 = "Rename";
 "_rename_filename_"                 = "Rename";
 "_filename_"                        = "Filename";
 "_filename_"                        = "Filename";
+"_enter_filename_"                  = "Enter filename";
 "_preview_filename_"                = "Example preview of filename. You can use the mask %@ for date/time";
 "_preview_filename_"                = "Example preview of filename. You can use the mask %@ for date/time";
 "_forbidden_characters_"            = "Invalid character in filename";
 "_forbidden_characters_"            = "Invalid character in filename";
 "_add_filenametype_"                = "Specify type in filename";
 "_add_filenametype_"                = "Specify type in filename";