diff --git a/Shared/Extensions/Color.swift b/Shared/Extensions/Color.swift index 66e0db53e..a8940949d 100644 --- a/Shared/Extensions/Color.swift +++ b/Shared/Extensions/Color.swift @@ -8,19 +8,16 @@ import SwiftUI -// TODO: add all other missing colors from UIColor and fix usages -// - move row dividers to divider color - extension Color { - static let jellyfinPurple = Color(uiColor: .jellyfinPurple) + static let jellyfinPurple = Color(red: 172 / 255, green: 92 / 255, blue: 195 / 255, opacity: 1) var uiColor: UIColor { UIColor(self) } var overlayColor: Color { - Color(uiColor: uiColor.overlayColor) + Color(uiColor: uiColor.overlayColor) // TODO: move from UIColor } // TODO: Correct and add colors diff --git a/Shared/Extensions/JellyfinAPI/ItemFilter+ItemTrait.swift b/Shared/Extensions/JellyfinAPI/ItemFilter+ItemTrait.swift index a361200cd..f9a32404d 100644 --- a/Shared/Extensions/JellyfinAPI/ItemFilter+ItemTrait.swift +++ b/Shared/Extensions/JellyfinAPI/ItemFilter+ItemTrait.swift @@ -26,17 +26,16 @@ extension ItemTrait: ItemFilter { } extension ItemTrait: Displayable { - // TODO: Localize var displayTitle: String { switch self { case .isUnplayed: - return "Unplayed" + return L10n.unplayed case .isPlayed: - return "Played" + return L10n.played case .isFavorite: - return "Favorites" + return L10n.favorites case .likes: - return "Liked Items" + return L10n.likedItems default: return "" } diff --git a/Shared/Extensions/UIColor.swift b/Shared/Extensions/UIColor.swift index 414f37eea..a41a6f4ea 100644 --- a/Shared/Extensions/UIColor.swift +++ b/Shared/Extensions/UIColor.swift @@ -9,9 +9,6 @@ import UIKit extension UIColor { - - static let jellyfinPurple = UIColor(red: 172 / 255, green: 92 / 255, blue: 195 / 255, alpha: 1) - var overlayColor: UIColor { var red: CGFloat = 0 var green: CGFloat = 0 diff --git a/Shared/Extensions/ViewExtensions/ViewExtensions.swift b/Shared/Extensions/ViewExtensions/ViewExtensions.swift index bbaebcb24..c56a1e9e4 100644 --- a/Shared/Extensions/ViewExtensions/ViewExtensions.swift +++ b/Shared/Extensions/ViewExtensions/ViewExtensions.swift @@ -131,12 +131,6 @@ extension View { }) } - // TODO: remove - @inlinable - func padding2(_ edges: Edge.Set = .all) -> some View { - padding(edges).padding(edges) - } - func scrollViewOffset(_ scrollViewOffset: Binding) -> some View { modifier(ScrollViewOffsetModifier(scrollViewOffset: scrollViewOffset)) } diff --git a/Shared/Strings/Strings.swift b/Shared/Strings/Strings.swift index 6af95ad21..2d948d4e3 100644 --- a/Shared/Strings/Strings.swift +++ b/Shared/Strings/Strings.swift @@ -464,6 +464,8 @@ internal enum L10n { internal static let library = L10n.tr("Localizable", "library", fallback: "Library") /// Represents the light theme setting internal static let light = L10n.tr("Localizable", "light", fallback: "Light") + /// Liked Items + internal static let likedItems = L10n.tr("Localizable", "likedItems", fallback: "Liked Items") /// List internal static let list = L10n.tr("Localizable", "list", fallback: "List") /// Live TV @@ -658,12 +660,12 @@ internal enum L10n { internal static let quickConnectInvalidError = L10n.tr("Localizable", "quickConnectInvalidError", fallback: "Invalid Quick Connect code") /// Note: Quick Connect not enabled internal static let quickConnectNotEnabled = L10n.tr("Localizable", "quickConnectNotEnabled", fallback: "Note: Quick Connect not enabled") - /// 1. Open the Jellyfin app on your phone or web browser and sign in with your account - internal static let quickConnectStep1 = L10n.tr("Localizable", "quickConnectStep1", fallback: "1. Open the Jellyfin app on your phone or web browser and sign in with your account") - /// 2. Open the user menu and go to the Quick Connect page - internal static let quickConnectStep2 = L10n.tr("Localizable", "quickConnectStep2", fallback: "2. Open the user menu and go to the Quick Connect page") - /// 3. Enter the following code: - internal static let quickConnectStep3 = L10n.tr("Localizable", "quickConnectStep3", fallback: "3. Enter the following code:") + /// Open the Jellyfin app on your phone or web browser and sign in with your account + internal static let quickConnectStep1 = L10n.tr("Localizable", "quickConnectStep1", fallback: "Open the Jellyfin app on your phone or web browser and sign in with your account") + /// Open the user menu and go to the Quick Connect page + internal static let quickConnectStep2 = L10n.tr("Localizable", "quickConnectStep2", fallback: "Open the user menu and go to the Quick Connect page") + /// Enter the following code: + internal static let quickConnectStep3 = L10n.tr("Localizable", "quickConnectStep3", fallback: "Enter the following code:") /// Authorizing Quick Connect successful. Please continue on your other device. internal static let quickConnectSuccessMessage = L10n.tr("Localizable", "quickConnectSuccessMessage", fallback: "Authorizing Quick Connect successful. Please continue on your other device.") /// Random diff --git a/Swiftfin tvOS/Views/ItemView/Components/AboutView/Components/AboutViewCard.swift b/Swiftfin tvOS/Views/ItemView/Components/AboutView/Components/AboutViewCard.swift index 362742bbf..8c1cb7e2f 100644 --- a/Swiftfin tvOS/Views/ItemView/Components/AboutView/Components/AboutViewCard.swift +++ b/Swiftfin tvOS/Views/ItemView/Components/AboutView/Components/AboutViewCard.swift @@ -38,7 +38,7 @@ extension ItemView.AboutView { content() .eraseToAnyView() } - .padding2() + .padding() .frame(width: 700, height: 405) } .buttonStyle(.card) diff --git a/Swiftfin tvOS/Views/MediaSourceInfoView.swift b/Swiftfin tvOS/Views/MediaSourceInfoView.swift index 1565f574c..d449c996a 100644 --- a/Swiftfin tvOS/Views/MediaSourceInfoView.swift +++ b/Swiftfin tvOS/Views/MediaSourceInfoView.swift @@ -106,7 +106,7 @@ struct MediaSourceInfoView: View { } } } - .padding2(.horizontal) + .padding(.horizontal) } .frame(maxWidth: .infinity) } diff --git a/Swiftfin tvOS/Views/QuickConnectView.swift b/Swiftfin tvOS/Views/QuickConnectView.swift index a573eaf55..c2d609079 100644 --- a/Swiftfin tvOS/Views/QuickConnectView.swift +++ b/Swiftfin tvOS/Views/QuickConnectView.swift @@ -25,17 +25,14 @@ struct QuickConnectView: View { private func pollingView(code: String) -> some View { VStack(alignment: .leading, spacing: 20) { - - // TODO: change strings so that numbers are removed - // and use `BulletedList` - // - also probably rephrase/change steps - - L10n.quickConnectStep1.text - - L10n.quickConnectStep2.text - - L10n.quickConnectStep3.text - .padding(.bottom) + BulletedList { + L10n.quickConnectStep1.text + .padding(.bottom) + L10n.quickConnectStep2.text + .padding(.bottom) + L10n.quickConnectStep3.text + .padding(.bottom) + } Text(code) .tracking(10) diff --git a/Swiftfin tvOS/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift b/Swiftfin tvOS/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift index 0c353ca6b..86843a5a0 100644 --- a/Swiftfin tvOS/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift +++ b/Swiftfin tvOS/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift @@ -34,8 +34,8 @@ extension LiveVideoPlayer { Spacer() Overlay.LiveBottomBarView() - .padding2() - .padding2() + .padding() + .padding() .background { LinearGradient( stops: [ diff --git a/Swiftfin tvOS/Views/VideoPlayer/Overlays/ChapterOverlay.swift b/Swiftfin tvOS/Views/VideoPlayer/Overlays/ChapterOverlay.swift index 8ed274768..76a036fad 100644 --- a/Swiftfin tvOS/Views/VideoPlayer/Overlays/ChapterOverlay.swift +++ b/Swiftfin tvOS/Views/VideoPlayer/Overlays/ChapterOverlay.swift @@ -44,8 +44,8 @@ extension VideoPlayer { Spacer() } - .padding2() - .padding2() + .padding() + .padding() ScrollViewReader { proxy in ScrollView(.horizontal) { @@ -90,8 +90,8 @@ extension VideoPlayer { } } } - .padding2() - .padding2(.horizontal) + .padding() + .padding(.horizontal) } .onChange(of: currentOverlayType) { _, newValue in guard newValue == .chapters else { return } diff --git a/Swiftfin tvOS/Views/VideoPlayer/Overlays/MainOverlay.swift b/Swiftfin tvOS/Views/VideoPlayer/Overlays/MainOverlay.swift index d8d39e9f4..007277e20 100644 --- a/Swiftfin tvOS/Views/VideoPlayer/Overlays/MainOverlay.swift +++ b/Swiftfin tvOS/Views/VideoPlayer/Overlays/MainOverlay.swift @@ -34,8 +34,8 @@ extension VideoPlayer { Spacer() VideoPlayer.Overlay.BottomBarView() - .padding2() - .padding2() + .padding() + .padding() .background { LinearGradient( stops: [ diff --git a/Swiftfin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Swiftfin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 1cae69ae5..7cc252021 100644 --- a/Swiftfin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Swiftfin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "323b2ad9aaa9c000faf264d68272f0e9fab1349d9f910a0b95ee6aea10460f31", + "originHash" : "651194fc1966b57201a0de2cba27dc40798bbdf515febdc83f00d634d916fea4", "pins" : [ { "identity" : "blurhashkit", @@ -132,8 +132,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/kean/Pulse", "state" : { - "revision" : "d1e39ffaaa8b8becff80cb193c93a78e32077af8", - "version" : "4.2.0" + "revision" : "3ac5ee35ab233e900aa484919803d51791d1e351", + "version" : "4.2.7" } }, { diff --git a/Swiftfin/Views/QuickConnectView.swift b/Swiftfin/Views/QuickConnectView.swift index dd9bee30e..0260de765 100644 --- a/Swiftfin/Views/QuickConnectView.swift +++ b/Swiftfin/Views/QuickConnectView.swift @@ -23,17 +23,14 @@ struct QuickConnectView: View { private func pollingView(code: String) -> some View { VStack(alignment: .leading, spacing: 20) { - - // TODO: change strings so that numbers are removed - // and use `BulletedList` - // - also probably rephrase/change steps - - L10n.quickConnectStep1.text - - L10n.quickConnectStep2.text - - L10n.quickConnectStep3.text - .padding(.bottom) + BulletedList { + L10n.quickConnectStep1.text + .padding(.bottom) + L10n.quickConnectStep2.text + .padding(.bottom) + L10n.quickConnectStep3.text + .padding(.bottom) + } Text(code) .tracking(10) diff --git a/Swiftfin/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift b/Swiftfin/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift index 7cc44e7d5..ca54557f2 100644 --- a/Swiftfin/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift +++ b/Swiftfin/Views/VideoPlayer/LiveOverlays/LiveMainOverlay.swift @@ -43,8 +43,7 @@ extension LiveVideoPlayer { .padding(.trailing, splitContentViewProxy.isPresentingSplitView ? 0 : safeAreaInsets.trailing) } .if(UIDevice.isPad) { view in - view.padding(.top) - .padding2(.horizontal) + view.padding() } .background { LinearGradient( @@ -68,8 +67,7 @@ extension LiveVideoPlayer { .padding(.trailing, splitContentViewProxy.isPresentingSplitView ? 0 : safeAreaInsets.trailing) } .if(UIDevice.isPad) { view in - view.padding2(.bottom) - .padding2(.horizontal) + view.padding() } .background { LinearGradient( diff --git a/Swiftfin/Views/VideoPlayer/Overlays/MainOverlay.swift b/Swiftfin/Views/VideoPlayer/Overlays/MainOverlay.swift index e43fbc301..585d24c06 100644 --- a/Swiftfin/Views/VideoPlayer/Overlays/MainOverlay.swift +++ b/Swiftfin/Views/VideoPlayer/Overlays/MainOverlay.swift @@ -44,7 +44,7 @@ extension VideoPlayer { } .if(UIDevice.isPad) { view in view.padding(.top) - .padding2(.horizontal) + .padding(.horizontal) } .background { LinearGradient( @@ -68,8 +68,8 @@ extension VideoPlayer { .padding(.trailing, splitContentViewProxy.isPresentingSplitView ? 0 : safeAreaInsets.trailing) } .if(UIDevice.isPad) { view in - view.padding2(.bottom) - .padding2(.horizontal) + view.padding(.bottom) + .padding(.horizontal) } .background { LinearGradient( diff --git a/Translations/en.lproj/Localizable.strings b/Translations/en.lproj/Localizable.strings index 4dd50f81a..c2c5dffee 100644 --- a/Translations/en.lproj/Localizable.strings +++ b/Translations/en.lproj/Localizable.strings @@ -231,9 +231,9 @@ "quickConnectInvalidError" = "Invalid Quick Connect code"; "quickConnectSuccessMessage" = "Authorizing Quick Connect successful. Please continue on your other device."; "showChaptersInfoInBottomOverlay" = "Show Chapters Info In Bottom Overlay"; -"quickConnectStep1" = "1. Open the Jellyfin app on your phone or web browser and sign in with your account"; -"quickConnectStep2" = "2. Open the user menu and go to the Quick Connect page"; -"quickConnectStep3" = "3. Enter the following code:"; +"quickConnectStep1" = "Open the Jellyfin app on your phone or web browser and sign in with your account"; +"quickConnectStep2" = "Open the user menu and go to the Quick Connect page"; +"quickConnectStep3" = "Enter the following code:"; "quickConnectNotEnabled" = "Note: Quick Connect not enabled"; "episodeNumber" = "Episode %1$@"; "compactPoster" = "Compact Poster"; @@ -278,6 +278,7 @@ "grid" = "Grid"; "list" = "List"; "logs" = "Logs"; +"likedItems" = "Liked Items"; "onNow" = "On Now"; "sports" = "Sports";