Marino Faggiana 8 жил өмнө
parent
commit
ad9611713d

+ 21 - 0
iOSClient/Images.xcassets/button1000x200.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "button1000x200.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
iOSClient/Images.xcassets/button1000x200.imageset/button1000x200.png


+ 21 - 0
iOSClient/Images.xcassets/button500x100.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "button500x100.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
iOSClient/Images.xcassets/button500x100.imageset/button500x100.png


+ 0 - 3
iOSClient/Main/CCDetail.h

@@ -39,7 +39,6 @@
 
 @property (nonatomic, strong) tableMetadata *metadataDetail;
 @property BOOL sourceDirectoryLocal;
-//@property BOOL isAutoUpload;
 @property (nonatomic, strong) NSDate *dateFilterQuery;
 
 // Document
@@ -51,8 +50,6 @@
 @property (nonatomic, strong) MWPhotoBrowser *photoBrowser;
 @property (nonatomic, strong) NSMutableArray *photos;
 @property (nonatomic, strong) NSMutableArray *thumbs;
-@property (nonatomic, strong) NSString *fileIDNowVisible;
-@property (nonatomic) NSUInteger indexNowVisible;
 
 // PDF
 @property (nonatomic, strong) ReaderViewController *readerPDFViewController;

+ 15 - 10
iOSClient/Main/CCDetail.m

@@ -41,6 +41,9 @@
     UIBarButtonItem *_buttonShare;
     UIBarButtonItem *_buttonDelete;
     
+    NSInteger _indexNowVisible;
+    NSString *_fileIDNowVisible;
+
     BOOL _reload;
     
     NSMutableOrderedSet *_dataSourceDirectoryID;
@@ -65,8 +68,8 @@
         self.thumbs = [[NSMutableArray alloc] init];
         self.dataSourceImagesVideos = [[NSMutableArray alloc] init];
         _dataSourceDirectoryID = [[NSMutableOrderedSet alloc] init];
-        self.indexNowVisible = 0;
-        self.fileIDNowVisible = nil;
+        _indexNowVisible = -1;
+        _fileIDNowVisible = nil;
         
         app.activeDetail = self;
     }
@@ -387,6 +390,8 @@
 {
     self.photoBrowser = [[MWPhotoBrowser alloc] initWithDelegate:self];
     _reload = NO;
+    _indexNowVisible = -1;
+    _fileIDNowVisible = nil;
     
     [self.photos removeAllObjects];
     [self.thumbs removeAllObjects];
@@ -469,8 +474,8 @@
         NSString *directory;
         NSString *fileID = metadata.fileID;
     
-        self.indexNowVisible = index;
-        self.fileIDNowVisible = metadata.fileID;
+        _indexNowVisible = index;
+        _fileIDNowVisible = metadata.fileID;
     
         photoBrowser.toolbar.hidden = NO;
     
@@ -545,7 +550,7 @@
                         
                     } else {
                         
-                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:@"button"] colorText:[UIColor lightGrayColor]]]];
+                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:@"button1000x200"] colorText:[UIColor lightGrayColor] sizeOfFont:50]]];
                     }
                 }
             }
@@ -574,7 +579,7 @@
                         
                     } else {
                         
-                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:@"button"] colorText:[UIColor lightGrayColor]]]];
+                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:@"button1000x200"] colorText:[UIColor lightGrayColor] sizeOfFont:50]]];
                     }
                 }
             }
@@ -772,7 +777,7 @@
     
     //NSLog(@"[LOG] Add Download Photo Browser");
     
