From 9d24867f49c9d788a2b74ad7586cc3145dd250ef Mon Sep 17 00:00:00 2001 From: leminlimez <59540996+leminlimez@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:36:50 -0400 Subject: [PATCH] add fallback btn + fix find wallpapers button --- .../Controllers/PosterBoardManager.swift | 2 +- Pocket Poster/Views/SettingsView.swift | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Pocket Poster/Controllers/PosterBoardManager.swift b/Pocket Poster/Controllers/PosterBoardManager.swift index 67dbd71..3272058 100644 --- a/Pocket Poster/Controllers/PosterBoardManager.swift +++ b/Pocket Poster/Controllers/PosterBoardManager.swift @@ -10,7 +10,7 @@ import ZIPFoundation import UIKit class PosterBoardManager { - static let ShortcutURL = "https://www.icloud.com/shortcuts/9035ef1d51c247dba8c9861dc10b4aa7" + static let ShortcutURL = "https://www.icloud.com/shortcuts/a28d2c02ca11453cb5b8f91c12cfa692" static let WallpapersURL = "https://cowabun.ga/wallpapers" private static func unzipFile(at url: URL) throws -> URL { diff --git a/Pocket Poster/Views/SettingsView.swift b/Pocket Poster/Views/SettingsView.swift index aeeb250..84aade9 100644 --- a/Pocket Poster/Views/SettingsView.swift +++ b/Pocket Poster/Views/SettingsView.swift @@ -61,14 +61,24 @@ struct SettingsView: View { // MARK: Links Section { - Link(destination: URL(string: PosterBoardManager.ShortcutURL)!) { - Text("Download Shortcut") + if let scURL = URL(string: PosterBoardManager.ShortcutURL) { + Link(destination: scURL) { + Text("Download Shortcut") + } + .buttonStyle(TintedButton(color: .blue, fullwidth: true)) } - .buttonStyle(TintedButton(color: .blue, fullwidth: true)) - Link(destination: URL(string: PosterBoardManager.ShortcutURL)!) { - Text("Find Wallpapers") + if let fbURL = URL(string: "shortcuts://run-shortcut?name=PosterBoard&input=text&text=troubleshoot") { + Link(destination: fbURL) { + Text("Create Fallback Method") + } + .buttonStyle(TintedButton(color: .blue, fullwidth: true)) + } + if let wpURL = URL(string: PosterBoardManager.WallpapersURL) { + Link(destination: wpURL) { + Text("Find Wallpapers") + } + .buttonStyle(TintedButton(color: .blue, fullwidth: true)) } - .buttonStyle(TintedButton(color: .blue, fullwidth: true)) } header: { Text("Links") }