mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
fix ipc return types
This commit is contained in:
@@ -188,17 +188,17 @@ DankModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function open() {
|
function open(): string {
|
||||||
clipboardHistoryModal.show()
|
clipboardHistoryModal.show()
|
||||||
return "CLIPBOARD_OPEN_SUCCESS"
|
return "CLIPBOARD_OPEN_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close(): string {
|
||||||
hide()
|
clipboardHistoryModal.hide()
|
||||||
return "CLIPBOARD_CLOSE_SUCCESS"
|
return "CLIPBOARD_CLOSE_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle(): string {
|
||||||
clipboardHistoryModal.toggle()
|
clipboardHistoryModal.toggle()
|
||||||
return "CLIPBOARD_TOGGLE_SUCCESS"
|
return "CLIPBOARD_TOGGLE_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,17 +60,17 @@ DankModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function open() {
|
function open(): string {
|
||||||
notificationModal.show();
|
notificationModal.show();
|
||||||
return "NOTIFICATION_MODAL_OPEN_SUCCESS";
|
return "NOTIFICATION_MODAL_OPEN_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close(): string {
|
||||||
notificationModal.hide();
|
notificationModal.hide();
|
||||||
return "NOTIFICATION_MODAL_CLOSE_SUCCESS";
|
return "NOTIFICATION_MODAL_CLOSE_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle(): string {
|
||||||
notificationModal.toggle();
|
notificationModal.toggle();
|
||||||
return "NOTIFICATION_MODAL_TOGGLE_SUCCESS";
|
return "NOTIFICATION_MODAL_TOGGLE_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,17 +41,17 @@ DankModal {
|
|||||||
content: settingsContent
|
content: settingsContent
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function open() {
|
function open(): string {
|
||||||
settingsModal.show();
|
settingsModal.show();
|
||||||
return "SETTINGS_OPEN_SUCCESS";
|
return "SETTINGS_OPEN_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close(): string {
|
||||||
settingsModal.hide();
|
settingsModal.hide();
|
||||||
return "SETTINGS_CLOSE_SUCCESS";
|
return "SETTINGS_CLOSE_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle(): string {
|
||||||
settingsModal.toggle();
|
settingsModal.toggle();
|
||||||
return "SETTINGS_TOGGLE_SUCCESS";
|
return "SETTINGS_TOGGLE_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,17 +83,17 @@ DankModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function open() {
|
function open(): string {
|
||||||
spotlightModal.show()
|
spotlightModal.show()
|
||||||
return "SPOTLIGHT_OPEN_SUCCESS"
|
return "SPOTLIGHT_OPEN_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close(): string {
|
||||||
spotlightModal.hide()
|
spotlightModal.hide()
|
||||||
return "SPOTLIGHT_CLOSE_SUCCESS"
|
return "SPOTLIGHT_CLOSE_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle(): string {
|
||||||
spotlightModal.toggle()
|
spotlightModal.toggle()
|
||||||
return "SPOTLIGHT_TOGGLE_SUCCESS"
|
return "SPOTLIGHT_TOGGLE_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,13 +135,13 @@ Item {
|
|||||||
IpcHandler {
|
IpcHandler {
|
||||||
target: "lock"
|
target: "lock"
|
||||||
|
|
||||||
function lock(): void {
|
function lock() {
|
||||||
console.log("Lock screen requested via IPC")
|
console.log("Lock screen requested via IPC")
|
||||||
LockScreenService.resetState()
|
LockScreenService.resetState()
|
||||||
loader.activeAsync = true
|
loader.activeAsync = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function demo(): void {
|
function demo() {
|
||||||
console.log("Lock screen DEMO mode requested via IPC")
|
console.log("Lock screen DEMO mode requested via IPC")
|
||||||
demoWindow.showDemo()
|
demoWindow.showDemo()
|
||||||
}
|
}
|
||||||
|
|||||||
12
shell.qml
12
shell.qml
@@ -338,7 +338,7 @@ ShellRoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function open() {
|
function open(): string {
|
||||||
processListModalLoader.active = true
|
processListModalLoader.active = true
|
||||||
if (processListModalLoader.item)
|
if (processListModalLoader.item)
|
||||||
processListModalLoader.item.show()
|
processListModalLoader.item.show()
|
||||||
@@ -346,14 +346,14 @@ ShellRoot {
|
|||||||
return "PROCESSLIST_OPEN_SUCCESS"
|
return "PROCESSLIST_OPEN_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close(): string {
|
||||||
if (processListModalLoader.item)
|
if (processListModalLoader.item)
|
||||||
processListModalLoader.item.hide()
|
processListModalLoader.item.hide()
|
||||||
|
|
||||||
return "PROCESSLIST_CLOSE_SUCCESS"
|
return "PROCESSLIST_CLOSE_SUCCESS"
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle(): string {
|
||||||
processListModalLoader.active = true
|
processListModalLoader.active = true
|
||||||
if (processListModalLoader.item)
|
if (processListModalLoader.item)
|
||||||
processListModalLoader.item.toggle()
|
processListModalLoader.item.toggle()
|
||||||
@@ -365,7 +365,7 @@ ShellRoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function open() {
|
function open(): string {
|
||||||
notepadSlideoutLoader.active = true
|
notepadSlideoutLoader.active = true
|
||||||
if (notepadSlideoutLoader.item) {
|
if (notepadSlideoutLoader.item) {
|
||||||
notepadSlideoutLoader.item.show()
|
notepadSlideoutLoader.item.show()
|
||||||
@@ -374,7 +374,7 @@ ShellRoot {
|
|||||||
return "NOTEPAD_OPEN_FAILED"
|
return "NOTEPAD_OPEN_FAILED"
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close(): string {
|
||||||
if (notepadSlideoutLoader.item) {
|
if (notepadSlideoutLoader.item) {
|
||||||
notepadSlideoutLoader.item.hide()
|
notepadSlideoutLoader.item.hide()
|
||||||
return "NOTEPAD_CLOSE_SUCCESS"
|
return "NOTEPAD_CLOSE_SUCCESS"
|
||||||
@@ -382,7 +382,7 @@ ShellRoot {
|
|||||||
return "NOTEPAD_CLOSE_FAILED"
|
return "NOTEPAD_CLOSE_FAILED"
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle(): string {
|
||||||
notepadSlideoutLoader.active = true
|
notepadSlideoutLoader.active = true
|
||||||
if (notepadSlideoutLoader.item) {
|
if (notepadSlideoutLoader.item) {
|
||||||
notepadSlideoutLoader.item.toggle()
|
notepadSlideoutLoader.item.toggle()
|
||||||
|
|||||||
Reference in New Issue
Block a user