diff --git a/Localization/app.json b/Localization/app.json index 21e91ca2..7b5e271e 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -534,7 +534,7 @@ } }, "footer": { - "mastodon_description": "Mastodon is open source software. You can contribute or report issues on GitHub at %s (%s)" + "mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)" }, "keyboard": { "close_settings_window": "Close Settings Window" diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index e4b6635c..1f3db09e 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -4482,7 +4482,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -4490,7 +4490,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -4509,7 +4509,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -4517,7 +4517,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -4772,7 +4772,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = MastodonIntent/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4780,7 +4780,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.MastodonIntent; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4796,7 +4796,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = MastodonIntent/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4804,7 +4804,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.MastodonIntent; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4820,7 +4820,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = MastodonIntent/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4828,7 +4828,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.MastodonIntent; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4844,7 +4844,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = MastodonIntent/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4852,7 +4852,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.MastodonIntent; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4868,7 +4868,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = ShareActionExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4876,7 +4876,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.ShareActionExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4892,7 +4892,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = ShareActionExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4900,7 +4900,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.ShareActionExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4916,7 +4916,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = ShareActionExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4924,7 +4924,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.ShareActionExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4940,7 +4940,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = ShareActionExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4948,7 +4948,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.ShareActionExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -5017,7 +5017,6 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = ASDK; - SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = "ASDK - Release"; @@ -5031,7 +5030,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -5039,7 +5038,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -5145,7 +5144,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -5153,7 +5152,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -5265,7 +5264,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -5273,7 +5272,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -5379,7 +5378,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -5387,7 +5386,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -5433,7 +5432,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -5441,7 +5440,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -5456,7 +5455,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 47; + CURRENT_PROJECT_VERSION = 50; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -5464,7 +5463,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.9.4; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/Mastodon.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme b/Mastodon.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme index b64bfc89..d372229c 100644 --- a/Mastodon.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme +++ b/Mastodon.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme @@ -74,6 +74,7 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES" + askForAppToLaunch = "Yes" launchAutomaticallySubstyle = "2"> diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index d5b0a1e9..88e42553 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ AppShared.xcscheme_^#shared#^_ orderHint - 31 + 26 CoreDataStack.xcscheme_^#shared#^_ orderHint - 30 + 24 Mastodon - ASDK.xcscheme_^#shared#^_ @@ -37,7 +37,7 @@ MastodonIntent.xcscheme_^#shared#^_ orderHint - 29 + 25 MastodonIntents.xcscheme_^#shared#^_ @@ -52,12 +52,12 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 3 + 4 ShareActionExtension.xcscheme_^#shared#^_ orderHint - 28 + 23 SuppressBuildableAutocreation diff --git a/Mastodon/Generated/Assets.swift b/Mastodon/Generated/Assets.swift index 0fe48777..f3ef1088 100644 --- a/Mastodon/Generated/Assets.swift +++ b/Mastodon/Generated/Assets.swift @@ -111,9 +111,11 @@ internal enum Asset { } } internal enum Settings { - internal static let appearanceAutomatic = ImageAsset(name: "Settings/appearance.automatic") - internal static let appearanceDark = ImageAsset(name: "Settings/appearance.dark") - internal static let appearanceLight = ImageAsset(name: "Settings/appearance.light") + internal static let blackAuto = ImageAsset(name: "Settings/black.auto") + internal static let black = ImageAsset(name: "Settings/black") + internal static let darkAuto = ImageAsset(name: "Settings/dark.auto") + internal static let dark = ImageAsset(name: "Settings/dark") + internal static let light = ImageAsset(name: "Settings/light") } internal enum Theme { internal enum Mastodon { diff --git a/Mastodon/Generated/Strings.swift b/Mastodon/Generated/Strings.swift index 0e31e5da..0f390d2e 100644 --- a/Mastodon/Generated/Strings.swift +++ b/Mastodon/Generated/Strings.swift @@ -923,7 +923,7 @@ internal enum L10n { /// Settings internal static let title = L10n.tr("Localizable", "Scene.Settings.Title") internal enum Footer { - /// Mastodon is open source software. You can contribute or report issues on GitHub at %@ (%@) + /// Mastodon is open source software. You can report issues on GitHub at %@ (%@) internal static func mastodonDescription(_ p1: Any, _ p2: Any) -> String { return L10n.tr("Localizable", "Scene.Settings.Footer.MastodonDescription", String(describing: p1), String(describing: p2)) } diff --git a/Mastodon/Resources/Assets.xcassets/Settings/appearance.automatic.imageset/iPhone 11 Pro _ X - 1.pdf b/Mastodon/Resources/Assets.xcassets/Settings/appearance.automatic.imageset/iPhone 11 Pro _ X - 1.pdf deleted file mode 100644 index 868d8d8b..00000000 Binary files a/Mastodon/Resources/Assets.xcassets/Settings/appearance.automatic.imageset/iPhone 11 Pro _ X - 1.pdf and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/appearance.dark.imageset/iPhone 11 Pro _ X - 1 (2).pdf b/Mastodon/Resources/Assets.xcassets/Settings/appearance.dark.imageset/iPhone 11 Pro _ X - 1 (2).pdf deleted file mode 100644 index a214d285..00000000 Binary files a/Mastodon/Resources/Assets.xcassets/Settings/appearance.dark.imageset/iPhone 11 Pro _ X - 1 (2).pdf and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/appearance.light.imageset/iPhone 11 Pro _ X - 1 (1).pdf b/Mastodon/Resources/Assets.xcassets/Settings/appearance.light.imageset/iPhone 11 Pro _ X - 1 (1).pdf deleted file mode 100644 index 2b8b869b..00000000 Binary files a/Mastodon/Resources/Assets.xcassets/Settings/appearance.light.imageset/iPhone 11 Pro _ X - 1 (1).pdf and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/appearance.automatic.imageset/Contents.json b/Mastodon/Resources/Assets.xcassets/Settings/black.auto.imageset/Contents.json similarity index 71% rename from Mastodon/Resources/Assets.xcassets/Settings/appearance.automatic.imageset/Contents.json rename to Mastodon/Resources/Assets.xcassets/Settings/black.auto.imageset/Contents.json index 75da4a57..909d1ad2 100644 --- a/Mastodon/Resources/Assets.xcassets/Settings/appearance.automatic.imageset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Settings/black.auto.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "iPhone 11 Pro _ X - 1.pdf", + "filename" : "Mixed_Black_Light.png", "idiom" : "universal" } ], diff --git a/Mastodon/Resources/Assets.xcassets/Settings/black.auto.imageset/Mixed_Black_Light.png b/Mastodon/Resources/Assets.xcassets/Settings/black.auto.imageset/Mixed_Black_Light.png new file mode 100644 index 00000000..d27078d5 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/Settings/black.auto.imageset/Mixed_Black_Light.png differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/appearance.light.imageset/Contents.json b/Mastodon/Resources/Assets.xcassets/Settings/black.imageset/Contents.json similarity index 70% rename from Mastodon/Resources/Assets.xcassets/Settings/appearance.light.imageset/Contents.json rename to Mastodon/Resources/Assets.xcassets/Settings/black.imageset/Contents.json index 86e635c3..23975c38 100644 --- a/Mastodon/Resources/Assets.xcassets/Settings/appearance.light.imageset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Settings/black.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "iPhone 11 Pro _ X - 1 (1).pdf", + "filename" : "Home Black.png", "idiom" : "universal" } ], diff --git a/Mastodon/Resources/Assets.xcassets/Settings/black.imageset/Home Black.png b/Mastodon/Resources/Assets.xcassets/Settings/black.imageset/Home Black.png new file mode 100644 index 00000000..b7348ae9 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/Settings/black.imageset/Home Black.png differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/appearance.dark.imageset/Contents.json b/Mastodon/Resources/Assets.xcassets/Settings/dark.auto.imageset/Contents.json similarity index 70% rename from Mastodon/Resources/Assets.xcassets/Settings/appearance.dark.imageset/Contents.json rename to Mastodon/Resources/Assets.xcassets/Settings/dark.auto.imageset/Contents.json index 6ca47e40..3b7f153c 100644 --- a/Mastodon/Resources/Assets.xcassets/Settings/appearance.dark.imageset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Settings/dark.auto.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "iPhone 11 Pro _ X - 1 (2).pdf", + "filename" : "Mixed_Dark_Light.png", "idiom" : "universal" } ], diff --git a/Mastodon/Resources/Assets.xcassets/Settings/dark.auto.imageset/Mixed_Dark_Light.png b/Mastodon/Resources/Assets.xcassets/Settings/dark.auto.imageset/Mixed_Dark_Light.png new file mode 100644 index 00000000..45067591 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/Settings/dark.auto.imageset/Mixed_Dark_Light.png differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/dark.imageset/Contents.json b/Mastodon/Resources/Assets.xcassets/Settings/dark.imageset/Contents.json new file mode 100644 index 00000000..01bdd059 --- /dev/null +++ b/Mastodon/Resources/Assets.xcassets/Settings/dark.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Home Dark.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Mastodon/Resources/Assets.xcassets/Settings/dark.imageset/Home Dark.png b/Mastodon/Resources/Assets.xcassets/Settings/dark.imageset/Home Dark.png new file mode 100644 index 00000000..46926d86 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/Settings/dark.imageset/Home Dark.png differ diff --git a/Mastodon/Resources/Assets.xcassets/Settings/light.imageset/Contents.json b/Mastodon/Resources/Assets.xcassets/Settings/light.imageset/Contents.json new file mode 100644 index 00000000..beb5cfcf --- /dev/null +++ b/Mastodon/Resources/Assets.xcassets/Settings/light.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Home Light.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Mastodon/Resources/Assets.xcassets/Settings/light.imageset/Home Light.png b/Mastodon/Resources/Assets.xcassets/Settings/light.imageset/Home Light.png new file mode 100644 index 00000000..cafff0bb Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/Settings/light.imageset/Home Light.png differ diff --git a/Mastodon/Resources/ar.lproj/Localizable.strings b/Mastodon/Resources/ar.lproj/Localizable.strings index 0d09e459..39affaf2 100644 --- a/Mastodon/Resources/ar.lproj/Localizable.strings +++ b/Mastodon/Resources/ar.lproj/Localizable.strings @@ -315,7 +315,7 @@ any server."; "Scene.ServerRules.Subtitle" = "These rules are set by the admins of %@."; "Scene.ServerRules.TermsOfService" = "terms of service"; "Scene.ServerRules.Title" = "Some ground rules."; -"Scene.Settings.Footer.MastodonDescription" = "Mastodon is open source software. You can contribute or report issues on GitHub at %@ (%@)"; +"Scene.Settings.Footer.MastodonDescription" = "Mastodon is open source software. You can report issues on GitHub at %@ (%@)"; "Scene.Settings.Keyboard.CloseSettingsWindow" = "Close Settings Window"; "Scene.Settings.Section.Appearance.Automatic" = "Automatic"; "Scene.Settings.Section.Appearance.Dark" = "Always Dark"; diff --git a/Mastodon/Resources/en.lproj/Localizable.strings b/Mastodon/Resources/en.lproj/Localizable.strings index 0d09e459..39affaf2 100644 --- a/Mastodon/Resources/en.lproj/Localizable.strings +++ b/Mastodon/Resources/en.lproj/Localizable.strings @@ -315,7 +315,7 @@ any server."; "Scene.ServerRules.Subtitle" = "These rules are set by the admins of %@."; "Scene.ServerRules.TermsOfService" = "terms of service"; "Scene.ServerRules.Title" = "Some ground rules."; -"Scene.Settings.Footer.MastodonDescription" = "Mastodon is open source software. You can contribute or report issues on GitHub at %@ (%@)"; +"Scene.Settings.Footer.MastodonDescription" = "Mastodon is open source software. You can report issues on GitHub at %@ (%@)"; "Scene.Settings.Keyboard.CloseSettingsWindow" = "Close Settings Window"; "Scene.Settings.Section.Appearance.Automatic" = "Automatic"; "Scene.Settings.Section.Appearance.Dark" = "Always Dark"; diff --git a/Mastodon/Scene/Settings/SettingsViewController.swift b/Mastodon/Scene/Settings/SettingsViewController.swift index 475b93f5..9a240daa 100644 --- a/Mastodon/Scene/Settings/SettingsViewController.swift +++ b/Mastodon/Scene/Settings/SettingsViewController.swift @@ -105,18 +105,18 @@ class SettingsViewController: UIViewController, NeedsDependency { }() let tableFooterLabel = MetaLabel(style: .settingTableFooter) - lazy var tableFooterView: UIView = { - // init with a frame to fix a conflict ('UIView-Encapsulated-Layout-Height' UIStackView:0x7ffe41e47da0.height == 0) - let view = UIStackView(frame: CGRect(x: 0, y: 0, width: 320, height: 320)) - view.isLayoutMarginsRelativeArrangement = true - view.layoutMargins = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) - view.axis = .vertical - view.alignment = .center - - tableFooterLabel.linkDelegate = self - view.addArrangedSubview(tableFooterLabel) - return view - }() +// lazy var tableFooterView: UIView = { +// // init with a frame to fix a conflict ('UIView-Encapsulated-Layout-Height' UIStackView:0x7ffe41e47da0.height == 0) +// let view = UIStackView(frame: CGRect(x: 0, y: 0, width: 320, height: 320)) +// view.isLayoutMarginsRelativeArrangement = true +// view.layoutMargins = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) +// view.axis = .vertical +// view.alignment = .center +// +// tableFooterLabel.linkDelegate = self +// view.addArrangedSubview(tableFooterLabel) +// return view +// }() override func viewDidLoad() { super.viewDidLoad() @@ -259,7 +259,7 @@ class SettingsViewController: UIViewController, NeedsDependency { settingsAppearanceTableViewCellDelegate: self, settingsToggleCellDelegate: self ) - tableView.tableFooterView = tableFooterView + // tableView.tableFooterView = tableFooterView } func alertToSignout() { diff --git a/Mastodon/Scene/Settings/View/AppearanceView.swift b/Mastodon/Scene/Settings/View/AppearanceView.swift index dfac265c..e761d46e 100644 --- a/Mastodon/Scene/Settings/View/AppearanceView.swift +++ b/Mastodon/Scene/Settings/View/AppearanceView.swift @@ -10,6 +10,9 @@ import UIKit class AppearanceView: UIView { lazy var imageView: UIImageView = { let view = UIImageView() + view.layer.masksToBounds = true + view.layer.cornerRadius = 14 + view.layer.cornerCurve = .continuous // accessibility view.accessibilityIgnoresInvertColors = true return view diff --git a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift index d1785b7b..c4eb998e 100644 --- a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift +++ b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift @@ -15,26 +15,26 @@ protocol SettingsAppearanceTableViewCellDelegate: AnyObject { class SettingsAppearanceTableViewCell: UITableViewCell { var disposeBag = Set() + + static let spacing: CGFloat = 18 weak var delegate: SettingsAppearanceTableViewCellDelegate? var appearance: SettingsItem.AppearanceMode = .automatic lazy var stackView: UIStackView = { let view = UIStackView() - view.isLayoutMarginsRelativeArrangement = true - view.layoutMargins = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) view.axis = .horizontal view.distribution = .fillEqually - view.spacing = 18 + view.spacing = SettingsAppearanceTableViewCell.spacing view.translatesAutoresizingMaskIntoConstraints = false return view }() - let automatic = AppearanceView(image: Asset.Settings.appearanceAutomatic.image, + let automatic = AppearanceView(image: Asset.Settings.darkAuto.image, title: L10n.Scene.Settings.Section.Appearance.automatic) - let light = AppearanceView(image: Asset.Settings.appearanceLight.image, + let light = AppearanceView(image: Asset.Settings.light.image, title: L10n.Scene.Settings.Section.Appearance.light) - let dark = AppearanceView(image: Asset.Settings.appearanceDark.image, + let dark = AppearanceView(image: Asset.Settings.dark.image, title: L10n.Scene.Settings.Section.Appearance.dark) lazy var automaticTap: UITapGestureRecognizer = { @@ -80,6 +80,8 @@ class SettingsAppearanceTableViewCell: UITableViewCell { subview.removeFromSuperview() } } + + setupAsset(theme: ThemeService.shared.currentTheme.value) } func update(with data: SettingsItem.AppearanceMode) { @@ -115,10 +117,36 @@ class SettingsAppearanceTableViewCell: UITableViewCell { NSLayoutConstraint.activate([ stackView.topAnchor.constraint(equalTo: contentView.topAnchor), - stackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), + stackView.leadingAnchor.constraint(equalTo: contentView.readableContentGuide.leadingAnchor), stackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), - stackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), + stackView.trailingAnchor.constraint(equalTo: contentView.readableContentGuide.trailingAnchor), ]) + + setupAsset(theme: ThemeService.shared.currentTheme.value) + ThemeService.shared.currentTheme + .receive(on: DispatchQueue.main) + .sink { [weak self] theme in + guard let self = self else { return } + self.setupAsset(theme: theme) + } + .store(in: &disposeBag) + } + + private func setupAsset(theme: Theme) { + let aspectRatio = Asset.Settings.light.image.size + let width = floor(frame.width - 2 * SettingsAppearanceTableViewCell.spacing) / 3 + let height = width / aspectRatio.width * aspectRatio.height + let size = CGSize(width: width, height: height) + + light.imageView.image = Asset.Settings.light.image.af.imageAspectScaled(toFill: size, scale: UIScreen.main.scale) + switch theme.themeName { + case .mastodon: + automatic.imageView.image = Asset.Settings.darkAuto.image.af.imageAspectScaled(toFill: size, scale: UIScreen.main.scale) + dark.imageView.image = Asset.Settings.dark.image.af.imageAspectScaled(toFill: size, scale: UIScreen.main.scale) + case .system: + automatic.imageView.image = Asset.Settings.blackAuto.image.af.imageAspectScaled(toFill: size, scale: UIScreen.main.scale) + dark.imageView.image = Asset.Settings.black.image.af.imageAspectScaled(toFill: size, scale: UIScreen.main.scale) + } } // MARK: - Actions diff --git a/Mastodon/Service/APIService/APIService+App.swift b/Mastodon/Service/APIService/APIService+App.swift index 1575e656..7153bc2a 100644 --- a/Mastodon/Service/APIService/APIService+App.swift +++ b/Mastodon/Service/APIService/APIService+App.swift @@ -19,7 +19,7 @@ extension APIService { private static let clientName = "Mastodon for iOS" #endif - private static let appWebsite = "https://joinmastodon.org/apps" + private static let appWebsite = "https://app.joinmastodon.org/ios" func createApplication(domain: String) -> AnyPublisher, Error> { let query = Mastodon.API.App.CreateQuery( diff --git a/Mastodon/Service/ThemeService/MastodonTheme.swift b/Mastodon/Service/ThemeService/MastodonTheme.swift index 60093f04..dbf2324c 100644 --- a/Mastodon/Service/ThemeService/MastodonTheme.swift +++ b/Mastodon/Service/ThemeService/MastodonTheme.swift @@ -8,6 +8,9 @@ import UIKit struct MastodonTheme: Theme { + + let themeName: ThemeName = .mastodon + let systemBackgroundColor = Asset.Theme.Mastodon.systemBackground.color let secondarySystemBackgroundColor = Asset.Theme.Mastodon.secondarySystemBackground.color let tertiarySystemBackgroundColor = Asset.Theme.Mastodon.tertiarySystemBackground.color diff --git a/Mastodon/Service/ThemeService/SystemTheme.swift b/Mastodon/Service/ThemeService/SystemTheme.swift index 0be42c6e..3a8ddd2d 100644 --- a/Mastodon/Service/ThemeService/SystemTheme.swift +++ b/Mastodon/Service/ThemeService/SystemTheme.swift @@ -8,6 +8,9 @@ import UIKit struct SystemTheme: Theme { + + let themeName: ThemeName = .system + let systemBackgroundColor = Asset.Theme.System.systemBackground.color let secondarySystemBackgroundColor = Asset.Theme.System.secondarySystemBackground.color let tertiarySystemBackgroundColor = Asset.Theme.System.tertiarySystemBackground.color diff --git a/Mastodon/Service/ThemeService/Theme.swift b/Mastodon/Service/ThemeService/Theme.swift index 15def6f5..4074e090 100644 --- a/Mastodon/Service/ThemeService/Theme.swift +++ b/Mastodon/Service/ThemeService/Theme.swift @@ -8,6 +8,8 @@ import UIKit public protocol Theme { + + var themeName: ThemeName { get } var systemBackgroundColor: UIColor { get } var secondarySystemBackgroundColor: UIColor { get } diff --git a/Mastodon/Supporting Files/SceneDelegate.swift b/Mastodon/Supporting Files/SceneDelegate.swift index 05ff8850..d0067129 100644 --- a/Mastodon/Supporting Files/SceneDelegate.swift +++ b/Mastodon/Supporting Files/SceneDelegate.swift @@ -132,9 +132,13 @@ extension SceneDelegate { if coordinator?.tabBarController.topMost is ComposeViewController { logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): composing…") } else { - let composeViewModel = ComposeViewModel(context: AppContext.shared, composeKind: .post) - coordinator?.present(scene: .compose(viewModel: composeViewModel), from: nil, transition: .modal(animated: true, completion: nil)) - logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): present compose scene") + if AppContext.shared.authenticationService.activeMastodonAuthenticationBox.value == nil { + logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): not authenticated") + } else { + let composeViewModel = ComposeViewModel(context: AppContext.shared, composeKind: .post) + coordinator?.present(scene: .compose(viewModel: composeViewModel), from: nil, transition: .modal(animated: true, completion: nil)) + logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): present compose scene") + } } case "org.joinmastodon.app.search": coordinator?.switchToTabBar(tab: .search) diff --git a/README.md b/README.md index 71194684..f6b0e16c 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ ## Requirements -- Xcode 12.4+ +- Xcode 12.5+ - Swift 5.3+ - iOS 14.0+ ## Setup -We needs the latest version Xcode from App Store. And install Cocoapods for dependency management. +We needs the latest version Xcode from App Store. And use Cocoapods for dependency management. ### CocoaPods @@ -16,7 +16,8 @@ We needs the latest version Xcode from App Store. And install Cocoapods for depe ```zsh # install cocoapods from Homebrew -brew install cocoapods +sudo gem install cocoapods +sudo gem install cocoapods-keys pod install ``` @@ -24,7 +25,8 @@ pod install ```zsh # install cocoapods from Homebrew -brew install cocoapods +sudo gem install cocoapods +sudo gem install cocoapods-keys # pod install may not works on M1 Mac. Fix by install ffi # ref: https://github.com/CocoaPods/CocoaPods/issues/10220 @@ -40,22 +42,43 @@ arch -x86_64 pod install 2. Check the signing settings make sure choose a team. [More info…](https://help.apple.com/xcode/mac/current/#/dev23aab79b4) 3. Select `Mastodon` scheme and run it. +#### Contributors +The app require the `App Group` capability. To make sure it works for your developer membership. Please check [AppName.swift](AppShared/AppName.swift) file and set another unique `groupID` and update `App Group` settings. + +The app is compatible with [toot-relay](https://github.com/DagAgren/toot-relay) APNs. You can set your push notification endpoint via cocoapod-keys. + ## Acknowledgements -- [ActiveLabel](https://github.com/TwidereProject/ActiveLabel.swift) - [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - [Alamofire](https://github.com/Alamofire/Alamofire) - [CommonOSLog](https://github.com/mainasuk/CommonOSLog) - [CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift) - [DateToolSwift](https://github.com/MatthewYork/DateTools) +- [DiffableDataSources](https://github.com/ra1028/DiffableDataSources) +- [DifferenceKit](https://github.com/ra1028/DifferenceKit) +- [FLAnimatedImage](https://github.com/Flipboard/FLAnimatedImage) +- [FLEX](https://github.com/FLEXTool/FLEX) +- [FPSIndicator](https://github.com/MainasuK/FPSIndicator) +- [Fuzi](https://github.com/cezheng/Fuzi) - [Kanna](https://github.com/tid-kijyun/Kanna) - [KeychainAccess](https://github.com/kishikawakatsumi/KeychainAccess.git) - [Kingfisher](https://github.com/onevcat/Kingfisher) +- [MetaTextKit](https://github.com/TwidereProject/MetaTextKit) +- [Nuke-FLAnimatedImage-Plugin](https://github.com/kean/Nuke-FLAnimatedImage-Plugin) +- [Nuke](https://github.com/kean/Nuke) +- [Pageboy](https://github.com/uias/Pageboy#the-basics) +- [SDWebImage](https://github.com/SDWebImage/SDWebImage) +- [swift-nio](https://github.com/apple/swift-nio) - [SwiftGen](https://github.com/SwiftGen/SwiftGen) +- [SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect) - [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) -- [TwitterTextEditor](https://github.com/twitter/TwitterTextEditor) +- [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) +- [Tabman](https://github.com/uias/Tabman) +- [Texture](https://github.com/TextureGroup/Texture) +- [ThirdPartyMailer](https://github.com/vtourraine/ThirdPartyMailer) +- [TOCropViewController](https://github.com/TimOliver/TOCropViewController) - [TwitterProfile](https://github.com/OfTheWolf/TwitterProfile) - [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder)