mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Feat: Add Pairing File Export URL callback and replace Wireguard with StosVPN (#962)
* Add Pairing File Export URL callback and replace Wireguard with StosVPN * Fix Data() * Add Switching Tab * Fix Pairing Callback Template and fix spelling mistake * Add Observer for openExportPairingFileConfirm * Add Logging and fix certificate callback * add func to Scene Delegate * Fix ToastView and Logging * Remove ? * Fix Logging * Call AppDelegate instead of SceneDelegate * Fix Scene Delegate * Set back SceneDelegate * Add Logging * Fix error * Fix Case Sensitive * Remove openExportPairingFileConfirm and fix AppDelegate.exportPairingFileNotification * Remove Alert * Remove Unnecessary code * rename export() to exportPairingFile()
This commit is contained in:
@@ -291,10 +291,20 @@ private extension AppDelegate
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
case "pairing":
|
||||
let queryItems = components.queryItems?.reduce(into: [String: String]()) { $0[$1.name.lowercased()] = $1.value } ?? [:]
|
||||
guard let callbackTemplate = queryItems["urlName"]?.removingPercentEncoding else { return false }
|
||||
|
||||
DispatchQueue.main.async {
|
||||
exportPairingFile(callbackTemplate)
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
case "certificate":
|
||||
let queryItems = components.queryItems?.reduce(into: [String: String]()) { $0[$1.name.lowercased()] = $1.value } ?? [:]
|
||||
guard let callbackTemplate = queryItems["callback"]?.removingPercentEncoding else { return false }
|
||||
guard let callbackTemplate = queryItems["callback_template"]?.removingPercentEncoding else { return false }
|
||||
|
||||
DispatchQueue.main.async {
|
||||
NotificationCenter.default.post(name: AppDelegate.exportCertificateNotification, object: nil, userInfo: [AppDelegate.exportCertificateCallbackTemplateKey: callbackTemplate])
|
||||
|
||||
Reference in New Issue
Block a user