phoebus_os/installer/live/desktop/common/PhoebusField.qml
Phoebus 7e9fa9c2a3
Some checks are pending
ci / test (push) Waiting to run
feat(installer): graphical welcome and install wizard over a typed bridge
Add a branded live welcome window and a Quickshell/QML installer frontend
over a narrow, fail-closed JSON bridge (phoebus-installer --gui-bridge)
that reuses the same InstallConfig, plan, validation, authorization and
staged executor as the TUI/CLI. Add the Phoebus brand system (emblem,
wordmark, wallpaper, tokens), suppress DMS first-run dialogs on the live
medium, identify the live medium as protected, make the installer
shortcut live-only, and fix the installed boot default so systemd-boot
never selects the recovery entry.

Verified in a disposable graphical VM (welcome/installer journey,
duplicate prevention, keyboard navigation, blocked AI prerequisite) plus
a real non-interactive install and detached boot (INSTALL-RC=0,
NO_SECRET_LEAK, systemd running, 0 failed units, LUKS2, Btrfs, network).
2026-09-21 13:13:40 -07:00

99 lines
3 KiB
Bash

import QtQuick
// A labelled single-line input with an inline error and optional secret echo.
Column {
id: field
property string label: ""
property string placeholder: ""
property string error: ""
property bool secret: false
property bool showSecret: false
property alias text: input.text
property alias inputItem: input
property int maxLength: 256
signal edited(string value)
signal accepted
width: parent ? parent.width : implicitWidth
spacing: 6
Text {
width: parent.width
text: field.label
color: Theme.warmWhite
font.family: Theme.family
font.pixelSize: Theme.fontSmall
font.weight: Font.DemiBold
visible: field.label.length > 0
}
Rectangle {
width: parent.width
height: 42
radius: Theme.radiusSmall
color: Theme.charcoal
border.width: input.activeFocus ? 2 : 1
border.color: field.error.length > 0 ? Theme.danger
: input.activeFocus ? Theme.focusRing
: Theme.border
TextInput {
id: input
anchors.fill: parent
anchors.leftMargin: 12
anchors.rightMargin: 44
verticalAlignment: TextInput.AlignVCenter
color: Theme.warmWhite
font.family: Theme.family
font.pixelSize: Theme.fontBody
selectionColor: Theme.amberDeep
selectedTextColor: Theme.warmWhite
echoMode: (field.secret && !field.showSecret) ? TextInput.Password : TextInput.Normal
passwordCharacter: "\u2022"
selectByMouse: true
activeFocusOnTab: true
maximumLength: field.maxLength
clip: true
onTextEdited: field.edited(text)
onAccepted: field.accepted()
Text {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
text: field.placeholder
color: Theme.muted
font.family: Theme.family
font.pixelSize: Theme.fontBody
visible: input.text.length === 0 && !input.activeFocus
}
}
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
visible: field.secret
text: field.showSecret ? "hide" : "show"
color: Theme.amber
font.family: Theme.family
font.pixelSize: Theme.fontSmall
MouseArea {
anchors.fill: parent
anchors.margins: -6
cursorShape: Qt.PointingHandCursor
onClicked: field.showSecret = !field.showSecret
}
}
}
Text {
width: parent.width
text: field.error
color: Theme.danger
font.family: Theme.family
font.pixelSize: Theme.fontSmall
wrapMode: Text.WordWrap
visible: field.error.length > 0
}
}