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
805 B
QML
27 lines
805 B
QML
import QtQuick
|
|
import qs.Common
|
|
|
|
CcTile {
|
|
id: root
|
|
|
|
iconName: "do_not_disturb_on"
|
|
title: I18n.tr("Do not disturb")
|
|
subtitle: {
|
|
if (!SessionData.doNotDisturb)
|
|
return I18n.tr("Off");
|
|
if (SessionData.doNotDisturbUntil <= 0)
|
|
return I18n.tr("On");
|
|
const d = new Date(SessionData.doNotDisturbUntil);
|
|
return I18n.tr("Until %1", "standalone tile status, %1 is a clock time").arg(Qt.formatTime(d, SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"));
|
|
}
|
|
active: SessionData.doNotDisturb
|
|
showExpand: true
|
|
|
|
onClicked: SessionData.setDoNotDisturb(!SessionData.doNotDisturb)
|
|
expandedContent: Component {
|
|
CcDurationActions {
|
|
onSelected: minutes => SessionData.setDoNotDisturb(true, minutes)
|
|
}
|
|
}
|
|
}
|