diff --git a/Shared/Coordinators/SettingsCoordinator.swift b/Shared/Coordinators/SettingsCoordinator.swift index 6c1e101a..5382cbc0 100644 --- a/Shared/Coordinators/SettingsCoordinator.swift +++ b/Shared/Coordinators/SettingsCoordinator.swift @@ -26,8 +26,8 @@ final class SettingsCoordinator: NavigationCoordinatable { var customizeViewsSettings = makeCustomizeViewsSettings @Route(.push) var missingSettings = makeMissingSettings - @Route(.push) - var about = makeAbout + @Route(.push) + var about = makeAbout @ViewBuilder func makeServerDetail() -> some View { @@ -54,11 +54,11 @@ final class SettingsCoordinator: NavigationCoordinatable { func makeMissingSettings() -> some View { MissingItemsSettingsView() } - - @ViewBuilder - func makeAbout() -> some View { - AboutView() - } + + @ViewBuilder + func makeAbout() -> some View { + AboutView() + } @ViewBuilder func makeStart() -> some View { diff --git a/Shared/Extensions/BundleExtensions.swift b/Shared/Extensions/BundleExtensions.swift index 16380fb6..d6b8916e 100644 --- a/Shared/Extensions/BundleExtensions.swift +++ b/Shared/Extensions/BundleExtensions.swift @@ -9,12 +9,12 @@ import Foundation extension Bundle { - var iconFileName: String? { - guard let icons = infoDictionary?["CFBundleIcons"] as? [String: Any], - let primaryIcon = icons["CFBundlePrimaryIcon"] as? [String: Any], - let iconFiles = primaryIcon["CFBundleIconFiles"] as? [String], - let iconFileName = iconFiles.last - else { return nil } - return iconFileName - } + var iconFileName: String? { + guard let icons = infoDictionary?["CFBundleIcons"] as? [String: Any], + let primaryIcon = icons["CFBundlePrimaryIcon"] as? [String: Any], + let iconFiles = primaryIcon["CFBundleIconFiles"] as? [String], + let iconFileName = iconFiles.last + else { return nil } + return iconFileName + } } diff --git a/Shared/Extensions/UIApplicationExtensions.swift b/Shared/Extensions/UIApplicationExtensions.swift index f3c93f2d..7601aac2 100644 --- a/Shared/Extensions/UIApplicationExtensions.swift +++ b/Shared/Extensions/UIApplicationExtensions.swift @@ -9,11 +9,11 @@ import UIKit extension UIApplication { - static var appVersion: String? { - return Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String - } - - static var bundleVersion: String? { - return Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String - } + static var appVersion: String? { + Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String + } + + static var bundleVersion: String? { + Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String + } } diff --git a/Swiftfin tvOS/Views/AboutView.swift b/Swiftfin tvOS/Views/AboutView.swift index 4b764aad..4e1bbf6a 100644 --- a/Swiftfin tvOS/Views/AboutView.swift +++ b/Swiftfin tvOS/Views/AboutView.swift @@ -9,8 +9,8 @@ import SwiftUI struct AboutView: View { - - var body: some View { - Text("dud") - } + + var body: some View { + Text("dud") + } } diff --git a/Swiftfin tvOS/Views/SettingsView/SettingsView.swift b/Swiftfin tvOS/Views/SettingsView/SettingsView.swift index 839b711d..6e8fb2e4 100644 --- a/Swiftfin tvOS/Views/SettingsView/SettingsView.swift +++ b/Swiftfin tvOS/Views/SettingsView/SettingsView.swift @@ -159,15 +159,15 @@ struct SettingsView: View { } } } - - Button {} label: { - HStack { - Text("Version") - Spacer() - Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))") - .foregroundColor(.secondary) - } - } + + Button {} label: { + HStack { + Text("Version") + Spacer() + Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))") + .foregroundColor(.secondary) + } + } } } } diff --git a/Swiftfin/Components/AppIcon.swift b/Swiftfin/Components/AppIcon.swift index b72eb577..67194ddb 100644 --- a/Swiftfin/Components/AppIcon.swift +++ b/Swiftfin/Components/AppIcon.swift @@ -9,9 +9,9 @@ import SwiftUI struct AppIcon: View { - var body: some View { - Bundle.main.iconFileName - .flatMap { UIImage(named: $0) } - .map { Image(uiImage: $0).resizable() } - } + var body: some View { + Bundle.main.iconFileName + .flatMap { UIImage(named: $0) } + .map { Image(uiImage: $0).resizable() } + } } diff --git a/Swiftfin/Views/AboutView.swift b/Swiftfin/Views/AboutView.swift index fea72ea9..f2fec306 100644 --- a/Swiftfin/Views/AboutView.swift +++ b/Swiftfin/Views/AboutView.swift @@ -9,77 +9,77 @@ import SwiftUI struct AboutView: View { - - var body: some View { - List { - Section { - HStack { - Spacer() - - VStack(alignment: .center) { - AppIcon() - .cornerRadius(11) - .frame(width: 150, height: 150) - - Text("Swiftfin") - .fontWeight(.semibold) - .font(.title2) - } - - Spacer() - } - .listRowBackground(Color.clear) - } - - Section { - - HStack { - Text("Version") - Spacer() - Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))") - .foregroundColor(.secondary) - } - - HStack { - Image("github-logo") - .renderingMode(.template) - .resizable() - .frame(width: 20, height: 20) - .foregroundColor(.primary) - Link("Source Code", - destination: URL(string: "https://github.com/jellyfin/Swiftfin")!) - .foregroundColor(.primary) - - Spacer() - - Image(systemName: "chevron.right") - .foregroundColor(.secondary) - } - - HStack { - Image(systemName: "plus.circle.fill") - Link("Request a Feature", - destination: URL(string: "https://github.com/jellyfin/Swiftfin/issues")!) - .foregroundColor(.primary) - - Spacer() - Image(systemName: "chevron.right") - .foregroundColor(.secondary) - } - - HStack { - Image(systemName: "xmark.circle.fill") - Link("Report an Issue", - destination: URL(string: "https://github.com/jellyfin/Swiftfin/issues")!) - .foregroundColor(.primary) - - Spacer() + var body: some View { + List { + Section { + HStack { + Spacer() - Image(systemName: "chevron.right") - .foregroundColor(.secondary) - } - } - } - } + VStack(alignment: .center) { + AppIcon() + .cornerRadius(11) + .frame(width: 150, height: 150) + + Text("Swiftfin") + .fontWeight(.semibold) + .font(.title2) + } + + Spacer() + } + .listRowBackground(Color.clear) + } + + Section { + + HStack { + Text("Version") + Spacer() + Text("\(UIApplication.appVersion ?? "--") (\(UIApplication.bundleVersion ?? "--"))") + .foregroundColor(.secondary) + } + + HStack { + Image("github-logo") + .renderingMode(.template) + .resizable() + .frame(width: 20, height: 20) + .foregroundColor(.primary) + Link("Source Code", + destination: URL(string: "https://github.com/jellyfin/Swiftfin")!) + .foregroundColor(.primary) + + Spacer() + + Image(systemName: "chevron.right") + .foregroundColor(.secondary) + } + + HStack { + Image(systemName: "plus.circle.fill") + Link("Request a Feature", + destination: URL(string: "https://github.com/jellyfin/Swiftfin/issues")!) + .foregroundColor(.primary) + + Spacer() + + Image(systemName: "chevron.right") + .foregroundColor(.secondary) + } + + HStack { + Image(systemName: "xmark.circle.fill") + Link("Report an Issue", + destination: URL(string: "https://github.com/jellyfin/Swiftfin/issues")!) + .foregroundColor(.primary) + + Spacer() + + Image(systemName: "chevron.right") + .foregroundColor(.secondary) + } + } + } + } } diff --git a/Swiftfin/Views/SettingsView/SettingsView.swift b/Swiftfin/Views/SettingsView/SettingsView.swift index b4d56b4b..81e2ebdc 100644 --- a/Swiftfin/Views/SettingsView/SettingsView.swift +++ b/Swiftfin/Views/SettingsView/SettingsView.swift @@ -168,17 +168,17 @@ struct SettingsView: View { } } } - - Button { - settingsRouter.route(to: \.about) - } label: { - HStack { - Text("About") - .foregroundColor(.primary) - Spacer() - Image(systemName: "chevron.right") - } - } + + Button { + settingsRouter.route(to: \.about) + } label: { + HStack { + Text("About") + .foregroundColor(.primary) + Spacer() + Image(systemName: "chevron.right") + } + } } .navigationBarTitle(L10n.settings, displayMode: .inline) .toolbar {