-    if ([metadataVar.fileID isEqualToString:self.fileIDNowVisible] || [self.photoBrowser isGridReload:index]) {
+    if ([metadataVar.fileID isEqualToString:_fileIDNowVisible] || [self.photoBrowser isGridReload:index]) {
         
         [self.photoBrowser reloadData];
         
@@ -800,12 +805,12 @@
     //NSDate *date = [[notification.userInfo allValues] objectAtIndex:0];
  
     // test [Chrash V 1.14,15]
-    if (self.indexNowVisible >= [self.photos count])
+    if (_indexNowVisible >= [self.photos count])
         return;
     
-    if ([fileID isEqualToString:self.fileIDNowVisible]) {
+    if ([fileID isEqualToString:_fileIDNowVisible]) {
             
-        MWPhoto *photo = [self.photos objectAtIndex:self.indexNowVisible];
+        MWPhoto *photo = [self.photos objectAtIndex:_indexNowVisible];
             
         [self setLocationCaptionPhoto:photo fileID:fileID];
             

+ 2 - 2
iOSClient/Photos/CCPhotos.m

@@ -286,9 +286,9 @@
             
     if (!account.autoUpload) {
     
-        UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"button"] color:[NCBrandColor sharedInstance].brand];
+        UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"button500x100"] color:[NCBrandColor sharedInstance].brand];
         
-        return [CCUtility drawText:NSLocalizedString(@"_activate_autoupload_", nil) inImage:buttonImage colorText:[UIColor whiteColor]];
+        return [CCUtility drawText:NSLocalizedString(@"_activate_autoupload_", nil) inImage:buttonImage colorText:[UIColor whiteColor] sizeOfFont:26];
         
     } else return nil;
 }

BIN
iOSClient/Supporting Files/en-GB.lproj/Localizable.strings


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

@@ -70,10 +70,6 @@
 
 // Networking
 
-"_file_too_big_"            = "File too large to be encrypted/decrypted";
-"_file_too_big_max_100_"    = "File too large (max 100 kb.)";
-"_...loading..._"           = "Loading…";
-"_download_plist_"          = " ";
 "_no_reuploadfile_"         = "Could not find nor resend file. Delete the upload and reload the file to upload it.";
 "_file_already_exists_"     = "Unable to complete the operation, there is a file with the same name";
 "_read_file_error_"         = "Read file error";

BIN
iOSClient/Supporting Files/nl.lproj/Localizable.strings


+ 1 - 1
iOSClient/Utility/CCUtility.h

@@ -192,7 +192,7 @@
 + (NSDate *)datetimeWithOutTime:(NSDate *)datDate;
 + (NSDate *)datetimeWithOutDate:(NSDate *)datDate;
 + (BOOL)isValidEmail:(NSString *)checkString;
-+ (UIImage*)drawText:(NSString*)text inImage:(UIImage*)image colorText:(UIColor *)colorText;
++ (UIImage*)drawText:(NSString*)text inImage:(UIImage*)image colorText:(UIColor *)colorText sizeOfFont:(CGFloat)sizeOfFont;
 + (NSString *)URLEncodeStringFromString:(NSString *)string;
 
 @end

+ 4 - 4
iOSClient/Utility/CCUtility.m

@@ -795,7 +795,7 @@
         case k_metadataTypeFilenamePlist:
             
             metadata.cryptated = YES;            
-            metadata.fileNamePrint = NSLocalizedString(@"_download_plist_", nil);
+            metadata.fileNamePrint = @" ";
             
             [self insertInformationPlist:metadata directoryUser:directoryUser];
             
@@ -1006,7 +1006,7 @@
     } else {
         
         metadata.errorPasscode = true;
-        if (!metadata.uuid) metadata.fileNamePrint = NSLocalizedString(@"_download_plist_", nil);
+        if (!metadata.uuid) metadata.fileNamePrint = @" ";
         else metadata.fileNamePrint = NSLocalizedString(@"_insert_password_", nil);
     }
     
@@ -1248,9 +1248,9 @@
     return [emailTest evaluateWithObject:checkString];
 }
 
-+ (UIImage*)drawText:(NSString*)text inImage:(UIImage*)image colorText:(UIColor *)colorText
++ (UIImage*)drawText:(NSString*)text inImage:(UIImage*)image colorText:(UIColor *)colorText sizeOfFont:(CGFloat)sizeOfFont
 {
-    NSDictionary* attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:26], NSForegroundColorAttributeName:colorText};
+    NSDictionary* attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:sizeOfFont], NSForegroundColorAttributeName:colorText};
     NSAttributedString* attributedString = [[NSAttributedString alloc] initWithString:text attributes:attributes];
     
     int x = image.size.width/2 - attributedString.size.width/2;