mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +00:00
Update quick setting package metadata to use SHIFT-facing descriptions and repository links while preserving org.kde.plasma.quicksetting.* package IDs. Drop translated Description entries that could override the corrected base descriptions, update the Caffeine inhibition reason, and add a guard for future regressions.
27 lines
796 B
QML
27 lines
796 B
QML
// SPDX-FileCopyrightText: 2022-2025 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
|
import org.kde.plasma.private.batterymonitor
|
|
|
|
QS.QuickSetting {
|
|
text: i18n("Caffeine")
|
|
icon: "system-suspend-hibernate"
|
|
status: enabled ? i18n("Tap to disable sleep suspension") : i18n("Tap to suspend sleep")
|
|
enabled: inhibitionControl.isManuallyInhibited
|
|
|
|
InhibitionControl {
|
|
id: inhibitionControl
|
|
isSilent: false
|
|
}
|
|
|
|
function toggle() {
|
|
if (enabled) {
|
|
inhibitionControl.uninhibit();
|
|
} else {
|
|
const reason = i18nc("@info", "SHIFT has enabled system-wide inhibition");
|
|
inhibitionControl.inhibit(reason);
|
|
}
|
|
}
|
|
}
|
|
|