feat: show exact local reset time alongside countdown and clarify rolling window
This commit is contained in:
@@ -16,6 +16,16 @@ Rectangle {
|
||||
property int clockTick: 0
|
||||
property color accentColor: "#818cf8"
|
||||
|
||||
function formatResetMoment() {
|
||||
if (!resetAt || resetAt <= 0) return "—"
|
||||
const d = new Date(resetAt * 1000)
|
||||
const now = new Date()
|
||||
if (d.toDateString() === now.toDateString()) {
|
||||
return d.toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||
}
|
||||
return d.toLocaleDateString(Qt.locale(), "dd/MM") + " " + d.toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||
}
|
||||
|
||||
function countdown() {
|
||||
const tick = root.clockTick
|
||||
if (!resetAt || resetAt <= 0) return "—"
|
||||
@@ -103,7 +113,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Riga 3: Dettaglio usato + Reset countdown
|
||||
// Riga 3: Dettaglio usato + Orario esatto + Countdown
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 4
|
||||
@@ -117,7 +127,7 @@ Rectangle {
|
||||
Item { Layout.fillWidth: true }
|
||||
|
||||
PC3.Label {
|
||||
text: i18n("⏱ %1", root.countdown())
|
||||
text: i18n("reset %1 (%2)", root.formatResetMoment(), root.countdown())
|
||||
color: root.accentColor
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize - 3
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ PlasmoidItem {
|
||||
Plasmoid.backgroundHints: PlasmaCore.Types.DefaultBackground
|
||||
toolTipMainText: i18n("Antigravity — quote modelli")
|
||||
toolTipSubText: root.data && root.data.gemini
|
||||
? i18n("Gemini: %1% · Claude: %2%",
|
||||
? i18n("Gemini: %1% · Claude: %2% · Finestra mobile (rolling)",
|
||||
Math.round((root.data.gemini.remaining || 0) * 100),
|
||||
Math.round((root.data.claude ? root.data.claude.remaining || 0 : 0) * 100))
|
||||
: (root.errorMsg || "")
|
||||
@@ -154,7 +154,7 @@ PlasmoidItem {
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize + 1
|
||||
}
|
||||
PC3.Label {
|
||||
text: root.data && root.data.project ? "CLOUDCODE-PA" : "GOOGLE AI"
|
||||
text: "CLOUDCODE-PA"
|
||||
color: root.themeViolet
|
||||
font.bold: true
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize - 3
|
||||
@@ -242,7 +242,7 @@ PlasmoidItem {
|
||||
}
|
||||
Item { Layout.fillWidth: true }
|
||||
PC3.Label {
|
||||
text: "DAILY"
|
||||
text: "ROLLING"
|
||||
color: root.themeViolet
|
||||
font.bold: true
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize - 3
|
||||
|
||||
Reference in New Issue
Block a user