Add Control Center integration services
This commit is contained in:
@@ -54,6 +54,18 @@ Singleton {
|
||||
if (PrivacyState.microphoneActive)
|
||||
result.push(root.privacyActivity("microphone", "\u{F036C}", "Microphone", PrivacyState.microphoneApp));
|
||||
|
||||
if (KdeConnect.transferActive) {
|
||||
result.push({
|
||||
kind: "phone-transfer",
|
||||
glyph: "\u{F03F2}",
|
||||
label: "Sending to " + (KdeConnect.transferDeviceName || "Phone"),
|
||||
detail: KdeConnect.transferFileName || "Preparing file",
|
||||
state: "Sending",
|
||||
tone: "accent",
|
||||
action: "Cancel"
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -83,6 +95,8 @@ Singleton {
|
||||
function activate(kind: string): void {
|
||||
if (kind === "focus")
|
||||
FocusSession.activateWorkspace();
|
||||
else if (kind === "phone-transfer")
|
||||
ShellState.open("quicksettings");
|
||||
else if (["recording", "screen", "camera", "microphone"].indexOf(kind) >= 0)
|
||||
ShellState.open("activity");
|
||||
}
|
||||
@@ -94,5 +108,7 @@ Singleton {
|
||||
Caffeine.toggle();
|
||||
else if (kind === "recording")
|
||||
Capture.stopRecording();
|
||||
else if (kind === "phone-transfer")
|
||||
KdeConnect.cancelTransfer();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user