mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-16 00:04:01 -04:00
them towards theme controlCenter: make a real grid, add numerous more tile varieties, add icon size option surfaces: fix elevation levels in general, and shift them down settings: restyles and re-org sliders: scale down universally
27 lines
889 B
QML
27 lines
889 B
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.Services
|
|
import "../../../Common/Format.js" as Format
|
|
|
|
CcTile {
|
|
|
|
iconName: "motion_sensor_active"
|
|
title: SessionService.idleInhibited ? I18n.tr("Keeping Awake") : I18n.tr("Keep Awake")
|
|
subtitle: {
|
|
if (!SessionService.idleInhibited)
|
|
return I18n.tr("Off");
|
|
if (SessionData.idleInhibitedUntil <= 0)
|
|
return I18n.tr("On");
|
|
return I18n.tr("Until %1", "standalone tile status, %1 is a clock time").arg(Format.formatUntil(SessionData.idleInhibitedUntil, SettingsData.use24HourClock));
|
|
}
|
|
active: SessionService.idleInhibited || false
|
|
showExpand: true
|
|
|
|
onClicked: SessionService.toggleIdleInhibit(widgetData.durationMinutes)
|
|
expandedContent: Component {
|
|
CcDurationActions {
|
|
onSelected: minutes => SessionService.enableIdleInhibit(minutes)
|
|
}
|
|
}
|
|
}
|