@ -19,6 +19,16 @@ import QtGraphicalEffects 1.0
import QtQuick . Window 2.3
Kirigami . ScrollablePage {
/ / Y o u c a n h a r d - c o d e a c o l o r h e r e , o r b i n d t o a K i r i g a m i t h e m e c o l o r ,
/ / o r u s e a c o l o r f r o m C a l a m a r e s b r a n d i n g , o r . .
readonly property color unfilledFieldColor: "#FBFBFB" / / K i r i g a m i . T h e m e . b a c k g r o u n d C o l o r
readonly property color positiveFieldColor: "#F0FFF0" / / K i r i g a m i . T h e m e . p o s i t i v e B a c k g r o u n d C o l o r
readonly property color negativeFieldColor: "#EBCED1" / / K i r i g a m i . T h e m e . n e g a t i v e B a c k g r o u n d C o l o r
readonly property color unfilledFieldOutlineColor: "#F1F1F1"
readonly property color positiveFieldOutlineColor: "#DCFFDC"
readonly property color negativeFieldOutlineColor: "#BE5F68"
readonly property color headerTextColor: "#1F1F1F"
readonly property color commentsColor: "#6D6D6D"
width: parent . width
height: parent . height
@ -27,7 +37,7 @@ Kirigami.ScrollablePage {
Layout.fillWidth: true
height: 50
horizontalAlignment: Qt . AlignHCenter
color: Kirigami. Theme . t extColor
color: headerT extColor
font.weight: Font . Medium
font.pointSize: 12
text: qsTr ( "Pick your user name and credentials to login and perform admin tasks" )
@ -54,8 +64,10 @@ Kirigami.ScrollablePage {
text: config . fullName
onTextChanged: config . setFullName ( text )
palette.base: _userNameField . text . length ? Kirigami.Theme.backgroundColor : Kirigami . Theme . backgroundColor
palette.highlight : _userNameField . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
palette.base: _userNameField . text . length
? positiveFieldColor : unfilledFieldColor
palette.highlight : _userNameField . text . length
? positiveFieldOutlineColor : unfilledFieldOutlineColor
}
}
@ -86,8 +98,17 @@ Kirigami.ScrollablePage {
palette.base: _userLoginField . text . length
? ( acceptableInput
? ( _userLoginField . text === "root"
? Kirigami.Theme.negativeBackgroundColor : Kirigami . Theme . backgroundColor ) : Kirigami . Theme . negativeBackgroundColor ) : Kirigami . Theme . backgroundColor
palette.highlight : _userLoginField . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
? negativeFieldColor
: positiveFieldColor )
: negativeFieldColor )
: unfilledFieldColor
palette.highlight : _userLoginField . text . length
? ( acceptableInput
? ( _userLoginField . text === "root"
? negativeFieldOutlineColor
: positiveFieldOutlineColor )
: negativeFieldOutlineColor )
: unfilledFieldOutlineColor
}
Label {
@ -95,6 +116,7 @@ Kirigami.ScrollablePage {
text: qsTr ( "If more than one person will use this computer, you can create multiple accounts after installation." )
font.weight: Font . Thin
font.pointSize: 8
color: commentsColor
}
}
@ -129,7 +151,7 @@ Kirigami.ScrollablePage {
placeholderText: qsTr ( "Computer Name" )
text: config . hostName
validator: RegularExpressionValidator { regularExpression: /[a-zA-Z0-9][-a-zA-Z0-9_]+/ }
color: Kirigami . Theme . textColor
onTextChanged: acceptableInput
? ( _hostName . text === "localhost"
? forbiddenHost . visible = true
@ -139,10 +161,16 @@ Kirigami.ScrollablePage {
palette.base: _hostName . text . length
? ( acceptableInput
? ( _hostName . text === "localhost" ? Kirigami.Theme.negativeBackgroundColor : Kirigami . Theme . backgroundColor )
: Kirigami . Theme . negativeBackgroundColor )
: Kirigami . Theme . backgroundColor
palette.highlight : _hostName . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
? ( _hostName . text === "localhost"
? negativeFieldColor : positiveFieldColor )
: negativeFieldColor )
: unfilledFieldColor
palette.highlight : _hostName . text . length
? ( acceptableInput
? ( _hostName . text === "localhost"
? negativeFieldOutlineColor : positiveFieldOutlineColor )
: negativeFieldOutlineColor )
: unfilledFieldOutlineColor
}
Label {
@ -150,6 +178,7 @@ Kirigami.ScrollablePage {
text: qsTr ( "This name will be used if you make the computer visible to others on a network." )
font.weight: Font . Thin
font.pointSize: 8
color: commentsColor
}
}
@ -189,8 +218,10 @@ Kirigami.ScrollablePage {
text: config . userPassword
onTextChanged: config . setUserPassword ( text )
palette.base: _passwordField . text . length ? Kirigami.Theme.backgroundColor : Kirigami . Theme . neutralBackgroundColor
palette.highlight : _passwordField . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
palette.base: _passwordField . text . length
? positiveFieldColor : unfilledFieldColor
palette.highlight : _passwordField . text . length
? positiveFieldOutlineColor : unfilledFieldOutlineColor
echoMode: TextInput . Password
passwordMaskDelay: 300
@ -212,9 +243,12 @@ Kirigami.ScrollablePage {
palette.base: _verificationPasswordField . text . length
? ( _passwordField . text === _verificationPasswordField . text
? Kirigami.Theme.backgroundColor : Kirigami . Theme . negativeBackgroundColor )
: Kirigami . Theme . backgroundColor
palette.highlight : _verificationPasswordField . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
? positiveFieldColor : negativeFieldColor )
: unfilledFieldColor
palette.highlight : _verificationPasswordField . text . length
? ( _passwordField . text === _verificationPasswordField . text
? positiveFieldOutlineColor : negativeFieldOutlineColor )
: unfilledFieldOutlineColor
echoMode: TextInput . Password
passwordMaskDelay: 300
@ -228,6 +262,7 @@ Kirigami.ScrollablePage {
font.weight: Font . Thin
font.pointSize: 8
wrapMode: Text . WordWrap
color: commentsColor
}
}
@ -266,6 +301,7 @@ Kirigami.ScrollablePage {
text: qsTr ( "Use the same password for the administrator account." )
font.weight: Font . Thin
font.pointSize: 8
color: commentsColor
}
Column {
@ -290,8 +326,10 @@ Kirigami.ScrollablePage {
onTextChanged: config . setRootPassword ( text )
palette.base: _rootPasswordField . text . length ? Kirigami.Theme.backgroundColor : Kirigami . Theme . neutralBackgroundColor
palette.highlight : _rootPasswordField . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
palette.base: _rootPasswordField . text . length
? positiveFieldColor : unfilledFieldColor
palette.highlight : _rootPasswordField . text . length
? positiveFieldOutlineColor : unfilledFieldOutlineColor
echoMode: TextInput . Password
passwordMaskDelay: 300
@ -306,15 +344,17 @@ Kirigami.ScrollablePage {
onTextChanged: _rootPasswordField . text === _verificationRootPasswordField . text
? ( config . setRootPasswordSecondary ( text ) ,
rootPassMessage . visible = false ,
rootValidityMessage . visible = true )
: ( rootPassMessage . visible = true ,
rootValidityMessage . visible = false )
rootPassMessage . visible = false , rootValidityMessage . visible = true )
: ( rootPassMessage . visible = true , rootValidityMessage . visible = false )
palette.base: _verificationRootPasswordField . text . length
? ( _rootPasswordField . text === _verificationRootPasswordField . text
? Kirigami.Theme.backgroundColor : Kirigami . Theme . negativeBackgroundColor ) : Kirigami . Theme . backgroundColor
palette.highlight : _verificationRootPasswordField . text . length ? Kirigami.Theme.positiveBackgroundColor : Kirigami . Theme . backgroundColor
? positiveFieldColor : negativeFieldColor )
: unfilledFieldColor
palette.highlight : _verificationRootPasswordField . text . length
? ( _rootPasswordField . text === _verificationRootPasswordField . text
? positiveFieldOutlineColor : negativeFieldOutlineColor )
: unfilledFieldOutlineColor
echoMode: TextInput . Password
passwordMaskDelay: 300
@ -328,7 +368,7 @@ Kirigami.ScrollablePage {
text: qsTr ( "Enter the same password twice, so that it can be checked for typing errors." )
font.weight: Font . Thin
font.pointSize: 8
color: "#6D6D6D"
color: commentsColor
}
}
@ -376,6 +416,7 @@ Kirigami.ScrollablePage {
text: qsTr ( "When this box is checked, password-strength checking is done and you will not be able to use a weak password." )
font.weight: Font . Thin
font.pointSize: 8
color: commentsColor
}
}
}