Attempt to fix control widget again
This commit is contained in:
@@ -12,7 +12,7 @@ struct ServiceToggleControl: ControlWidget {
|
|||||||
ControlWidgetToggle(
|
ControlWidgetToggle(
|
||||||
"sing-box",
|
"sing-box",
|
||||||
isOn: value,
|
isOn: value,
|
||||||
action: ToggleServiceIntent()
|
action: ToggleServiceControlIntent()
|
||||||
) { isOn in
|
) { isOn in
|
||||||
Label(isOn ? "Running" : "Stopped", systemImage: "shippingbox.fill")
|
Label(isOn ? "Running" : "Stopped", systemImage: "shippingbox.fill")
|
||||||
// .controlWidgetActionHint(isOn ? "Stop" : "Start")
|
// .controlWidgetActionHint(isOn ? "Stop" : "Start")
|
||||||
@@ -39,7 +39,7 @@ extension ServiceToggleControl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ToggleServiceIntent: SetValueIntent {
|
struct ToggleServiceControlIntent: SetValueIntent {
|
||||||
static var title: LocalizedStringResource = "Toggle sing-box"
|
static var title: LocalizedStringResource = "Toggle sing-box"
|
||||||
|
|
||||||
@Parameter(title: "Running")
|
@Parameter(title: "Running")
|
||||||
|
|||||||
Reference in New Issue
Block a user