Browse Source

create text file

Marino Faggiana 7 years ago
parent
commit
42565f4157

+ 9 - 8
iOSClient/CCGlobal.h

@@ -60,14 +60,15 @@ extern NSString *const urlBaseUploadDB;
 #define k_returnCreateFolderEncrypted                   3
 #define k_returnCreateFotoVideoEncrypted                4
 #define k_returnCreateFileEncrypted                     5
-#define k_returnCartaDiCredito                          6
-#define k_returnBancomat                                7
-#define k_returnContoCorrente                           8
-#define k_returnAccountWeb                              9
-#define k_returnNote                                    10
-#define k_returnPatenteGuida                            11
-#define k_returnCartaIdentita                           12
-#define k_returnPassaporto                              13
+#define k_returnCreateFileText                          6
+#define k_returnCartaDiCredito                          7
+#define k_returnBancomat                                8
+#define k_returnContoCorrente                           9
+#define k_returnAccountWeb                              10
+#define k_returnNote                                    11
+#define k_returnPatenteGuida                            12
+#define k_returnCartaIdentita                           13
+#define k_returnPassaporto                              14
 
 // Name Default DB
 #define k_databaseDefault                               @"nextcloud.realm"

+ 4 - 0
iOSClient/Create/CCCreateCloud.swift

@@ -79,6 +79,10 @@ class CreateMenuAdd: NSObject {
             appDelegate.activeMain.returnCreate(Int(k_returnCreateFilePlain))
         })
         
+        actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_text_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "file_txt"), color: colorIcon), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
+            appDelegate.activeMain.returnCreate(Int(k_returnCreateFileText))
+        })
+        
         if appDelegate.isCryptoCloudMode {
         
             actionSheet.addButton(withTitle: NSLocalizedString("_upload_encrypted_mode", comment: ""), image: UIImage(named: "actionSheetLock"), backgroundColor: colorLightGray, height: 50.0, type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in

+ 5 - 0
iOSClient/Main/CCMain.m

@@ -917,6 +917,11 @@
         }
             break;
     
+        case k_returnCreateFileText: {
+            
+        }
+            break;
+            
         /* UTILITY */
         case k_returnNote:
             [self openModel:@"note" isNew:true];

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

@@ -529,6 +529,7 @@
 "_upload_encrypted_mode"            = "Upload in encrypted mode";
 "_upload_template_"                 = "Upload a template";
 "_upload_plain_mode"                = "Upload in plain mode";
+"_upload_file_text_"                = "Create a text file";
 
 // Document Picker