Files
openhaystack/OpenHaystack/OpenHaystack/HaystackApp/Views/PopUpAlertView.swift
2021-03-03 14:35:18 +01:00

46 lines
1.1 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// OpenHaystack Tracking personal Bluetooth devices via Apple's Find My network
//
// Copyright © 2021 Secure Mobile Networking Lab (SEEMOO)
// Copyright © 2021 The Open Wireless Link Project
//
// SPDX-License-Identifier: AGPL-3.0-only
import SwiftUI
struct PopUpAlertView: View {
let alertType: PopUpAlertType
var body: some View {
VStack {
switch self.alertType {
case .noReportsFound:
VStack {
Text("No reports found")
.font(.title2)
Text("Your accessory might have not been found yet or it is not powered. Make sure it has enough power to be found by nearby iPhones")
.font(.caption)
}.padding()
}
}
.background(RoundedRectangle(cornerRadius: 7.5)
.fill(Color.gray))
}
}
struct PopUpAlertView_Previews: PreviewProvider {
static var previews: some View {
PopUpAlertView(alertType: .noReportsFound)
}
}
enum PopUpAlertType: Int, Identifiable {
var id: Int {
return self.rawValue
}
case noReportsFound
}