From 8def548913649e610a8076a24ea130a5679afed9 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Tue, 20 Dec 2022 16:08:09 +0100 Subject: [PATCH] Account tab + brand color --- IceCubesApp.xcodeproj/project.pbxproj | 12 ++++- .../xcschemes/IceCubesApp.xcscheme | 2 +- IceCubesApp/App/IceCubesApp.swift | 5 +++ IceCubesApp/App/Tabs/AccountTab.swift | 45 +++++++++++++++++++ .../Sources/Account/AccountDetailView.swift | 16 ++++++- .../Account/AccountDetailViewModel.swift | 2 +- .../DesignSystem/Resources/Colors.swift | 7 +++ .../Resources/Colors.xcassets/Contents.json | 6 +++ .../brand.colorset/Contents.json | 20 +++++++++ .../Models/{App.swift => InstanceApp.swift} | 2 +- Packages/Network/Sources/Network/Client.swift | 4 +- 11 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 IceCubesApp/App/Tabs/AccountTab.swift create mode 100644 Packages/DesignSystem/Sources/DesignSystem/Resources/Colors.swift create mode 100644 Packages/DesignSystem/Sources/DesignSystem/Resources/Colors.xcassets/Contents.json create mode 100644 Packages/DesignSystem/Sources/DesignSystem/Resources/Colors.xcassets/brand.colorset/Contents.json rename Packages/Models/Sources/Models/{App.swift => InstanceApp.swift} (81%) diff --git a/IceCubesApp.xcodeproj/project.pbxproj b/IceCubesApp.xcodeproj/project.pbxproj index 9119db92..131822d2 100644 --- a/IceCubesApp.xcodeproj/project.pbxproj +++ b/IceCubesApp.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 9F35DB44294F9A7D00B3281A /* Status in Frameworks */ = {isa = PBXBuildFile; productRef = 9F35DB43294F9A7D00B3281A /* Status */; }; 9F35DB4729506F6600B3281A /* NotificationTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F35DB4629506F6600B3281A /* NotificationTab.swift */; }; 9F35DB4A29506FA100B3281A /* Notifications in Frameworks */ = {isa = PBXBuildFile; productRef = 9F35DB4929506FA100B3281A /* Notifications */; }; + 9F35DB4C2952005C00B3281A /* AccountTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F35DB4B2952005C00B3281A /* AccountTab.swift */; }; 9F398AA62935FE8A00A889F2 /* AppRouteur.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F398AA52935FE8A00A889F2 /* AppRouteur.swift */; }; 9F398AA92935FFDB00A889F2 /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 9F398AA82935FFDB00A889F2 /* Account */; }; 9F398AAB2935FFDB00A889F2 /* Models in Frameworks */ = {isa = PBXBuildFile; productRef = 9F398AAA2935FFDB00A889F2 /* Models */; }; @@ -36,6 +37,7 @@ 9F35DB45294FA04C00B3281A /* DesignSystem */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = DesignSystem; path = Packages/DesignSystem; sourceTree = ""; }; 9F35DB4629506F6600B3281A /* NotificationTab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationTab.swift; sourceTree = ""; }; 9F35DB4829506F7F00B3281A /* Notifications */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Notifications; path = Packages/Notifications; sourceTree = ""; }; + 9F35DB4B2952005C00B3281A /* AccountTab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountTab.swift; sourceTree = ""; }; 9F398AA32935F90100A889F2 /* Models */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Models; path = Packages/Models; sourceTree = ""; }; 9F398AA52935FE8A00A889F2 /* AppRouteur.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppRouteur.swift; sourceTree = ""; }; 9F398AAC2936005300A889F2 /* Account */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Account; path = Packages/Account; sourceTree = ""; }; @@ -95,6 +97,7 @@ 9FE151A4293C90EA00E9683D /* Settings */, 9F398AB229360A4C00A889F2 /* TimelineTab.swift */, 9F35DB4629506F6600B3281A /* NotificationTab.swift */, + 9F35DB4B2952005C00B3281A /* AccountTab.swift */, ); path = Tabs; sourceTree = ""; @@ -199,7 +202,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1410; - LastUpgradeCheck = 1410; + LastUpgradeCheck = 1420; TargetAttributes = { 9FBFE638292A715500C250E9 = { CreatedOnToolsVersion = 14.1; @@ -245,6 +248,7 @@ buildActionMask = 2147483647; files = ( 9FE151A6293C90F900E9683D /* IconSelectorView.swift in Sources */, + 9F35DB4C2952005C00B3281A /* AccountTab.swift in Sources */, 9FAE4ACB293783B000772766 /* SettingsTab.swift in Sources */, 9FAE4AD32937A0C600772766 /* AppAccountsManager.swift in Sources */, 9F398AB329360A4C00A889F2 /* TimelineTab.swift in Sources */, @@ -291,6 +295,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -349,6 +354,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -375,8 +381,10 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_ENTITLEMENTS = IceCubesApp/IceCubesApp.entitlements; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 200; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"IceCubesApp/Resources\""; DEVELOPMENT_TEAM = Z6P74P6T99; ENABLE_HARDENED_RUNTIME = YES; @@ -416,8 +424,10 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_ENTITLEMENTS = IceCubesApp/IceCubesApp.entitlements; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 200; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"IceCubesApp/Resources\""; DEVELOPMENT_TEAM = Z6P74P6T99; ENABLE_HARDENED_RUNTIME = YES; diff --git a/IceCubesApp.xcodeproj/xcshareddata/xcschemes/IceCubesApp.xcscheme b/IceCubesApp.xcodeproj/xcshareddata/xcschemes/IceCubesApp.xcscheme index 82cdf8b1..61077478 100644 --- a/IceCubesApp.xcodeproj/xcshareddata/xcschemes/IceCubesApp.xcscheme +++ b/IceCubesApp.xcodeproj/xcshareddata/xcschemes/IceCubesApp.xcscheme @@ -1,6 +1,6 @@ URL { - let app: Models.App = try await post(endpoint: Apps.registerApp) + let app: InstanceApp = try await post(endpoint: Apps.registerApp) self.oauthApp = app return makeURL(endpoint: Oauth.authorize(clientId: app.clientId)) }