diff --git a/Shared/Assets.xcassets/Discord.imageset/Contents.json b/Shared/Assets.xcassets/Discord.imageset/Contents.json new file mode 100644 index 00000000..b60726aa --- /dev/null +++ b/Shared/Assets.xcassets/Discord.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Discord-595b40b85ba036ed117dcf61 1.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Shared/Assets.xcassets/Discord.imageset/Discord-595b40b85ba036ed117dcf61 1.svg b/Shared/Assets.xcassets/Discord.imageset/Discord-595b40b85ba036ed117dcf61 1.svg new file mode 100644 index 00000000..f311ee99 --- /dev/null +++ b/Shared/Assets.xcassets/Discord.imageset/Discord-595b40b85ba036ed117dcf61 1.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Shared/Assets.xcassets/Matrix.imageset/Contents.json b/Shared/Assets.xcassets/Matrix.imageset/Contents.json new file mode 100644 index 00000000..3d5e93b8 --- /dev/null +++ b/Shared/Assets.xcassets/Matrix.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Matrix (protocol) logo.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Shared/Assets.xcassets/Matrix.imageset/Matrix (protocol) logo.svg b/Shared/Assets.xcassets/Matrix.imageset/Matrix (protocol) logo.svg new file mode 100644 index 00000000..907f5f2d --- /dev/null +++ b/Shared/Assets.xcassets/Matrix.imageset/Matrix (protocol) logo.svg @@ -0,0 +1,9 @@ + + + Matrix (protocol) logo + + + + + + \ No newline at end of file diff --git a/Shared/Settings/Help.swift b/Shared/Settings/Help.swift index aef68950..20699e58 100644 --- a/Shared/Settings/Help.swift +++ b/Shared/Settings/Help.swift @@ -3,7 +3,8 @@ import SwiftUI struct Help: View { static let wikiURL = URL(string: "https://github.com/yattee/yattee/wiki")! - static let matrixURL = URL(string: "https://tinyurl.com/yattee-matrix")! + static let matrixURL = URL(string: "https://tinyurl.com/matrix-yattee")! + static let discordURL = URL(string: "https://yattee.stream/discord")! static let issuesURL = URL(string: "https://github.com/yattee/yattee/issues")! static let milestonesURL = URL(string: "https://github.com/yattee/yattee/milestones")! static let donationsURL = URL(string: "https://github.com/yattee/yattee/wiki/Donations")! @@ -30,9 +31,11 @@ struct Help: View { Section { header("I want to ask a question") - Text("Discussions take place in Matrix chat channel. It's a good spot for general questions.") + Text("Discussions take place in Discord and Matrix. It's a good spot for general questions.") .padding(.bottom, 8) + helpItemLink("Discord Server", url: Self.discordURL, systemImage: "message") + .padding(.bottom, 8) helpItemLink("Matrix Channel", url: Self.matrixURL, systemImage: "message") .padding(.bottom, 8) } diff --git a/Shared/Settings/SettingsView.swift b/Shared/Settings/SettingsView.swift index 57252d00..ef9d66ef 100644 --- a/Shared/Settings/SettingsView.swift +++ b/Shared/Settings/SettingsView.swift @@ -3,6 +3,9 @@ import Foundation import SwiftUI struct SettingsView: View { + static let matrixURL = URL(string: "https://tinyurl.com/matrix-yattee")! + static let discordURL = URL(string: "https://yattee.stream/discord")! + #if os(macOS) private enum Tabs: Hashable { case locations, browsing, player, history, sponsorBlock, advanced, help @@ -158,13 +161,38 @@ struct SettingsView: View { } } - Section(footer: versionString) { + Section { NavigationLink { Help() } label: { Label("Help", systemImage: "questionmark.circle") } } + + #if !os(tvOS) + Section(header: Text("Contact"), footer: versionString) { + Link(destination: Self.discordURL) { + HStack { + Image("Discord") + .resizable() + .renderingMode(.template) + .frame(maxWidth: 30, maxHeight: 30) + + Text("Discord Server") + } + } + + Link(destination: Self.matrixURL) { + HStack { + Image("Matrix") + .resizable() + .renderingMode(.template) + .frame(maxWidth: 30, maxHeight: 30) + Text("Matrix Chat") + } + } + } + #endif } .navigationTitle("Settings") .toolbar { @@ -200,7 +228,7 @@ struct SettingsView: View { case .advanced: return 300 case .help: - return 570 + return 600 } } #endif