From 100acf5fb01c9ba9795e292b810c34e31ddbb220 Mon Sep 17 00:00:00 2001 From: uniplanck <198168437+uniplanck@users.noreply.github.com> Date: Tue, 9 Jun 2026 11:57:50 +0900 Subject: [PATCH] Harden Board-Man upgrade CTA --- Board-Man.xcodeproj/project.pbxproj | 4 ++++ .../CPYPreferencesWindowController.swift | 2 +- .../CPYBetaPreferenceViewController.swift | 2 +- .../Services/BoardManUpgradeRoute.swift | 21 +++++++++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 Clipy/Sources/Services/BoardManUpgradeRoute.swift diff --git a/Board-Man.xcodeproj/project.pbxproj b/Board-Man.xcodeproj/project.pbxproj index 3edf6cc..b575cee 100644 --- a/Board-Man.xcodeproj/project.pbxproj +++ b/Board-Man.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ C5F1B7331FF74A2D00D2DA83 /* NSPasteboard+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5F1B7321FF74A2D00D2DA83 /* NSPasteboard+Deprecated.swift */; }; FA08EDF81D1FED7D000D1D13 /* HotKeyServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA08EDF71D1FED7D000D1D13 /* HotKeyServiceTests.swift */; }; FA0D5CE81DDCC61600AC9052 /* ClipService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D5CE71DDCC61600AC9052 /* ClipService.swift */; }; + FA0D5CFA1DDCC61600AC9052 /* BoardManUpgradeRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D5CF91DDCC61600AC9052 /* BoardManUpgradeRoute.swift */; }; FA0D5CEE1DDCC61600AC9052 /* Entitlement.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D5CED1DDCC61600AC9052 /* Entitlement.swift */; }; FA0D5CF61DDCC61600AC9052 /* LicenseActivationClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D5CF51DDCC61600AC9052 /* LicenseActivationClient.swift */; }; FA0D5CF01DDCC61600AC9052 /* LocalDeviceIdentityService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D5CEF1DDCC61600AC9052 /* LocalDeviceIdentityService.swift */; }; @@ -155,6 +156,7 @@ C576AD7B2FBD345000B71213 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; C5F1B7321FF74A2D00D2DA83 /* NSPasteboard+Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSPasteboard+Deprecated.swift"; sourceTree = ""; }; FA08EDF71D1FED7D000D1D13 /* HotKeyServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HotKeyServiceTests.swift; sourceTree = ""; }; + FA0D5CF91DDCC61600AC9052 /* BoardManUpgradeRoute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BoardManUpgradeRoute.swift; sourceTree = ""; }; FA0D5CE71DDCC61600AC9052 /* ClipService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClipService.swift; sourceTree = ""; }; FA0D5CED1DDCC61600AC9052 /* Entitlement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entitlement.swift; sourceTree = ""; }; FA0D5CF51DDCC61600AC9052 /* LicenseActivationClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LicenseActivationClient.swift; sourceTree = ""; }; @@ -296,6 +298,7 @@ FA0D5CE61DDCC5D000AC9052 /* Services */ = { isa = PBXGroup; children = ( + FA0D5CF91DDCC61600AC9052 /* BoardManUpgradeRoute.swift */, FA0D5CE71DDCC61600AC9052 /* ClipService.swift */, FA0D5CED1DDCC61600AC9052 /* Entitlement.swift */, FA0D5CF51DDCC61600AC9052 /* LicenseActivationClient.swift */, @@ -716,6 +719,7 @@ FA0D5CF41DDCC61600AC9052 /* LicenseTokenVerifier.swift in Sources */, FA0D5CEA1DDCC61600AC9052 /* PasteCountStore.swift in Sources */, FA0D5CEC1DDCC61600AC9052 /* PasteCountInputService.swift in Sources */, + FA0D5CFA1DDCC61600AC9052 /* BoardManUpgradeRoute.swift in Sources */, FA1DB4C91DDCB460007F95C8 /* MenuManager.swift in Sources */, FA1DB4BD1DDCB452007F95C8 /* String+Substring.swift in Sources */, FA1189331E4CD58C00244F12 /* ExcludeAppService.swift in Sources */, diff --git a/Clipy/Sources/Preferences/CPYPreferencesWindowController.swift b/Clipy/Sources/Preferences/CPYPreferencesWindowController.swift index 725afa1..b418952 100644 --- a/Clipy/Sources/Preferences/CPYPreferencesWindowController.swift +++ b/Clipy/Sources/Preferences/CPYPreferencesWindowController.swift @@ -565,7 +565,7 @@ private extension CPYPreferencesWindowController { } @objc func openBoardManProUpgrade() { - NSWorkspace.shared.open(URL(string: "https://uniplanck.com/board-man")!) + BoardManUpgradeRoute.openProPage() } func addSliderRow(to view: NSView, title: String, value: String, originX: CGFloat, originY: CGFloat, locked: Bool) { diff --git a/Clipy/Sources/Preferences/Panels/CPYBetaPreferenceViewController.swift b/Clipy/Sources/Preferences/Panels/CPYBetaPreferenceViewController.swift index 69d0466..c398a1e 100644 --- a/Clipy/Sources/Preferences/Panels/CPYBetaPreferenceViewController.swift +++ b/Clipy/Sources/Preferences/Panels/CPYBetaPreferenceViewController.swift @@ -183,7 +183,7 @@ final class CPYBetaPreferenceViewController: NSViewController { } @objc private func openBuyPro() { - NSWorkspace.shared.open(URL(string: "https://uniplanck.com/board-man")!) + BoardManUpgradeRoute.openProPage() } @objc private func openManageLicense() { diff --git a/Clipy/Sources/Services/BoardManUpgradeRoute.swift b/Clipy/Sources/Services/BoardManUpgradeRoute.swift new file mode 100644 index 0000000..97d92ca --- /dev/null +++ b/Clipy/Sources/Services/BoardManUpgradeRoute.swift @@ -0,0 +1,21 @@ +// +// BoardManUpgradeRoute.swift +// +// Clipy +// + +import Cocoa + +enum BoardManUpgradeRoute { + private static let proPageURLString = "https://uniplanck.com/board-man" + + static func openProPage() { + guard let url = URL(string: proPageURLString) else { + assertionFailure("Invalid Board-Man Pro upgrade URL") + NSLog("Invalid Board-Man Pro upgrade URL") + return + } + + NSWorkspace.shared.open(url) + } +}