new time input picker, added support for minutes in timeframe
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 10s
Python / lint-format (pull_request) Successful in 16s
Python / test (pull_request) Successful in 27s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m10s

This commit is contained in:
2026-06-08 14:51:46 +02:00
parent fe91a65324
commit 52980e4d84
6 changed files with 1318 additions and 184 deletions
+28 -4
View File
@@ -42,11 +42,24 @@ Singleton {
function checkStartup() {
if (!root.enabled)
return;
var now = new Date();
if (now.getHours() >= darkStart || now.getHours() < darkEnd) {
applyDarkMode();
var nowMinutes = now.getHours() * 60 + now.getMinutes();
var isDarkTime;
if (root.darkStart <= root.darkEnd) {
isDarkTime = (nowMinutes >= root.darkStart && nowMinutes < root.darkEnd);
} else {
applyLightMode();
isDarkTime = (nowMinutes >= root.darkStart || nowMinutes < root.darkEnd);
}
if (isDarkTime) {
if (DynamicColors.light)
root.applyDarkMode();
} else {
if (!DynamicColors.light)
root.applyLightMode();
}
}
@@ -60,8 +73,19 @@ Singleton {
onTriggered: {
if (!root.enabled)
return;
var now = new Date();
if (now.getHours() >= root.darkStart || now.getHours() < root.darkEnd) {
var nowMinutes = now.getHours() * 60 + now.getMinutes();
var isDarkTime;
if (root.darkStart <= root.darkEnd) {
isDarkTime = (nowMinutes >= root.darkStart && nowMinutes < root.darkEnd);
} else {
isDarkTime = (nowMinutes >= root.darkStart || nowMinutes < root.darkEnd);
}
if (isDarkTime) {
if (DynamicColors.light)
root.applyDarkMode();
} else {