Convert Contributors, Translators, Acknowledgements to macOS-native helpers

This commit is contained in:
Arkadiusz Fal
2026-04-21 02:41:15 +02:00
parent 07a1e0f81d
commit 7ff889c132
3 changed files with 14 additions and 12 deletions

View File

@@ -11,13 +11,11 @@ struct AcknowledgementsView: View {
@Environment(\.openURL) private var openURL @Environment(\.openURL) private var openURL
var body: some View { var body: some View {
Form { SettingsFormContainer {
Section { SettingsFormSection("settings.acknowledgements.dependencies.header") {
dependencyLink("mpv", url: "https://github.com/mpv-player/mpv") dependencyLink("mpv", url: "https://github.com/mpv-player/mpv")
dependencyLink("MPVKit", url: "https://github.com/mpvkit/MPVKit") dependencyLink("MPVKit", url: "https://github.com/mpvkit/MPVKit")
dependencyLink("Nuke", url: "https://github.com/kean/Nuke") dependencyLink("Nuke", url: "https://github.com/kean/Nuke")
} header: {
Text(String(localized: "settings.acknowledgements.dependencies.header"))
} }
} }
.navigationTitle(String(localized: "settings.acknowledgements.title")) .navigationTitle(String(localized: "settings.acknowledgements.title"))
@@ -42,7 +40,11 @@ struct AcknowledgementsView: View {
Image(systemName: "arrow.up.right") Image(systemName: "arrow.up.right")
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
} }
.contentShape(Rectangle())
} }
#if os(macOS)
.buttonStyle(.plain)
#endif
#endif #endif
} }
} }

View File

@@ -54,13 +54,11 @@ struct ContributorsView: View {
} }
private var contributorsList: some View { private var contributorsList: some View {
Form { SettingsFormContainer {
Section { SettingsFormSection(footer: "settings.contributors.section.footer") {
ForEach(contributors) { contributor in ForEach(contributors) { contributor in
contributorRow(contributor) contributorRow(contributor)
} }
} footer: {
Text(String(localized: "settings.contributors.section.footer"))
} }
} }
} }
@@ -112,7 +110,11 @@ struct ContributorsView: View {
Image(systemName: "arrow.up.right") Image(systemName: "arrow.up.right")
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
} }
.contentShape(Rectangle())
} }
#if os(macOS)
.buttonStyle(.plain)
#endif
} }
// MARK: - Data Loading // MARK: - Data Loading

View File

@@ -37,13 +37,11 @@ struct TranslationContributorsView: View {
} }
private var contributorsList: some View { private var contributorsList: some View {
Form { SettingsFormContainer {
Section { SettingsFormSection(footer: "settings.translators.section.footer") {
ForEach(contributors) { contributor in ForEach(contributors) { contributor in
contributorRow(contributor) contributorRow(contributor)
} }
} footer: {
Text(String(localized: "settings.translators.section.footer"))
} }
} }
} }