瀏覽代碼

new header

Marino Faggiana 8 年之前
父節點
當前提交
7be7fa99b9
共有 3 個文件被更改,包括 76 次插入52 次删除
  1. 2 0
      Nextcloud.xcodeproj/project.pbxproj
  2. 68 0
      iOSClient/CCConstant.h
  3. 6 52
      iOSClient/CCGlobal.h

+ 2 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -1420,6 +1420,7 @@
 		F7C00D4A1E2D10BB0032160B /* cryptocloud 7.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "cryptocloud 7.xcdatamodel"; sourceTree = "<group>"; };
 		F7C0F46E1C8880540059EC54 /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ShareViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		F7C0F46F1C8880540059EC54 /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ShareViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
+		F7C1CDB11E6DF5DD005D92BE /* CCConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCConstant.h; sourceTree = "<group>"; };
 		F7C1D8BA1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text; name = nl; path = nl.lproj/TTOpenInAppActivityLocalizable.string; sourceTree = "<group>"; };
 		F7C1D8BB1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/BKPasscodeView.strings; sourceTree = "<group>"; };
 		F7C1D8BC1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -3221,6 +3222,7 @@
 				F7A582D71A24DAB500E903D7 /* AppDelegate.h */,
 				F7A582D61A24DAB500E903D7 /* AppDelegate.m */,
 				F7D722AA1D11B6DA009F1A35 /* CCImages.h */,
+				F7C1CDB11E6DF5DD005D92BE /* CCConstant.h */,
 				F7C8C1901B482CEA0048180E /* CCGlobal.h */,
 				F7C8C1911B482CEA0048180E /* CCGlobal.m */,
 				F7C994311E3A92C400C2466C /* CCConstant.swift */,

+ 68 - 0
iOSClient/CCConstant.h

@@ -0,0 +1,68 @@
+//
+//  CCConstant.h
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 06/03/17.
+//  Copyright © 2017 TWS. All rights reserved.
+//
+//  Author Marino Faggiana <m.faggiana@twsweb.it>
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#define _brand_                                         @"Nextcloud"
+#define _mail_me_                                       @"ios@nextcloud.com"
+
+// -----------------------------------------------------------------------------------------------------------
+// COLOR
+// -----------------------------------------------------------------------------------------------------------
+
+// NEXTCLOUD COLOR [DEFAULT]
+
+#define COLOR_BRAND                     [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]                   // NC : #0082c9
+
+#define COLOR_SELECT_BACKGROUND         [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.1]
+
+#define COLOR_TRANSFER_BACKGROUND       [UIColor colorWithRed:178.0/255.0 green:244.0/255.0 blue:258.0/255.0 alpha:0.1]
+
+#define COLOR_GROUPBY_BAR               [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.2]
+#define COLOR_GROUPBY_BAR_NO_BLUR       [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.3]
+
+#define COLOR_NAVIGATIONBAR             [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
+#define COLOR_NAVIGATIONBAR_TEXT        [UIColor whiteColor]
+#define COLOR_NAVIGATIONBAR_PROGRESS    [UIColor colorWithRed:241.0/255.0 green:90.0/255.0 blue:34.0/255.0 alpha:1.0]
+
+#define COLOR_TABBAR                    [UIColor colorWithRed:247.0/255.0 green:247.0/255.0 blue:247.0/255.0 alpha:1]
+#define COLOR_TABBAR_TEXT               [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
+
+#define COLOR_BACKGROUND_MENU           [UIColor whiteColor]
+
+#define COLOR_BACKGROUND_PAGECONTROL    [UIColor colorWithRed:247.0/255.0 green:247.0/255.0 blue:247.0/255.0 alpha:1.0]
+#define COLOR_PAGECONTROL_INDICATOR     [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
+
+#define COLOR_CRYPTOCLOUD               [UIColor colorWithRed:241.0/255.0 green:90.0/255.0 blue:34.0/255.0 alpha:1.0]
+
+#define COLOR_TEXT_ANTHRACITE           [UIColor colorWithRed:65.0/255.0 green:64.0/255.0 blue:66.0/255.0 alpha:1.0]                    // #414042
+
+#define COLOR_TEXT_NO_CONNECTION        [UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1.0]
+
+#define COLOR_SEPARATOR_TABLE           [UIColor colorWithRed:235.0/255.0 green:235.0/255.0 blue:235.0/255.0 alpha:1.0]                 // iOS 7
+
+#define COLOR_BACKGROUND_MESSAGE_INFO   [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
+#define COLOR_CONTROL_CENTER            [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
+#define COLOR_REFRESH_CONTROL           [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
+#define COLOR_WINDOW_TINTCOLOR          [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]                   // NC : #0082c9
+
+
+

