diff --git a/Jel.xcodeproj/project.pbxproj b/Jel.xcodeproj/project.pbxproj index fde37c4..473c177 100644 --- a/Jel.xcodeproj/project.pbxproj +++ b/Jel.xcodeproj/project.pbxproj @@ -28,6 +28,8 @@ 3D74AE122B7D4EB000C17F2E /* UIScreenWidthExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D74AE112B7D4EB000C17F2E /* UIScreenWidthExtension.swift */; }; 3D7709392B29139700199889 /* Pulse in Frameworks */ = {isa = PBXBuildFile; productRef = 3D7709382B29139700199889 /* Pulse */; }; 3D77093B2B29139700199889 /* PulseUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3D77093A2B29139700199889 /* PulseUI */; }; + 3D7E479C2B89A4F4009B44C4 /* LibrariesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D7E479B2B89A4F4009B44C4 /* LibrariesView.swift */; }; + 3D7E479E2B89A945009B44C4 /* LicenseItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D7E479D2B89A945009B44C4 /* LicenseItemView.swift */; }; 3D8AB2A52B36440D005BD7D0 /* BlurHashDecode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8AB2A42B36440D005BD7D0 /* BlurHashDecode.swift */; }; 3D8AB2A82B366353005BD7D0 /* LibraryDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8AB2A72B366353005BD7D0 /* LibraryDetailView.swift */; }; 3D9063CB2B279A310063DD2A /* JelApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9063CA2B279A310063DD2A /* JelApp.swift */; }; @@ -87,6 +89,8 @@ 3D6A0DC02B867B4C001FDA40 /* ScreenSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenSize.swift; sourceTree = ""; }; 3D6A7DB82B7C5D3900A5E31B /* ItemSeasonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemSeasonView.swift; sourceTree = ""; }; 3D74AE112B7D4EB000C17F2E /* UIScreenWidthExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIScreenWidthExtension.swift; sourceTree = ""; }; + 3D7E479B2B89A4F4009B44C4 /* LibrariesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibrariesView.swift; sourceTree = ""; }; + 3D7E479D2B89A945009B44C4 /* LicenseItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseItemView.swift; sourceTree = ""; }; 3D8AB2A42B36440D005BD7D0 /* BlurHashDecode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlurHashDecode.swift; sourceTree = ""; }; 3D8AB2A72B366353005BD7D0 /* LibraryDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryDetailView.swift; sourceTree = ""; }; 3D9063C72B279A310063DD2A /* Jel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Jel.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -301,6 +305,8 @@ isa = PBXGroup; children = ( 3DDD67952B29E28B0026781E /* SettingsView.swift */, + 3D7E479B2B89A4F4009B44C4 /* LibrariesView.swift */, + 3D7E479D2B89A945009B44C4 /* LicenseItemView.swift */, ); path = Settings; sourceTree = ""; @@ -403,6 +409,7 @@ 3DFE7AF92B5264A4005461FE /* ItemPersonDetailView.swift in Sources */, 3DBAC9E42B4C7404005F8764 /* UIScreenCurrent.swift in Sources */, 3D91FDCD2B2907E800919017 /* JellyfinDateFormatter.swift in Sources */, + 3D7E479C2B89A4F4009B44C4 /* LibrariesView.swift in Sources */, 3D58F07E2B4DB19300DB2936 /* TextRatingView.swift in Sources */, 3D6A7DB92B7C5D3900A5E31B /* ItemSeasonView.swift in Sources */, 3D91FDC92B28C62800919017 /* SignInView.swift in Sources */, @@ -423,6 +430,7 @@ 3D91FDCB2B28CA2500919017 /* SignInToServerView.swift in Sources */, 3D4C15722B3CAA670035373E /* DashboardSectionTitleView.swift in Sources */, 3D16FC3C2B2CDFB500E6D8B3 /* DashboardLibraryView.swift in Sources */, + 3D7E479E2B89A945009B44C4 /* LicenseItemView.swift in Sources */, 3D1015E42B28000E00F5C29A /* AuthStateController.swift in Sources */, 3D2552462B7A847700192879 /* ItemSeriesView.swift in Sources */, 3D13F95F2B375DB800E91913 /* ItemView.swift in Sources */, diff --git a/Jel/Views/Item/Series/ItemSeriesEpisodesView.swift b/Jel/Views/Item/Series/ItemSeriesEpisodesView.swift index 17d5c9b..338f8a7 100644 --- a/Jel/Views/Item/Series/ItemSeriesEpisodesView.swift +++ b/Jel/Views/Item/Series/ItemSeriesEpisodesView.swift @@ -10,6 +10,8 @@ import JellyfinKit struct ItemSeriesEpisodesView: View { @EnvironmentObject var jellyfinClient: JellyfinClientController + @EnvironmentObject var size: ScreenSize + @ObservedObject var authState: AuthStateController = AuthStateController.shared var item: BaseItemDto diff --git a/Jel/Views/Settings/LibrariesView.swift b/Jel/Views/Settings/LibrariesView.swift new file mode 100644 index 0000000..6f86a36 --- /dev/null +++ b/Jel/Views/Settings/LibrariesView.swift @@ -0,0 +1,162 @@ +// +// LibrariesView.swift +// Jel +// +// Created by zerocool on 2/23/24. +// + +import SwiftUI + +struct LibrariesView: View { + var body: some View { + VStack { + List { + LicenseItemView( + name: "ExpandableText", + url: "https://github.com/n3d1117/ExpandableText", + license: """ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to +""" + ) + + LicenseItemView( + name: "CreateAPI", + url: "https://github.com/CreateAPI/CreateAPI", + license: """ +MIT License + +Copyright (c) 2022 Alexander Grebenyuk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + ) + + LicenseItemView( + name: "Get", + url: "https://github.com/kean/Get", + license: """ +MIT License + +Copyright (c) 2021-2022 Alexander Grebenyuk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + ) + + LicenseItemView( + name: "Nuke", + url: "https://github.com/kean/Nuke", + license: """ +The MIT License (MIT) + +Copyright (c) 2015-2024 Alexander Grebenyuk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + ) + + LicenseItemView( + name: "Pulse", + url: "https://github.com/kean/Pulse", + license: """ +Copyright (c) 2020-2021 Alexander Grebenyuk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + ) + } + } + .navigationTitle("Acknowledgements") + } +} + +//#Preview { +// LibrariesView() +//} diff --git a/Jel/Views/Settings/LicenseItemView.swift b/Jel/Views/Settings/LicenseItemView.swift new file mode 100644 index 0000000..d7dca79 --- /dev/null +++ b/Jel/Views/Settings/LicenseItemView.swift @@ -0,0 +1,28 @@ +// +// LicenseItemView.swift +// Jel +// +// Created by zerocool on 2/23/24. +// + +import SwiftUI +import ExpandableText + +struct LicenseItemView: View { + var name: String + var url: String + var license: String + + var body: some View { + VStack(alignment: .leading) { + Link(name, destination: URL(string: url)!) + + ExpandableText(license) + .multilineTextAlignment(.leading) + } + } +} + +//#Preview { +// LicenseItemView() +//} diff --git a/Jel/Views/Settings/SettingsView.swift b/Jel/Views/Settings/SettingsView.swift index 8cd5a8a..8c582de 100644 --- a/Jel/Views/Settings/SettingsView.swift +++ b/Jel/Views/Settings/SettingsView.swift @@ -57,6 +57,14 @@ struct SettingsView: View { } header: { Text("Debug") } + + Section() { + NavigationLink { + LibrariesView() + } label: { + Text("Acknowledgements") + } + } } .navigationTitle("Settings") .toolbar { diff --git a/TODO.txt b/TODO.txt index a2f41e4..b58df81 100644 --- a/TODO.txt +++ b/TODO.txt @@ -8,3 +8,4 @@ DONE - Use Color.seondaryLabel for gray text - Fix text wrapping on ItemPersonIconView +- License page