Files
kde-codex-dashboard/contents/ui/configGeneral.qml
T
Matteo Benedetto 3eee01f0f2 feat: dashboard KDE Plasma 6 per utilizzo OpenAI Codex
Widget desktop 224x224 che mostra:
- residuo settimanale con barra e percentuale
- countdown esatto al reset (reset_at dall'API)
- piano (Plus/Free), crediti, stato limiti
- backend bash che chiama https://chatgpt.com/backend-api/wham/usage
- legge il token OAuth da ~/.pi/agent/auth.json (provider openai-codex)
2026-08-20 18:48:51 +02:00

57 lines
1.3 KiB
QML

/*
* configGeneral.qml — pagina di configurazione del plasmoide OpenAI Codex Usage.
*/
import QtQuick
import QtQuick.Layouts
import org.kde.plasma.components 3.0 as PC3
import org.kde.kirigami as Kirigami
Item {
id: page
property alias cfg_refreshIntervalSec: refreshSpin.value
property alias cfg_warnThreshold: warnSpin.value
property alias cfg_critThreshold: critSpin.value
ColumnLayout {
anchors.fill: parent
anchors.margins: Kirigami.Units.largeSpacing
spacing: Kirigami.Units.smallSpacing
PC3.Label {
text: i18n("Intervallo di aggiornamento (secondi)")
font.bold: true
}
PC3.SpinBox {
id: refreshSpin
from: 30
to: 3600
stepSize: 30
Layout.fillWidth: true
}
PC3.Label {
text: i18n("Soglia residuo giallo (%)")
font.bold: true
}
PC3.SpinBox {
id: warnSpin
from: 0
to: 100
Layout.fillWidth: true
}
PC3.Label {
text: i18n("Soglia residuo rosso (%)")
font.bold: true
}
PC3.SpinBox {
id: critSpin
from: 0
to: 100
Layout.fillWidth: true
}
Item { Layout.fillHeight: true }
}
}