+ 6 - 52
iOSClient/CCGlobal.h

@@ -23,7 +23,12 @@
 
 #import <UIKit/UIKit.h>
 
-#import "CCImages.h"
+#ifdef CUSTOM_BUILD
+
+#else
+    #import "CCImages.h"
+    #import "CCConstant.h"
+#endif
 
 extern NSString *const appApplicationSupport;
 extern NSString *const appDatabase;
@@ -57,12 +62,6 @@ extern NSString *const BKPasscodeKeychainServiceName;
 #define k_capabilitiesGroups                            @"group.it.twsweb.Crypto-Cloud"
 #define k_serviceShareKeyChain                          @"Crypto Cloud"
 
-// BRAND
-#ifdef NC
-#define _brand_                                         @"Nextcloud"
-#define _mail_me_                                       @"ios@nextcloud.com"
-#endif
-
 #define k_dismissAfterSecond                            4
 
 #define k_MaxDimensionUpload                            524288000       // 500 MB
@@ -265,53 +264,8 @@ extern NSString *const BKPasscodeKeychainServiceName;
 #define k_minCharsSearch                                2
 
 // -----------------------------------------------------------------------------------------------------------
-// COLOR
 // -----------------------------------------------------------------------------------------------------------
 
-// NEXTCLOUD COLOR [DEFAULT]
-#ifdef NC
-
-#define COLOR_BRAND                     [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]                   // NC : #0082c9
-
-#define COLOR_SELECT_BACKGROUND         [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.1]
-
-#define COLOR_TRANSFER_BACKGROUND       [UIColor colorWithRed:178.0/255.0 green:244.0/255.0 blue:258.0/255.0 alpha:0.1]
-
-#define COLOR_GROUPBY_BAR               [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.2]
-#define COLOR_GROUPBY_BAR_NO_BLUR       [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:0.3]
-
-#define COLOR_NAVIGATIONBAR             [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-#define COLOR_NAVIGATIONBAR_TEXT        [UIColor whiteColor]
-#define COLOR_NAVIGATIONBAR_PROGRESS    [UIColor colorWithRed:241.0/255.0 green:90.0/255.0 blue:34.0/255.0 alpha:1.0]
-
-#define COLOR_TABBAR                    [UIColor colorWithRed:247.0/255.0 green:247.0/255.0 blue:247.0/255.0 alpha:1]
-#define COLOR_TABBAR_TEXT               [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-
-#define COLOR_BACKGROUND_MENU           [UIColor whiteColor]
-
-#define COLOR_BACKGROUND_PAGECONTROL    [UIColor colorWithRed:247.0/255.0 green:247.0/255.0 blue:247.0/255.0 alpha:1.0]
-#define COLOR_PAGECONTROL_INDICATOR     [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-
-#define COLOR_CRYPTOCLOUD               [UIColor colorWithRed:241.0/255.0 green:90.0/255.0 blue:34.0/255.0 alpha:1.0]
-
-#define COLOR_TEXT_ANTHRACITE           [UIColor colorWithRed:65.0/255.0 green:64.0/255.0 blue:66.0/255.0 alpha:1.0]                    // #414042
-
-#define COLOR_TEXT_NO_CONNECTION        [UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1.0]
-
-#define COLOR_SEPARATOR_TABLE           [UIColor colorWithRed:235.0/255.0 green:235.0/255.0 blue:235.0/255.0 alpha:1.0]                 // iOS 7
-
-#define COLOR_BACKGROUND_MESSAGE_INFO   [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-#define COLOR_CONTROL_CENTER            [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-#define COLOR_REFRESH_CONTROL           [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]
-#define COLOR_WINDOW_TINTCOLOR          [UIColor colorWithRed:0.0/255.0 green:130.0/255.0 blue:201.0/255.0 alpha:1.0]                   // NC : #0082c9
-
-#endif
-
-
-// -----------------------------------------------------------------------------------------------------------
-// -----------------------------------------------------------------------------------------------------------
-
-
 @interface CCAspect : NSObject
 
 + (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden;