From a2f741da2de8a4158c433193f07c9ee5c8bb34cc Mon Sep 17 00:00:00 2001 From: esiayo <41133734+blackxfiied@users.noreply.github.com> Date: Sat, 9 Nov 2024 09:46:07 +0800 Subject: [PATCH] feat: add 0.4.2 to `WhatsNewCollection` + move `WhatsNewCollection` to a different file + build bump --- Mythic.xcodeproj/project.pbxproj | 9 +- Mythic/Localizable.xcstrings | 188 +------------------------------ Mythic/MythicApp.swift | 44 +------- Mythic/WhatsNewCollection.swift | 89 +++++++++++++++ 4 files changed, 99 insertions(+), 231 deletions(-) create mode 100644 Mythic/WhatsNewCollection.swift diff --git a/Mythic.xcodeproj/project.pbxproj b/Mythic.xcodeproj/project.pbxproj index 1c724fb7..609d2fef 100644 --- a/Mythic.xcodeproj/project.pbxproj +++ b/Mythic.xcodeproj/project.pbxproj @@ -77,6 +77,7 @@ 6A71D3D92BFD01AB00A2C74D /* legendary in Resources */ = {isa = PBXBuildFile; fileRef = 6A71D3D82BFD01AB00A2C74D /* legendary */; }; 6A71D3DD2BFD024D00A2C74D /* Auth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A71D3DC2BFD024D00A2C74D /* Auth.swift */; }; 6A7A81162B77093600D19E32 /* ColorfulX in Frameworks */ = {isa = PBXBuildFile; productRef = 6A7A81152B77093600D19E32 /* ColorfulX */; }; + 6A9FE1162CDEED7A00C36058 /* WhatsNewCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A9FE1152CDEED7200C36058 /* WhatsNewCollection.swift */; }; 6AA1744F2CD5CC290035B081 /* WhatsNewKit in Frameworks */ = {isa = PBXBuildFile; productRef = 6AA1744E2CD5CC290035B081 /* WhatsNewKit */; }; 6AACEF752C18846700258A7E /* exeIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6AACEF742C18846700258A7E /* exeIcon.icns */; }; 6AAD31152B08693D0035FA69 /* SemanticVersion in Frameworks */ = {isa = PBXBuildFile; productRef = 6AAD31142B08693D0035FA69 /* SemanticVersion */; }; @@ -170,6 +171,7 @@ 6A496A722C1AF75600FD637B /* Game.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Game.swift; sourceTree = ""; }; 6A71D3D82BFD01AB00A2C74D /* legendary */ = {isa = PBXFileReference; lastKnownFileType = folder; path = legendary; sourceTree = ""; }; 6A71D3DC2BFD024D00A2C74D /* Auth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Auth.swift; sourceTree = ""; }; + 6A9FE1152CDEED7200C36058 /* WhatsNewCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhatsNewCollection.swift; sourceTree = ""; }; 6AACEF742C18846700258A7E /* exeIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = exeIcon.icns; sourceTree = ""; }; 6AB474952AACBBE900AB9C63 /* Mythic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Mythic.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6AC45E082C1B2FC800ED9F64 /* SettingsFormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsFormView.swift; sourceTree = ""; }; @@ -349,6 +351,7 @@ children = ( 6A2934F02BFCFAFD0035CE4B /* AppDelegate.swift */, 6A2934F62BFCFAFD0035CE4B /* MythicApp.swift */, + 6A9FE1152CDEED7200C36058 /* WhatsNewCollection.swift */, 6A2934EF2BFCFAFD0035CE4B /* Views */, 6A2934CA2BFCFAFD0035CE4B /* Utilities */, 6A2934F12BFCFAFD0035CE4B /* Assets.xcassets */, @@ -614,6 +617,7 @@ 6A29354B2BFCFAFD0035CE4B /* LocalImport.swift in Sources */, 6A29355C2BFCFAFD0035CE4B /* InstallGameView.swift in Sources */, 6A2935432BFCFAFD0035CE4B /* FileLocations.swift in Sources */, + 6A9FE1162CDEED7A00C36058 /* WhatsNewCollection.swift in Sources */, 6A2935402BFCFAFD0035CE4B /* LocalGamesExt.swift in Sources */, 6A2935502BFCFAFD0035CE4B /* HomeView.swift in Sources */, 6AEEFA472CA9174B0025C840 /* WindowBlurView.swift in Sources */, @@ -673,6 +677,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; + EXCLUDED_ARCHS = ""; GCC_C_LANGUAGE_STANDARD = gnu17; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -768,7 +773,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3048; + CURRENT_PROJECT_VERSION = 3054; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\""; @@ -815,7 +820,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3048; + CURRENT_PROJECT_VERSION = 3054; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\""; diff --git a/Mythic/Localizable.xcstrings b/Mythic/Localizable.xcstrings index 7b2be4fe..3f8473d7 100644 --- a/Mythic/Localizable.xcstrings +++ b/Mythic/Localizable.xcstrings @@ -3058,197 +3058,11 @@ }, "%@ \"%@\"..." : { "localizations" : { - "af" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "ar" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "ca" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "cs" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "da" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "de" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "el" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, "en" : { "stringUnit" : { "state" : "new", "value" : "%1$@ \"%2$@\"..." } - }, - "es" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "fi" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "fr" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "he" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "hu" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "id" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "it" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "ja" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "ko" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "mt" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "nl" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "no" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "pl" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "pt-PT" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "ro" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "ru" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "sr" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "sv" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "tr" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "uk" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "vi" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "new", - "value" : "%1$@ \"%2$@\"..." - } } } }, @@ -60383,4 +60197,4 @@ } }, "version" : "1.0" -} \ No newline at end of file +} diff --git a/Mythic/MythicApp.swift b/Mythic/MythicApp.swift index 2bdebf45..42d43fa3 100644 --- a/Mythic/MythicApp.swift +++ b/Mythic/MythicApp.swift @@ -77,7 +77,8 @@ struct MythicApp: App { UserDefaultsWhatsNewVersionStore() #endif }(), - whatsNewCollection: self) + whatsNewCollection: self + ) ) .commands { @@ -104,47 +105,6 @@ struct MythicApp: App { } } -extension MythicApp: WhatsNewCollectionProvider { - var whatsNewCollection: WhatsNewCollection { - WhatsNew( - version: "0.4.1", - title: "What's new in Mythic", - features: [ - .init( - image: .init( - systemName: "ladybug", - foregroundColor: .red - ), - title: "Bug Fixes & Performance Improvements", - subtitle: "Y'know, the usual." - ), - .init( - image: .init( - systemName: "checklist", - foregroundColor: .blue - ), - title: "Optional Pack support", - subtitle: "Epic Games that support selective downloads are now supported for download (e.g. Fortnite)." - ), - .init( - image: .init( - systemName: "cursorarrow.motionlines", - foregroundColor: .accent - ), - title: "More animations", - subtitle: "Added smooth animations and transitions." - ) - ], - primaryAction: .init(), - secondaryAction: .init( - title: "Learn more", - action: .openURL(.init(string: "https://github.com/MythicApp/Mythic/releases/tag/0.4.1")) - ) - ) - } - -} - #Preview { ContentView() .environmentObject(NetworkMonitor()) diff --git a/Mythic/WhatsNewCollection.swift b/Mythic/WhatsNewCollection.swift new file mode 100644 index 00000000..4b8f8415 --- /dev/null +++ b/Mythic/WhatsNewCollection.swift @@ -0,0 +1,89 @@ +// +// WhatsNewCollection.swift +// Mythic +// +// Created by Esiayo Alegbe on 11/9/24. +// + +import WhatsNewKit +import SwiftUI + +extension MythicApp: WhatsNewCollectionProvider { + var whatsNewCollection: WhatsNewCollection { + WhatsNew( + version: "0.4.1", + title: "What's new in Mythic", + features: [ + .init( + image: .init( + systemName: "ladybug", + foregroundColor: .red + ), + title: "Bug Fixes & Performance Improvements", + subtitle: "Y'know, the usual." + ), + .init( + image: .init( + systemName: "checklist", + foregroundColor: .blue + ), + title: "Optional Pack support", + subtitle: "Epic Games that support selective downloads are now supported for download (e.g. Fortnite)." + ), + .init( + image: .init( + systemName: "cursorarrow.motionlines", + foregroundColor: .accent + ), + title: "More animations", + subtitle: "Added smooth animations and transitions." + ) + ], + primaryAction: .init(), + secondaryAction: .init( + title: "Learn more", + action: .openURL(.init(string: "https://github.com/MythicApp/Mythic/releases/tag/0.4.1")) + ) + ) + + WhatsNew( + version: "0.4.2", + title: "What's new in Mythic", + features: [ + .init( + image: .init( + systemName: "ladybug.slash", + foregroundColor: .red + ), + title: "Bugfixes", + subtitle: "Y'know, the usual." + ), + .init( + image: .init( + systemName: "app.badge.checkmark", + foregroundColor: .cyan + ), + title: "Fixed crashes when verifying imported games", + subtitle: "Someone even called it a 'glorified exit button..'" + ), + .init( + image: .init( + systemName: "square.badge.plus.fill", + foregroundColor: .pink + ), + title: "Fixed launch arguments not saving", + subtitle: "Protip: you can use [-nomovie] to skip the intro in Rocket League®." + ) + ], + primaryAction: .init(), + secondaryAction: .init( + title: "Learn more", + action: .openURL(.init(string: "https://github.com/MythicApp/Mythic/releases/tag/0.4.2")) + ) + ) + } +} + +#Preview { + WhatsNewView(whatsNew: MythicApp().whatsNewCollection.last ?? WhatsNew(title: "N/A", features: [])) +}