summaryrefslogtreecommitdiff
path: root/raveos-calamares-module/raveusers/ui
diff options
context:
space:
mode:
authorNippy <nippy@Nippy-Mac-mini.local>2026-09-19 18:04:27 +0200
committerNippy <nippy@Nippy-Mac-mini.local>2026-09-19 18:04:27 +0200
commit3eb87a14e133b266ab8d8c634dda3af312474f1f (patch)
tree098ea50e2f159b654f3729c69facc6805556813e /raveos-calamares-module/raveusers/ui
parentf176110ce0e65756967db40ba2a3fc7d1daa2825 (diff)
downloadRaveOS-PKGBUILD-3eb87a14e133b266ab8d8c634dda3af312474f1f.tar.gz
RaveOS-PKGBUILD-3eb87a14e133b266ab8d8c634dda3af312474f1f.zip
new user settings
Diffstat (limited to 'raveos-calamares-module/raveusers/ui')
-rw-r--r--raveos-calamares-module/raveusers/ui/PasswordField.qml41
-rw-r--r--raveos-calamares-module/raveusers/ui/Translations.qml58
-rw-r--r--raveos-calamares-module/raveusers/ui/qmldir2
-rwxr-xr-xraveos-calamares-module/raveusers/ui/raveos-logo.pngbin0 -> 302684 bytes
-rw-r--r--raveos-calamares-module/raveusers/ui/raveusers.qml286
5 files changed, 387 insertions, 0 deletions
diff --git a/raveos-calamares-module/raveusers/ui/PasswordField.qml b/raveos-calamares-module/raveusers/ui/PasswordField.qml
new file mode 100644
index 0000000..0dffb49
--- /dev/null
+++ b/raveos-calamares-module/raveusers/ui/PasswordField.qml
@@ -0,0 +1,41 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+TextField {
+ id: field
+ property bool reveal: false
+ signal revealClicked()
+
+ implicitHeight: 52
+ leftPadding: 14
+ rightPadding: 46
+ echoMode: reveal ? TextInput.Normal : TextInput.Password
+ color: "#ffffff"
+ placeholderTextColor: "#5b6270"
+ font.pixelSize: 15
+
+ background: Rectangle {
+ radius: 7
+ color: "#303030"
+ border.color: field.activeFocus ? "#3d7839" : "#303030"
+ border.width: field.activeFocus ? 1.5 : 1
+ }
+
+ Text {
+ text: "\uD83D\uDC41"
+ font.pixelSize: 16
+ color: field.reveal ? "#3d7839" : "#9ca3af"
+ anchors.right: parent.right
+ anchors.rightMargin: 14
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ MouseArea {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ width: 40
+ height: 40
+ cursorShape: Qt.PointingHandCursor
+ onClicked: field.revealClicked()
+ }
+}
diff --git a/raveos-calamares-module/raveusers/ui/Translations.qml b/raveos-calamares-module/raveusers/ui/Translations.qml
new file mode 100644
index 0000000..cb267b4
--- /dev/null
+++ b/raveos-calamares-module/raveusers/ui/Translations.qml
@@ -0,0 +1,58 @@
+pragma Singleton
+import QtQuick 2.15
+
+QtObject {
+ id: root
+
+ property string title: "Create user"
+ property string description: "Set up the computer's primary user account. This account has full administrator (root / sudo) privileges."
+ property string usernameLabel: "Username"
+ property string hostnameLabel: "Computer name"
+ property string passwordLabel: "Password"
+ property string passwordPlaceholder: "Password"
+ property string passwordConfirmLabel: "Confirm password"
+ property string reuseRootLabel: "Use the same password for the administrator (root)"
+ property string rootPasswordLabel: "Root password"
+ property string rootPasswordPlaceholder: "Root password"
+ property string rootPasswordConfirmLabel: "Confirm root password"
+
+ function setLanguage(locale) {
+ if (locale.startsWith("hu")) {
+ title = "Felhasználó létrehozása"
+ description = "Állítsd be a számítógép elsődleges felhasználói fiókját. Ez a fiók teljes rendszergazdai (root / sudo) jogosultsággal rendelkezik."
+ usernameLabel = "Felhasználónév"
+ hostnameLabel = "Számítógépnév"
+ passwordLabel = "Jelszó"
+ passwordPlaceholder = "Jelszó"
+ passwordConfirmLabel = "Jelszó megerősítése"
+ reuseRootLabel = "Ugyanaz a jelszó az adminisztrátorhoz (root)"
+ rootPasswordLabel = "Root jelszó"
+ rootPasswordPlaceholder = "Root jelszó"
+ rootPasswordConfirmLabel = "Root jelszó megerősítése"
+ } else if (locale.startsWith("de")) {
+ title = "Benutzer erstellen"
+ description = "Richte das primäre Benutzerkonto des Computers ein. Dieses Konto hat volle Administratorrechte (root / sudo)."
+ usernameLabel = "Benutzername"
+ hostnameLabel = "Computername"
+ passwordLabel = "Passwort"
+ passwordPlaceholder = "Passwort"
+ passwordConfirmLabel = "Passwort bestätigen"
+ reuseRootLabel = "Dasselbe Passwort für den Administrator (root)"
+ rootPasswordLabel = "Root-Passwort"
+ rootPasswordPlaceholder = "Root-Passwort"
+ rootPasswordConfirmLabel = "Root-Passwort bestätigen"
+ } else {
+ title = "Create user"
+ description = "Set up the computer's primary user account. This account has full administrator (root / sudo) privileges."
+ usernameLabel = "Username"
+ hostnameLabel = "Computer name"
+ passwordLabel = "Password"
+ passwordPlaceholder = "Password"
+ passwordConfirmLabel = "Confirm password"
+ reuseRootLabel = "Use the same password for the administrator (root)"
+ rootPasswordLabel = "Root password"
+ rootPasswordPlaceholder = "Root password"
+ rootPasswordConfirmLabel = "Confirm root password"
+ }
+ }
+}
diff --git a/raveos-calamares-module/raveusers/ui/qmldir b/raveos-calamares-module/raveusers/ui/qmldir
new file mode 100644
index 0000000..c87b787
--- /dev/null
+++ b/raveos-calamares-module/raveusers/ui/qmldir
@@ -0,0 +1,2 @@
+module RaveUsersModule
+singleton Translations 1.0 Translations.qml
diff --git a/raveos-calamares-module/raveusers/ui/raveos-logo.png b/raveos-calamares-module/raveusers/ui/raveos-logo.png
new file mode 100755
index 0000000..9903765
--- /dev/null
+++ b/raveos-calamares-module/raveusers/ui/raveos-logo.png
Binary files differ
diff --git a/raveos-calamares-module/raveusers/ui/raveusers.qml b/raveos-calamares-module/raveusers/ui/raveusers.qml
new file mode 100644
index 0000000..25e090f
--- /dev/null
+++ b/raveos-calamares-module/raveusers/ui/raveusers.qml
@@ -0,0 +1,286 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+import "." as RaveUsersModule
+
+Rectangle {
+ id: root
+ color: "#2B2B2B"
+ radius: 14
+
+ readonly property color cCardBg: "#20232a"
+ readonly property color cCardBorder: "#333947"
+ readonly property color cInputBg: "#303030"
+ readonly property color cInputBorder: "#303030"
+ readonly property color cAccentGreen: "#3d7839"
+ readonly property color cTextWhite: "#ffffff"
+ readonly property color cTextMuted: "#8b93a3"
+ readonly property color cTextFaint: "#5b6270"
+ readonly property color cErrorRed: "#ff6b6b"
+
+ property bool showUserPassword: false
+ property bool showRootPassword: false
+
+ function updateLanguage() {
+ RaveUsersModule.Translations.setLanguage(systemLocale)
+ }
+
+ Component.onCompleted: {
+ RaveUsersModule.Translations.setLanguage(systemLocale)
+ }
+
+ ColumnLayout {
+ anchors.fill: parent
+ anchors.margins: 40
+ spacing: 0
+
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ ColumnLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ width: Math.min(parent.width - 40, 540)
+ spacing: 16
+
+ Image {
+ source: "raveos-logo.png"
+ sourceSize.width: 96
+ sourceSize.height: 96
+ fillMode: Image.PreserveAspectFit
+ Layout.preferredWidth: 96
+ Layout.preferredHeight: 96
+ Layout.alignment: Qt.AlignHCenter
+ }
+
+ Text {
+ text: RaveUsersModule.Translations.title
+ font.pixelSize: 28
+ font.bold: true
+ color: cTextWhite
+ Layout.alignment: Qt.AlignHCenter
+ }
+
+ Text {
+ text: RaveUsersModule.Translations.description
+ font.pixelSize: 15
+ lineHeight: 1.45
+ color: cTextMuted
+ wrapMode: Text.WordWrap
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignHCenter
+ }
+
+ Item { height: 6 }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 6
+
+ Text {
+ text: RaveUsersModule.Translations.usernameLabel
+ color: "#c7ccd6"
+ font.pixelSize: 14
+ font.weight: Font.Medium
+ }
+
+ TextField {
+ id: usernameField
+ Layout.fillWidth: true
+ implicitHeight: 52
+ leftPadding: 14
+ rightPadding: 14
+ text: backend.username
+ placeholderText: "raveuser"
+ color: cTextWhite
+ placeholderTextColor: "#5b6270"
+ font.pixelSize: 15
+ background: Rectangle {
+ radius: 7
+ color: cInputBg
+ border.color: usernameField.activeFocus ? cAccentGreen : cInputBorder
+ border.width: usernameField.activeFocus ? 1.5 : 1
+ }
+ onTextEdited: backend.setUsername(text)
+ }
+
+ Text {
+ visible: backend.usernameStatus !== ""
+ text: backend.usernameStatus
+ color: cErrorRed
+ font.pixelSize: 12
+ }
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 6
+
+ Text {
+ text: RaveUsersModule.Translations.hostnameLabel
+ color: "#c7ccd6"
+ font.pixelSize: 14
+ font.weight: Font.Medium
+ }
+
+ TextField {
+ id: hostnameField
+ Layout.fillWidth: true
+ implicitHeight: 52
+ leftPadding: 14
+ rightPadding: 14
+ text: backend.hostname
+ placeholderText: "raveos-pc"
+ color: cTextWhite
+ placeholderTextColor: "#5b6270"
+ font.pixelSize: 15
+ background: Rectangle {
+ radius: 7
+ color: cInputBg
+ border.color: hostnameField.activeFocus ? cAccentGreen : cInputBorder
+ border.width: hostnameField.activeFocus ? 1.5 : 1
+ }
+ onTextEdited: backend.setHostname(text)
+ }
+
+ Text {
+ visible: backend.hostnameStatus !== ""
+ text: backend.hostnameStatus
+ color: cErrorRed
+ font.pixelSize: 12
+ }
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 6
+
+ Text {
+ text: RaveUsersModule.Translations.passwordLabel
+ color: "#c7ccd6"
+ font.pixelSize: 14
+ font.weight: Font.Medium
+ }
+
+ RowLayout {
+ Layout.fillWidth: true
+ spacing: 12
+
+ PasswordField {
+ Layout.fillWidth: true
+ reveal: showUserPassword
+ onRevealClicked: showUserPassword = !showUserPassword
+ placeholderText: RaveUsersModule.Translations.passwordPlaceholder
+ onTextEdited: backend.setPassword(text)
+ }
+
+ PasswordField {
+ Layout.fillWidth: true
+ reveal: showUserPassword
+ onRevealClicked: showUserPassword = !showUserPassword
+ placeholderText: RaveUsersModule.Translations.passwordConfirmLabel
+ onTextEdited: backend.setPasswordSecondary(text)
+ }
+ }
+
+ Text {
+ visible: backend.passwordStatus !== ""
+ text: backend.passwordStatus
+ color: cErrorRed
+ font.pixelSize: 12
+ }
+ }
+
+ Rectangle {
+ Layout.fillWidth: true
+ Layout.topMargin: 2
+ Layout.bottomMargin: 2
+ height: 1
+ color: cCardBorder
+ opacity: 0.6
+ }
+
+ CheckBox {
+ id: reuseRootCheck
+ Layout.fillWidth: true
+ visible: backend.rootReuseVisible
+ text: RaveUsersModule.Translations.reuseRootLabel
+ checked: backend.reuseRootPassword
+ onToggled: backend.setReuseRootPassword(checked)
+
+ indicator: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ x: reuseRootCheck.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 4
+ color: reuseRootCheck.checked ? cAccentGreen : cInputBg
+ border.color: reuseRootCheck.checked ? cAccentGreen : cInputBorder
+ border.width: 1
+
+ Text {
+ anchors.centerIn: parent
+ text: "\u2713"
+ font.pixelSize: 14
+ font.bold: true
+ color: "#0f1713"
+ visible: reuseRootCheck.checked
+ }
+ }
+
+ contentItem: Text {
+ text: reuseRootCheck.text
+ color: "#d7dbe2"
+ font.pixelSize: 14
+ verticalAlignment: Text.AlignVCenter
+ leftPadding: reuseRootCheck.indicator.width + 12
+ }
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ spacing: 6
+ visible: !backend.reuseRootPassword
+
+ Text {
+ text: RaveUsersModule.Translations.rootPasswordLabel
+ color: "#c7ccd6"
+ font.pixelSize: 14
+ font.weight: Font.Medium
+ Layout.topMargin: 4
+ }
+
+ RowLayout {
+ Layout.fillWidth: true
+ spacing: 12
+
+ PasswordField {
+ Layout.fillWidth: true
+ reveal: showRootPassword
+ onRevealClicked: showRootPassword = !showRootPassword
+ placeholderText: RaveUsersModule.Translations.rootPasswordPlaceholder
+ onTextEdited: backend.setRootPasswordText(text)
+ }
+
+ PasswordField {
+ Layout.fillWidth: true
+ reveal: showRootPassword
+ onRevealClicked: showRootPassword = !showRootPassword
+ placeholderText: RaveUsersModule.Translations.rootPasswordConfirmLabel
+ onTextEdited: backend.setRootPasswordSecondaryText(text)
+ }
+ }
+
+ Text {
+ visible: backend.rootPasswordStatus !== ""
+ text: backend.rootPasswordStatus
+ color: cErrorRed
+ font.pixelSize: 12
+ }
+ }
+ }
+ }
+ }
+}