add links to settings page
This commit is contained in:
1 parent
0c569562c9
commit
e1089d39d5
4 files changed
+23
-4
No files matched your search
@@ -10,6 +10,9 @@ import ZIPFoundation
|
||||
import UIKit
|
||||
|
||||
class PosterBoardManager {
|
||||
static let ShortcutURL = "https://www.icloud.com/shortcuts/9035ef1d51c247dba8c9861dc10b4aa7"
|
||||
static let WallpapersURL = "https://cowabun.ga/wallpapers"
|
||||
|
||||
private static func unzipFile(at url: URL) throws -> URL {
|
||||
let fileName = url.deletingPathExtension().lastPathComponent
|
||||
let fileData = try Data(contentsOf: url)
|
||||
|
||||
@@ -37,7 +37,7 @@ let onBoardingCards: [OnBoardingPage] = [
|
||||
title: "Install the Shortcut",
|
||||
description: "To apply, you will need a shortcut that opens PosterBoard.",
|
||||
image: "Shortcuts",
|
||||
link: URL(string: "https://www.icloud.com/shortcuts/9035ef1d51c247dba8c9861dc10b4aa7"),
|
||||
link: URL(string: PosterBoardManager.ShortcutURL),
|
||||
linkName: "Get Shortcut"
|
||||
),
|
||||
.init(
|
||||
@@ -51,7 +51,7 @@ let onBoardingCards: [OnBoardingPage] = [
|
||||
title: "Enjoy!",
|
||||
description: "You can find wallpapers on the official Cowabun.ga website.",
|
||||
image: "Cowabunga",
|
||||
link: URL(string: "https://cowabun.ga/wallpapers"),
|
||||
link: URL(string: PosterBoardManager.WallpapersURL),
|
||||
linkName: "Find Wallpapers"
|
||||
)
|
||||
]
|
||||
@@ -58,6 +58,22 @@ struct SettingsView: View {
|
||||
}
|
||||
.buttonStyle(TintedButton(color: .red, fullwidth: true))
|
||||
}
|
||||
|
||||
// MARK: Links
|
||||
Section {
|
||||
Link(destination: URL(string: PosterBoardManager.ShortcutURL)!) {
|
||||
Text("Download Shortcut")
|
||||
}
|
||||
.buttonStyle(TintedButton(color: .blue, fullwidth: true))
|
||||
Link(destination: URL(string: PosterBoardManager.ShortcutURL)!) {
|
||||
Text("Find Wallpapers")
|
||||
}
|
||||
.buttonStyle(TintedButton(color: .blue, fullwidth: true))
|
||||
} header: {
|
||||
Text("Links")
|
||||
}
|
||||
|
||||
// TODO: Credits
|
||||
}
|
||||
.padding()
|
||||
.alert(errorAlertTitle ?? "Error", isPresented: $showErrorAlert) {
|
||||
|
||||
Reference in new issue
Block a user