Add toasts & tooltips to a lot of things, add Disk Usage

This commit is contained in:
Ly-sec 2025-09-09 13:08:48 +02:00
parent fdfe9ea2e1
commit 94d64a91b8
12 changed files with 102 additions and 6 deletions

View file

@ -62,6 +62,8 @@ Singleton {
function onMutedChanged() {
root._muted = (sink?.audio.muted ?? true)
Logger.log("AudioService", "OnMuteChanged:", root._muted)
// Toast: audio output mute toggle
ToastService.showNotice("Audio Output", root._muted ? "Muted" : "Unmuted")
}
}
@ -79,6 +81,8 @@ Singleton {
function onMutedChanged() {
root._inputMuted = (source?.audio.muted ?? true)
Logger.log("AudioService", "OnInputMuteChanged:", root._inputMuted)
// Toast: microphone mute toggle
ToastService.showNotice("Microphone", root._inputMuted ? "Muted" : "Unmuted")
}
}

View file

@ -84,7 +84,8 @@ Singleton {
"showCpuTemp": true,
"showMemoryUsage": true,
"showMemoryAsPercent": false,
"showNetworkStats": false
"showNetworkStats": false,
"showDiskUsage": false
},
"Workspace": {
"allowUserSettings": true,

View file

@ -23,6 +23,11 @@ Singleton {
// Re-apply current scheme to pick the right variant
applyScheme(Settings.data.colorSchemes.predefinedScheme)
}
// Toast: dark/light mode switched
const enabled = !!Settings.data.colorSchemes.darkMode
const label = enabled ? "Dark Mode" : "Light Mode"
const description = enabled ? "Enabled" : "Enabled"
ToastService.showNotice(label, description)
}
}

View file

@ -50,6 +50,9 @@ Singleton {
target: Settings.data.nightLight
function onEnabledChanged() {
apply()
// Toast: night light toggled
const enabled = !!Settings.data.nightLight.enabled
ToastService.showNotice("Night Light", enabled ? "Enabled" : "Disabled")
}
function onNightTempChanged() {
apply()

View file

@ -185,6 +185,11 @@ Singleton {
// Process the message queue
function processQueue() {
if (messageQueue.length === 0 || allToasts.length === 0) {
// Added this so we don't accidentally get duplicate toasts
// if it causes issues, remove it and we'll find a different solution
if (allToasts.length === 0 && messageQueue.length > 0) {
messageQueue = []
}
isShowingToast = false
return
}