-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a SetttingsView to manually enter Search Party Token, add erro…
…r handling for expired token
- Loading branch information
1 parent
3ef4280
commit 17410e2
Showing
8 changed files
with
128 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
OpenHaystack/OpenHaystack/HaystackApp/Views/OpenHaystackSettingsView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// OpenHaystack – Tracking personal Bluetooth devices via Apple's Find My network | ||
// | ||
// Copyright © 2024 Secure Mobile Networking Lab (SEEMOO) | ||
// Copyright © 2024 The Open Wireless Link Project | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct OpenHaystackSettingsView: View { | ||
var body: some View { | ||
TabView { | ||
GeneralSettingsView() | ||
.tabItem { | ||
Label("General", systemImage: "gear") | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct GeneralSettingsView: View { | ||
@AppStorage("useMailPlugin") private var useMailPlugin = false | ||
@AppStorage("searchPartyToken") private var searchPartyToken = "" | ||
|
||
var body: some View { | ||
Form { | ||
Toggle("Use Apple Mail Plugin (only works on macOS 13 and lower)", isOn: $useMailPlugin) | ||
TextField("Search Party Token", text: $searchPartyToken) | ||
} | ||
.padding(20) | ||
.frame(width: 600, height: 200) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters