plugin: rust-side modules + theme services with serde-typed config
This commit is contained in:
parent
a86e90e927
commit
f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions
|
|
@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import QtQuick
|
||||
import "../services" as S
|
||||
import NovaStats as NS
|
||||
|
||||
Column {
|
||||
id: root
|
||||
|
|
@ -20,8 +21,8 @@ Column {
|
|||
anchors.fill: parent
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
color: _localHdrHover.hovered ? S.Theme.base02 : "transparent"
|
||||
radius: S.Theme.radius
|
||||
color: _localHdrHover.hovered ? NS.ThemeService.base02 : "transparent"
|
||||
radius: NS.ThemeService.radius
|
||||
z: -1
|
||||
}
|
||||
|
||||
|
|
@ -34,9 +35,9 @@ Column {
|
|||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: " localhost"
|
||||
color: S.Theme.base05
|
||||
font.pixelSize: S.Theme.fontSize
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base05
|
||||
font.pixelSize: NS.ThemeService.fontSize
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -48,10 +49,10 @@ Column {
|
|||
color: {
|
||||
const st = S.SystemdService.systemState;
|
||||
if (st === "running")
|
||||
return S.Theme.base0B;
|
||||
return NS.ThemeService.base0B;
|
||||
if (st === "degraded")
|
||||
return S.Theme.base0A;
|
||||
return S.Theme.base08;
|
||||
return NS.ThemeService.base0A;
|
||||
return NS.ThemeService.base08;
|
||||
}
|
||||
opacity: 0.85
|
||||
radius: 3
|
||||
|
|
@ -62,9 +63,9 @@ Column {
|
|||
id: _localStateLbl
|
||||
anchors.centerIn: parent
|
||||
text: S.SystemdService.systemState
|
||||
color: S.Theme.base00
|
||||
font.pixelSize: S.Theme.fontSize - 3
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base00
|
||||
font.pixelSize: NS.ThemeService.fontSize - 3
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -74,9 +75,9 @@ Column {
|
|||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root._localExpanded ? "" : ""
|
||||
color: S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.iconFontFamily
|
||||
color: NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.iconFontFamily
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
|
|
@ -99,9 +100,9 @@ Column {
|
|||
anchors.leftMargin: 24
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "SYSTEM"
|
||||
color: S.Theme.base03
|
||||
font.pixelSize: S.Theme.fontSize - 3
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base03
|
||||
font.pixelSize: NS.ThemeService.fontSize - 3
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
font.letterSpacing: 1
|
||||
}
|
||||
}
|
||||
|
|
@ -126,9 +127,9 @@ Column {
|
|||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "no failures"
|
||||
color: S.Theme.base0B
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base0B
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,9 +143,9 @@ Column {
|
|||
anchors.leftMargin: 24
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "USER"
|
||||
color: S.Theme.base03
|
||||
font.pixelSize: S.Theme.fontSize - 3
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base03
|
||||
font.pixelSize: NS.ThemeService.fontSize - 3
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
font.letterSpacing: 1
|
||||
}
|
||||
}
|
||||
|
|
@ -169,9 +170,9 @@ Column {
|
|||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "no failures"
|
||||
color: S.Theme.base0B
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base0B
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -209,8 +210,8 @@ Column {
|
|||
anchors.fill: parent
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
color: _mHdrHover.hovered ? S.Theme.base02 : "transparent"
|
||||
radius: S.Theme.radius
|
||||
color: _mHdrHover.hovered ? NS.ThemeService.base02 : "transparent"
|
||||
radius: NS.ThemeService.radius
|
||||
z: -1
|
||||
}
|
||||
|
||||
|
|
@ -223,9 +224,9 @@ Column {
|
|||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: " " + _machineSection.modelData.name
|
||||
color: S.Theme.base05
|
||||
font.pixelSize: S.Theme.fontSize
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base05
|
||||
font.pixelSize: NS.ThemeService.fontSize
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
elide: Text.ElideRight
|
||||
width: parent.width - 100
|
||||
}
|
||||
|
|
@ -239,10 +240,10 @@ Column {
|
|||
color: {
|
||||
const st = S.MachinectlService.machineState(_machineSection.modelData.name);
|
||||
if (st === "running")
|
||||
return S.Theme.base0B;
|
||||
return NS.ThemeService.base0B;
|
||||
if (st === "degraded")
|
||||
return S.Theme.base0A;
|
||||
return st === "unknown" ? "transparent" : S.Theme.base08;
|
||||
return NS.ThemeService.base0A;
|
||||
return st === "unknown" ? "transparent" : NS.ThemeService.base08;
|
||||
}
|
||||
opacity: 0.85
|
||||
radius: 3
|
||||
|
|
@ -253,9 +254,9 @@ Column {
|
|||
id: _mStateLbl
|
||||
anchors.centerIn: parent
|
||||
text: S.MachinectlService.machineState(_machineSection.modelData.name)
|
||||
color: S.Theme.base00
|
||||
font.pixelSize: S.Theme.fontSize - 3
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base00
|
||||
font.pixelSize: NS.ThemeService.fontSize - 3
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -265,9 +266,9 @@ Column {
|
|||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: _machineSection._expanded ? "" : ""
|
||||
color: S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.iconFontFamily
|
||||
color: NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.iconFontFamily
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
|
|
@ -293,9 +294,9 @@ Column {
|
|||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "loading..."
|
||||
color: S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -310,9 +311,9 @@ Column {
|
|||
anchors.leftMargin: 24
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "SYSTEM"
|
||||
color: S.Theme.base03
|
||||
font.pixelSize: S.Theme.fontSize - 3
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base03
|
||||
font.pixelSize: NS.ThemeService.fontSize - 3
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
font.letterSpacing: 1
|
||||
}
|
||||
}
|
||||
|
|
@ -337,9 +338,9 @@ Column {
|
|||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "no failures"
|
||||
color: S.Theme.base0B
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
color: NS.ThemeService.base0B
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue