mirror of
https://github.com/lihaoyun6/AirBattery.git
synced 2025-11-25 19:37:46 +08:00
27 lines
633 B
Swift
27 lines
633 B
Swift
//
|
|
// AppIntent.swift
|
|
// AirBattery
|
|
//
|
|
// Created by apple on 2024/6/6.
|
|
//
|
|
|
|
import WidgetKit
|
|
import AppIntents
|
|
|
|
@available(macOS 14.0, *)
|
|
struct ConfigurationAppIntent: WidgetConfigurationIntent {
|
|
nonisolated(unsafe) static var title: LocalizedStringResource = "Configuration"
|
|
nonisolated(unsafe) static var description = IntentDescription("AirBattery battery usage widget")
|
|
|
|
@Parameter(title: LocalizedStringResource("Enter Device Name"), default: "")
|
|
var deviceName: String
|
|
|
|
init(deviceName: String) {
|
|
self.deviceName = deviceName
|
|
}
|
|
|
|
init() {
|
|
self.deviceName = ""
|
|
}
|
|
}
|