mirror of
https://github.com/seemoo-lab/openhaystack.git
synced 2026-03-06 03:00:37 +00:00
35 lines
847 B
Swift
35 lines
847 B
Swift
// 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 AppKit
|
||
import Foundation
|
||
import SwiftUI
|
||
|
||
final class ActivityIndicator: NSViewRepresentable {
|
||
|
||
init(size: NSControl.ControlSize) {
|
||
self.size = size
|
||
}
|
||
|
||
let size: NSControl.ControlSize
|
||
|
||
typealias NSViewType = NSProgressIndicator
|
||
|
||
func makeNSView(context: Context) -> NSProgressIndicator {
|
||
let indicator = NSProgressIndicator()
|
||
indicator.style = .spinning
|
||
indicator.controlSize = self.size
|
||
indicator.startAnimation(nil)
|
||
return indicator
|
||
}
|
||
|
||
func updateNSView(_ nsView: NSProgressIndicator, context: Context) {
|
||
|
||
}
|
||
|
||
}
|