mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-22 06:02:03 +02:00
settingsview: homogenize ModalTextEdit usage
GitLab: #986 GitLab: #1004 Change-Id: Iea441cba4c258a82b9a553c93c81e4d76f0baa1c
This commit is contained in:
parent
05beb246e8
commit
42a46fe165
24 changed files with 148 additions and 287 deletions
|
@ -26,7 +26,7 @@ TextField {
|
||||||
|
|
||||||
// We need to remove focus when another widget takes activeFocus,
|
// We need to remove focus when another widget takes activeFocus,
|
||||||
// except the context menu.
|
// except the context menu.
|
||||||
property bool isActive: activeFocus || contextMenu.active || root.text.toString() !== ''
|
property bool isActive: activeFocus || contextMenu.active
|
||||||
onActiveFocusChanged: {
|
onActiveFocusChanged: {
|
||||||
if (!activeFocus && !contextMenu.active) {
|
if (!activeFocus && !contextMenu.active) {
|
||||||
root.focus = false
|
root.focus = false
|
||||||
|
@ -76,11 +76,10 @@ TextField {
|
||||||
bottomPadding: 20
|
bottomPadding: 20
|
||||||
topPadding: 2
|
topPadding: 2
|
||||||
|
|
||||||
onIsActiveChanged: if (!isActive && !readOnly) text = ''
|
|
||||||
Keys.onPressed: function (event) {
|
Keys.onPressed: function (event) {
|
||||||
if (event.key === Qt.Key_Enter
|
if (event.key === Qt.Key_Enter
|
||||||
|| event.key === Qt.Key_Return) {
|
|| event.key === Qt.Key_Return) {
|
||||||
if (inputIsValid) {
|
if (inputIsValid && acceptableInput) {
|
||||||
root.accepted()
|
root.accepted()
|
||||||
}
|
}
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
|
@ -94,6 +93,7 @@ TextField {
|
||||||
lineEditObj: root
|
lineEditObj: root
|
||||||
selectOnly: readOnly
|
selectOnly: readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
onReleased: function (event) {
|
onReleased: function (event) {
|
||||||
if (event.button === Qt.RightButton)
|
if (event.button === Qt.RightButton)
|
||||||
contextMenu.openMenuAt(event)
|
contextMenu.openMenuAt(event)
|
||||||
|
@ -107,7 +107,7 @@ TextField {
|
||||||
anchors.horizontalCenter: root.horizontalCenter
|
anchors.horizontalCenter: root.horizontalCenter
|
||||||
text: root.placeholderText
|
text: root.placeholderText
|
||||||
color: root.baseColor
|
color: root.baseColor
|
||||||
visible: !root.isActive && !readOnly
|
visible: !root.isActive && !readOnly && root.text.toString() === ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -150,7 +150,7 @@ TextField {
|
||||||
color: root.baseColor
|
color: root.baseColor
|
||||||
|
|
||||||
// Show the alternate placeholder while the user types.
|
// Show the alternate placeholder while the user types.
|
||||||
visible: root.text.toString() !== '' && !readOnly
|
visible: root.isActive && !readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldIcon {
|
TextFieldIcon {
|
||||||
|
|
|
@ -40,6 +40,7 @@ Loader {
|
||||||
property bool fontBold: false
|
property bool fontBold: false
|
||||||
|
|
||||||
property int echoMode: TextInput.Normal
|
property int echoMode: TextInput.Normal
|
||||||
|
property QtObject textValidator: RegularExpressionValidator { id: defaultValidator }
|
||||||
|
|
||||||
// Always start with the static text component displayed first.
|
// Always start with the static text component displayed first.
|
||||||
property bool editMode: true
|
property bool editMode: true
|
||||||
|
@ -47,6 +48,8 @@ Loader {
|
||||||
// Emitted when the editor has been accepted.
|
// Emitted when the editor has been accepted.
|
||||||
signal accepted
|
signal accepted
|
||||||
|
|
||||||
|
signal activeChanged(bool active)
|
||||||
|
|
||||||
// Always give up focus when accepted.
|
// Always give up focus when accepted.
|
||||||
onAccepted: focus = false
|
onAccepted: focus = false
|
||||||
|
|
||||||
|
@ -59,10 +62,10 @@ Loader {
|
||||||
|
|
||||||
// This is used when the user is not editing the text.
|
// This is used when the user is not editing the text.
|
||||||
Component {
|
Component {
|
||||||
|
|
||||||
id: displayComp
|
id: displayComp
|
||||||
MaterialTextField {
|
|
||||||
|
|
||||||
|
MaterialTextField {
|
||||||
|
id: displayCompField
|
||||||
font.pointSize: root.fontPointSize
|
font.pointSize: root.fontPointSize
|
||||||
readOnly: true
|
readOnly: true
|
||||||
text: staticText
|
text: staticText
|
||||||
|
@ -75,7 +78,6 @@ Loader {
|
||||||
id: editComp
|
id: editComp
|
||||||
|
|
||||||
MaterialTextField {
|
MaterialTextField {
|
||||||
|
|
||||||
id: editCompField
|
id: editCompField
|
||||||
|
|
||||||
focus: true
|
focus: true
|
||||||
|
@ -92,19 +94,24 @@ Loader {
|
||||||
placeholderText: root.placeholderText
|
placeholderText: root.placeholderText
|
||||||
onAccepted: root.accepted()
|
onAccepted: root.accepted()
|
||||||
onTextChanged: dynamicText = text
|
onTextChanged: dynamicText = text
|
||||||
onVisibleChanged: text = dynamicText
|
text: staticText
|
||||||
inputIsValid: root.inputIsValid
|
inputIsValid: root.inputIsValid
|
||||||
onFocusChanged: if (!focus) root.editMode = false
|
onFocusChanged: {
|
||||||
|
if (!focus) {
|
||||||
|
root.editMode = false
|
||||||
|
}
|
||||||
|
activeChanged(root.editMode)
|
||||||
|
}
|
||||||
|
onIsActiveChanged: activeChanged(isActive)
|
||||||
|
validator: root.textValidator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We use a loader to switch between the two components depending on the
|
// We use a loader to switch between the two components depending on the
|
||||||
// editMode property.
|
// editMode property.
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
|
|
||||||
editMode || isPersistent
|
editMode || isPersistent
|
||||||
? editComp
|
? editComp
|
||||||
: displayComp
|
: displayComp
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ BaseModalDialog {
|
||||||
btnConfirm.enabled = currentPasswordEdit.dynamicText.length > 0
|
btnConfirm.enabled = currentPasswordEdit.dynamicText.length > 0
|
||||||
break
|
break
|
||||||
case PasswordDialog.SetPassword:
|
case PasswordDialog.SetPassword:
|
||||||
btnConfirm.enabled = passwordEdit.length > 0 &&
|
btnConfirm.enabled = passwordEdit.dynamicText.length > 0 &&
|
||||||
passwordEdit.dynamicText === confirmPasswordEdit.dynamicText
|
passwordEdit.dynamicText === confirmPasswordEdit.dynamicText
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
|
||||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
|
||||||
import net.jami.Models 1.1
|
|
||||||
import net.jami.Constants 1.1
|
|
||||||
|
|
||||||
EditableLineEdit {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
placeholderText: JamiStrings.chooseYourUserName
|
|
||||||
|
|
||||||
firstIco: readOnly? "" : JamiResources.person_24dp_svg
|
|
||||||
firstIcoColor: "#03B9E9"
|
|
||||||
|
|
||||||
secondIco: readOnly? "" : JamiResources.outline_info_24dp_svg
|
|
||||||
secondIcoColor: "#005699"
|
|
||||||
|
|
||||||
informationToolTip: JamiStrings.usernameToolTip
|
|
||||||
|
|
||||||
enum NameRegistrationState {
|
|
||||||
BLANK,
|
|
||||||
INVALID,
|
|
||||||
TAKEN,
|
|
||||||
FREE,
|
|
||||||
SEARCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
property int nameRegistrationState: UsernameLineEdit.NameRegistrationState.BLANK
|
|
||||||
property string accountId: CurrentAccount.id
|
|
||||||
|
|
||||||
selectByMouse: true
|
|
||||||
font.pointSize: JamiTheme.usernameLineEditPointSize
|
|
||||||
font.kerning: true
|
|
||||||
|
|
||||||
validator: RegularExpressionValidator { regularExpression: /[A-z0-9_]{0,32}/ }
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
id: registeredNameFoundConnection
|
|
||||||
|
|
||||||
target: NameDirectory
|
|
||||||
enabled: root.text.length !== 0
|
|
||||||
|
|
||||||
function onRegisteredNameFound(status, address, name) {
|
|
||||||
if (text === name) {
|
|
||||||
switch(status) {
|
|
||||||
case NameDirectory.LookupStatus.NOT_FOUND:
|
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.FREE
|
|
||||||
break
|
|
||||||
case NameDirectory.LookupStatus.ERROR:
|
|
||||||
case NameDirectory.LookupStatus.INVALID_NAME:
|
|
||||||
case NameDirectory.LookupStatus.INVALID:
|
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.INVALID
|
|
||||||
break
|
|
||||||
case NameDirectory.LookupStatus.SUCCESS:
|
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.TAKEN
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: lookupTimer
|
|
||||||
|
|
||||||
repeat: false
|
|
||||||
interval: JamiTheme.usernameLineEditlookupInterval
|
|
||||||
|
|
||||||
onTriggered: {
|
|
||||||
if (text.length !== 0 && readOnly === false) {
|
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.SEARCHING
|
|
||||||
NameDirectory.lookupName(root.accountId, text)
|
|
||||||
} else {
|
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.BLANK
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onNameRegistrationStateChanged: {
|
|
||||||
if (readOnly || !enabled)
|
|
||||||
borderColor = "transparent"
|
|
||||||
|
|
||||||
switch(nameRegistrationState){
|
|
||||||
case UsernameLineEdit.NameRegistrationState.BLANK:
|
|
||||||
firstIco=""
|
|
||||||
borderColor = "transparent"
|
|
||||||
error = false
|
|
||||||
validated = false
|
|
||||||
break
|
|
||||||
case UsernameLineEdit.NameRegistrationState.FREE:
|
|
||||||
firstIco = JamiResources.circled_green_check_svg
|
|
||||||
borderColor = validatedColor
|
|
||||||
firstIcoColor = "transparent"
|
|
||||||
validated = true
|
|
||||||
error = false
|
|
||||||
|
|
||||||
break
|
|
||||||
case UsernameLineEdit.NameRegistrationState.INVALID:
|
|
||||||
case UsernameLineEdit.NameRegistrationState.TAKEN:
|
|
||||||
firstIco = JamiResources.circled_red_cross_svg
|
|
||||||
borderColor = errorColor
|
|
||||||
firstIcoColor = "transparent"
|
|
||||||
error = true
|
|
||||||
validated = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onTextChanged: lookupTimer.restart()
|
|
||||||
}
|
|
|
@ -26,24 +26,24 @@ ModalTextEdit {
|
||||||
|
|
||||||
prefixIconSrc: {
|
prefixIconSrc: {
|
||||||
switch(nameRegistrationState){
|
switch(nameRegistrationState){
|
||||||
case UsernameLineEdit.NameRegistrationState.FREE:
|
case UsernameTextEdit.NameRegistrationState.FREE:
|
||||||
return JamiResources.circled_green_check_svg
|
return JamiResources.circled_green_check_svg
|
||||||
case UsernameLineEdit.NameRegistrationState.INVALID:
|
case UsernameTextEdit.NameRegistrationState.INVALID:
|
||||||
case UsernameLineEdit.NameRegistrationState.TAKEN:
|
case UsernameTextEdit.NameRegistrationState.TAKEN:
|
||||||
return JamiResources.circled_red_cross_svg
|
return JamiResources.circled_red_cross_svg
|
||||||
case UsernameLineEdit.NameRegistrationState.BLANK:
|
case UsernameTextEdit.NameRegistrationState.BLANK:
|
||||||
default:
|
default:
|
||||||
return JamiResources.person_24dp_svg
|
return JamiResources.person_24dp_svg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prefixIconColor: {
|
prefixIconColor: {
|
||||||
switch(nameRegistrationState){
|
switch(nameRegistrationState){
|
||||||
case UsernameLineEdit.NameRegistrationState.FREE:
|
case UsernameTextEdit.NameRegistrationState.FREE:
|
||||||
return "#009980"
|
return "#009980"
|
||||||
case UsernameLineEdit.NameRegistrationState.INVALID:
|
case UsernameTextEdit.NameRegistrationState.INVALID:
|
||||||
case UsernameLineEdit.NameRegistrationState.TAKEN:
|
case UsernameTextEdit.NameRegistrationState.TAKEN:
|
||||||
return "#CC0022"
|
return "#CC0022"
|
||||||
case UsernameLineEdit.NameRegistrationState.BLANK:
|
case UsernameTextEdit.NameRegistrationState.BLANK:
|
||||||
default:
|
default:
|
||||||
return JamiTheme.editLineColor
|
return JamiTheme.editLineColor
|
||||||
}
|
}
|
||||||
|
@ -51,18 +51,25 @@ ModalTextEdit {
|
||||||
suffixIconSrc: JamiResources.outline_info_24dp_svg
|
suffixIconSrc: JamiResources.outline_info_24dp_svg
|
||||||
suffixIconColor: JamiTheme.buttonTintedBlue
|
suffixIconColor: JamiTheme.buttonTintedBlue
|
||||||
|
|
||||||
|
property bool isActive: false
|
||||||
property string infohash: CurrentAccount.uri
|
property string infohash: CurrentAccount.uri
|
||||||
property string registeredName: CurrentAccount.registeredName
|
property string registeredName: CurrentAccount.registeredName
|
||||||
property bool hasRegisteredName: registeredName !== ''
|
staticText: root.isActive ? registeredName : (registeredName ? registeredName : infohash)
|
||||||
|
|
||||||
infoTipText: JamiStrings.usernameToolTip
|
infoTipText: JamiStrings.usernameToolTip
|
||||||
placeholderText: JamiStrings.chooseAUsername
|
placeholderText: JamiStrings.chooseAUsername
|
||||||
|
|
||||||
|
textValidator: RegularExpressionValidator { regularExpression: /[A-Za-z0-9-]{0,32}/ }
|
||||||
|
|
||||||
enum NameRegistrationState { BLANK, INVALID, TAKEN, FREE, SEARCHING }
|
enum NameRegistrationState { BLANK, INVALID, TAKEN, FREE, SEARCHING }
|
||||||
property int nameRegistrationState: UsernameLineEdit.NameRegistrationState.BLANK
|
property int nameRegistrationState: UsernameTextEdit.NameRegistrationState.BLANK
|
||||||
|
|
||||||
inputIsValid: dynamicText.length === 0
|
inputIsValid: dynamicText.length === 0
|
||||||
|| nameRegistrationState === UsernameLineEdit.NameRegistrationState.FREE
|
|| nameRegistrationState === UsernameTextEdit.NameRegistrationState.FREE
|
||||||
|
|
||||||
|
onActiveChanged: function(active) {
|
||||||
|
root.isActive = active
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: CurrentAccount
|
target: CurrentAccount
|
||||||
|
@ -82,15 +89,15 @@ ModalTextEdit {
|
||||||
if (dynamicText === name) {
|
if (dynamicText === name) {
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case NameDirectory.LookupStatus.NOT_FOUND:
|
case NameDirectory.LookupStatus.NOT_FOUND:
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.FREE
|
nameRegistrationState = UsernameTextEdit.NameRegistrationState.FREE
|
||||||
break
|
break
|
||||||
case NameDirectory.LookupStatus.ERROR:
|
case NameDirectory.LookupStatus.ERROR:
|
||||||
case NameDirectory.LookupStatus.INVALID_NAME:
|
case NameDirectory.LookupStatus.INVALID_NAME:
|
||||||
case NameDirectory.LookupStatus.INVALID:
|
case NameDirectory.LookupStatus.INVALID:
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.INVALID
|
nameRegistrationState = UsernameTextEdit.NameRegistrationState.INVALID
|
||||||
break
|
break
|
||||||
case NameDirectory.LookupStatus.SUCCESS:
|
case NameDirectory.LookupStatus.SUCCESS:
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.TAKEN
|
nameRegistrationState = UsernameTextEdit.NameRegistrationState.TAKEN
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,24 +108,25 @@ ModalTextEdit {
|
||||||
id: lookupTimer
|
id: lookupTimer
|
||||||
|
|
||||||
repeat: false
|
repeat: false
|
||||||
interval: JamiTheme.usernameLineEditlookupInterval
|
interval: JamiTheme.usernameTextEditlookupInterval
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (dynamicText.length !== 0) {
|
if (dynamicText.length !== 0) {
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.SEARCHING
|
nameRegistrationState = UsernameTextEdit.NameRegistrationState.SEARCHING
|
||||||
NameDirectory.lookupName(CurrentAccount.id, dynamicText)
|
NameDirectory.lookupName(CurrentAccount.id, dynamicText)
|
||||||
} else {
|
} else {
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.BLANK
|
nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onDynamicTextChanged: lookupTimer.restart()
|
onDynamicTextChanged: lookupTimer.restart()
|
||||||
|
|
||||||
function startEditing() {
|
function startEditing() {
|
||||||
if (!hasRegisteredName) {
|
if (!registeredName) {
|
||||||
root.editMode = true
|
root.editMode = true
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
nameRegistrationState = UsernameLineEdit.NameRegistrationState.BLANK
|
nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,7 +390,6 @@ Item {
|
||||||
property string chooseUsernameForAccount: qsTr("You can choose a username to help others more easily find and reach you on Jami.")
|
property string chooseUsernameForAccount: qsTr("You can choose a username to help others more easily find and reach you on Jami.")
|
||||||
property string chooseUsernameForRV: qsTr("Choose a name for your rendezvous point")
|
property string chooseUsernameForRV: qsTr("Choose a name for your rendezvous point")
|
||||||
property string chooseAName: qsTr("Choose a name")
|
property string chooseAName: qsTr("Choose a name")
|
||||||
property string chooseYourUserName: qsTr("Choose username")
|
|
||||||
property string invalidName: qsTr("Invalid name")
|
property string invalidName: qsTr("Invalid name")
|
||||||
property string invalidUsername: qsTr("Invalid username")
|
property string invalidUsername: qsTr("Invalid username")
|
||||||
property string nameAlreadyTaken: qsTr("Name already taken")
|
property string nameAlreadyTaken: qsTr("Name already taken")
|
||||||
|
|
|
@ -518,9 +518,9 @@ Item {
|
||||||
//MaterialButton
|
//MaterialButton
|
||||||
property real buttontextPadding: 10
|
property real buttontextPadding: 10
|
||||||
|
|
||||||
// UsernameLineEdit
|
// UsernameTextEdit
|
||||||
property real usernameLineEditPointSize:calcSize(9 + fontSizeOffset)
|
property real usernameTextEditPointSize:calcSize(9 + fontSizeOffset)
|
||||||
property real usernameLineEditlookupInterval: 200
|
property real usernameTextEditlookupInterval: 200
|
||||||
|
|
||||||
// JamiScrollBar
|
// JamiScrollBar
|
||||||
property int scrollBarHandleSize: 6
|
property int scrollBarHandleSize: 6
|
||||||
|
|
|
@ -95,8 +95,7 @@ ColumnLayout {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EditableLineEdit {
|
ModalTextEdit {
|
||||||
|
|
||||||
id: displayNameLineEdit
|
id: displayNameLineEdit
|
||||||
|
|
||||||
visible: opened
|
visible: opened
|
||||||
|
@ -105,16 +104,10 @@ ColumnLayout {
|
||||||
Layout.preferredWidth: root.width - 32
|
Layout.preferredWidth: root.width - 32
|
||||||
Layout.topMargin: -10
|
Layout.topMargin: -10
|
||||||
|
|
||||||
text: CurrentAccount.alias
|
staticText: CurrentAccount.alias
|
||||||
placeholderText: JamiStrings.enterNickname
|
placeholderText: JamiStrings.enterNickname
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
fontSize: JamiTheme.tipBoxContentFontSize
|
|
||||||
|
|
||||||
onEditingFinished: {
|
|
||||||
AccountAdapter.setCurrAccDisplayName(text)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
onAccepted: AccountAdapter.setCurrAccDisplayName(dynamicText)
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
|
@ -101,12 +101,12 @@ Item {
|
||||||
if (!usernameTextEdit.editMode)
|
if (!usernameTextEdit.editMode)
|
||||||
return true
|
return true
|
||||||
switch(usernameTextEdit.nameRegistrationState) {
|
switch(usernameTextEdit.nameRegistrationState) {
|
||||||
case UsernameLineEdit.NameRegistrationState.BLANK:
|
case UsernameTextEdit.NameRegistrationState.BLANK:
|
||||||
case UsernameLineEdit.NameRegistrationState.FREE:
|
case UsernameTextEdit.NameRegistrationState.FREE:
|
||||||
return true
|
return true
|
||||||
case UsernameLineEdit.NameRegistrationState.SEARCHING:
|
case UsernameTextEdit.NameRegistrationState.SEARCHING:
|
||||||
case UsernameLineEdit.NameRegistrationState.INVALID:
|
case UsernameTextEdit.NameRegistrationState.INVALID:
|
||||||
case UsernameLineEdit.NameRegistrationState.TAKEN:
|
case UsernameTextEdit.NameRegistrationState.TAKEN:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,6 @@ Item {
|
||||||
Layout.leftMargin: JamiTheme.preferredMarginSize
|
Layout.leftMargin: JamiTheme.preferredMarginSize
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
fontPointSize: JamiTheme.textFontSize + 1
|
fontPointSize: JamiTheme.textFontSize + 1
|
||||||
staticText: hasRegisteredName ? registeredName : infohash
|
|
||||||
editMode: false
|
editMode: false
|
||||||
isPersistent: false
|
isPersistent: false
|
||||||
|
|
||||||
|
@ -162,8 +161,8 @@ Item {
|
||||||
"settingsview/components/NameRegistrationDialog.qml",
|
"settingsview/components/NameRegistrationDialog.qml",
|
||||||
{ registeredName: dynamicText })
|
{ registeredName: dynamicText })
|
||||||
dlg.accepted.connect(function() {
|
dlg.accepted.connect(function() {
|
||||||
currentRegisteredID.nameRegistrationState =
|
usernameTextEdit.nameRegistrationState =
|
||||||
UsernameLineEdit.NameRegistrationState.BLANK
|
UsernameTextEdit.NameRegistrationState.BLANK
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,24 +70,16 @@ ColumnLayout {
|
||||||
buttonSize: JamiTheme.smartListAvatarSize
|
buttonSize: JamiTheme.smartListAvatarSize
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialLineEdit {
|
ModalTextEdit {
|
||||||
id: displayNameLineEdit
|
id: displayNameLineEdit
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight + 8
|
||||||
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
Layout.preferredWidth: JamiTheme.preferredFieldWidth
|
||||||
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
staticText: CurrentAccount.alias
|
||||||
font.kerning: true
|
|
||||||
text: CurrentAccount.alias
|
|
||||||
placeholderText: JamiStrings.enterNickname
|
placeholderText: JamiStrings.enterNickname
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
onAccepted: AccountAdapter.setCurrAccDisplayName(dynamicText)
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
padding: 8
|
|
||||||
|
|
||||||
loseFocusWhenEnterPressed: true
|
|
||||||
|
|
||||||
onEditingFinished: AccountAdapter.setCurrAccDisplayName(text)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ ColumnLayout {
|
||||||
onSwitchToggled: CurrentAccount.enable_TURN = checked
|
onSwitchToggled: CurrentAccount.enable_TURN = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditTurnAddress
|
id: lineEditTurnAddress
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -130,7 +130,7 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.server_TURN = dynamicText
|
onEditFinished: CurrentAccount.server_TURN = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditTurnUsername
|
id: lineEditTurnUsername
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -146,7 +146,7 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.username_TURN = dynamicText
|
onEditFinished: CurrentAccount.username_TURN = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditTurnPassword
|
id: lineEditTurnPassword
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -162,7 +162,7 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.password_TURN = dynamicText
|
onEditFinished: CurrentAccount.password_TURN = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditTurnRealmSIP
|
id: lineEditTurnRealmSIP
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -192,7 +192,7 @@ ColumnLayout {
|
||||||
onSwitchToggled: CurrentAccount.enable_STUN = checked
|
onSwitchToggled: CurrentAccount.enable_STUN = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditSTUNAddress
|
id: lineEditSTUNAddress
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -122,7 +122,7 @@ ColumnLayout {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditCertPassword
|
id: lineEditCertPassword
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -45,7 +45,7 @@ ColumnLayout {
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditNameServer
|
id: lineEditNameServer
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -74,7 +74,7 @@ ColumnLayout {
|
||||||
onSwitchToggled: CurrentAccount.proxyEnabled = checked
|
onSwitchToggled: CurrentAccount.proxyEnabled = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditProxy
|
id: lineEditProxy
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -90,7 +90,7 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.proxyServer = dynamicText
|
onEditFinished: CurrentAccount.proxyServer = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditBootstrap
|
id: lineEditBootstrap
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -71,7 +71,7 @@ ColumnLayout {
|
||||||
onSwitchToggled: CurrentAccount.publishedSameAsLocal = checked
|
onSwitchToggled: CurrentAccount.publishedSameAsLocal = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditSIPCustomAddress
|
id: lineEditSIPCustomAddress
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -178,11 +178,10 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private key password
|
// Private key password
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditSIPCertPassword
|
id: lineEditSIPCertPassword
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
|
||||||
|
|
||||||
enabled: CurrentAccount.enable_TLS
|
enabled: CurrentAccount.enable_TLS
|
||||||
|
|
||||||
|
@ -262,7 +261,7 @@ ColumnLayout {
|
||||||
parseInt(comboModel.get(modelIndex).secondArg)
|
parseInt(comboModel.get(modelIndex).secondArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: outgoingTLSServerNameLineEdit
|
id: outgoingTLSServerNameLineEdit
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -40,7 +40,7 @@ ColumnLayout {
|
||||||
maxWidth: width
|
maxWidth: width
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: lineEditVoiceMailDialCode
|
id: lineEditVoiceMailDialCode
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
@ -109,65 +109,33 @@ ColumnLayout {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
UsernameLineEdit {
|
UsernameTextEdit {
|
||||||
id: currentRegisteredID
|
id: currentRegisteredID
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
height: JamiTheme.preferredFieldHeight
|
|
||||||
width: JamiTheme.preferredFieldWidth
|
width: JamiTheme.preferredFieldWidth
|
||||||
|
height: JamiTheme.preferredFieldHeight + 16
|
||||||
|
|
||||||
padding: 8
|
anchors.margins: 8
|
||||||
horizontalAlignment: CurrentAccount.registeredName === "" ? Text.AlignLeft :
|
|
||||||
Text.AlignRight
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
wrapMode: Text.NoWrap
|
|
||||||
placeholderText: CurrentAccount.registeredName === "" ?
|
|
||||||
JamiStrings.registerAUsername : ""
|
|
||||||
text: CurrentAccount.registeredName
|
|
||||||
readOnly: CurrentAccount.registeredName !== ""
|
|
||||||
font.bold: CurrentAccount.registeredName !== ""
|
|
||||||
|
|
||||||
loseFocusWhenEnterPressed: btnRegisterName.visible
|
fontPointSize: JamiTheme.textFontSize + 1
|
||||||
|
staticText: CurrentAccount.registeredName
|
||||||
|
placeholderText: JamiStrings.chooseUsername
|
||||||
|
editMode: !CurrentAccount.registeredName
|
||||||
|
isPersistent: !CurrentAccount.registeredName
|
||||||
|
|
||||||
onEditingFinished: {
|
onAccepted: {
|
||||||
if (btnRegisterName.visible)
|
if (dynamicText === '') {
|
||||||
btnRegisterName.clicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialButton {
|
|
||||||
id: btnRegisterName
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
|
||||||
Layout.rightMargin: currentRegisteredID.width / 2 - width / 2
|
|
||||||
|
|
||||||
preferredWidth: 120
|
|
||||||
preferredHeight: 30
|
|
||||||
|
|
||||||
visible: CurrentAccount.registeredName === "" &&
|
|
||||||
currentRegisteredID.nameRegistrationState ===
|
|
||||||
UsernameLineEdit.NameRegistrationState.FREE
|
|
||||||
|
|
||||||
text: JamiStrings.register
|
|
||||||
toolTipText: JamiStrings.registerUsername
|
|
||||||
color: JamiTheme.buttonTintedGrey
|
|
||||||
hoveredColor: JamiTheme.buttonTintedGreyHovered
|
|
||||||
pressedColor: JamiTheme.buttonTintedGreyPressed
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
if (currentRegisteredID.text === '') {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var dlg = viewCoordinator.presentDialog(
|
var dlg = viewCoordinator.presentDialog(
|
||||||
appWindow,
|
appWindow,
|
||||||
"settingsview/components/NameRegistrationDialog.qml",
|
"settingsview/components/NameRegistrationDialog.qml",
|
||||||
{ registeredName: currentRegisteredID.text })
|
{ registeredName: dynamicText })
|
||||||
dlg.accepted.connect(function() {
|
dlg.accepted.connect(function() {
|
||||||
currentRegisteredID.nameRegistrationState =
|
currentRegisteredID.nameRegistrationState =
|
||||||
UsernameLineEdit.NameRegistrationState.BLANK
|
UsernameTextEdit.NameRegistrationState.BLANK
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ ColumnLayout {
|
||||||
|
|
||||||
property int itemWidth
|
property int itemWidth
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: usernameSIP
|
id: usernameSIP
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -44,7 +44,7 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.username = dynamicText
|
onEditFinished: CurrentAccount.username = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: hostnameSIP
|
id: hostnameSIP
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -58,7 +58,7 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.hostname = dynamicText
|
onEditFinished: CurrentAccount.hostname = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: proxySIP
|
id: proxySIP
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -72,17 +72,17 @@ ColumnLayout {
|
||||||
onEditFinished: CurrentAccount.routeset = dynamicText
|
onEditFinished: CurrentAccount.routeset = dynamicText
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsMaterialLineEdit {
|
SettingsMaterialTextEdit {
|
||||||
id: passSIPlineEdit
|
id: passSIPlineEdit
|
||||||
|
|
||||||
staticText: CurrentAccount.password
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
|
|
||||||
titleField: JamiStrings.password
|
staticText: CurrentAccount.password
|
||||||
|
|
||||||
|
titleField: JamiStrings.password
|
||||||
itemWidth: root.itemWidth
|
itemWidth: root.itemWidth
|
||||||
|
isPassword: true
|
||||||
|
|
||||||
onEditFinished: CurrentAccount.password = dynamicText
|
onEditFinished: CurrentAccount.password = dynamicText
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,11 @@ RowLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias titleField: title.text
|
property alias titleField: title.text
|
||||||
property alias staticText: modalTextEdit.staticText
|
property string staticText
|
||||||
property alias placeholderText: modalTextEdit.placeholderText
|
property string placeholderText
|
||||||
property alias enabled: modalTextEdit.enabled
|
property string dynamicText
|
||||||
property alias dynamicText: modalTextEdit.dynamicText
|
|
||||||
|
property bool isPassword: false
|
||||||
|
|
||||||
property int itemWidth
|
property int itemWidth
|
||||||
|
|
||||||
|
@ -56,13 +57,35 @@ RowLayout {
|
||||||
|
|
||||||
ModalTextEdit {
|
ModalTextEdit {
|
||||||
id: modalTextEdit
|
id: modalTextEdit
|
||||||
|
|
||||||
|
visible: !root.isPassword
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.preferredWidth: itemWidth
|
Layout.preferredWidth: itemWidth
|
||||||
Layout.maximumHeight: 40
|
Layout.maximumHeight: 40
|
||||||
staticText: staticText
|
staticText: root.staticText
|
||||||
placeholderText: ""
|
placeholderText: root.placeholderText ? root.placeholderText : root.titleField
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
|
root.dynamicText = dynamicText
|
||||||
|
editFinished()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
PasswordTextEdit {
|
||||||
|
id: passwordTextEdit
|
||||||
|
|
||||||
|
visible: root.isPassword
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.preferredWidth: itemWidth
|
||||||
|
Layout.maximumHeight: 40
|
||||||
|
staticText: root.staticText
|
||||||
|
placeholderText: root.placeholderText ? root.placeholderText : root.titleField
|
||||||
|
|
||||||
|
onAccepted: {
|
||||||
|
root.dynamicText = dynamicText
|
||||||
editFinished()
|
editFinished()
|
||||||
}
|
}
|
||||||
|
|
|
@ -545,8 +545,10 @@ Rectangle {
|
||||||
preferredWidth: Math.min(JamiTheme.wizardButtonWidth, root.width - JamiTheme.preferredMarginSize * 2)
|
preferredWidth: Math.min(JamiTheme.wizardButtonWidth, root.width - JamiTheme.preferredMarginSize * 2)
|
||||||
text: JamiStrings.optionSave
|
text: JamiStrings.optionSave
|
||||||
|
|
||||||
onClicked: { root.saveButtonClicked()
|
onClicked: {
|
||||||
root.alias = displayNameLineEdit.dynamicText}
|
root.saveButtonClicked()
|
||||||
|
root.alias = displayNameLineEdit.dynamicText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ Rectangle {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: Math.min(440, root.width - JamiTheme.preferredMarginSize * 2)
|
Layout.preferredWidth: Math.min(440, root.width - JamiTheme.preferredMarginSize * 2)
|
||||||
placeholderText: root.isRendezVous ? JamiStrings.chooseAName :
|
placeholderText: root.isRendezVous ? JamiStrings.chooseAName :
|
||||||
JamiStrings.chooseYourUserName
|
JamiStrings.chooseUsername
|
||||||
staticText: ""
|
staticText: ""
|
||||||
editMode: true
|
editMode: true
|
||||||
focus: visible
|
focus: visible
|
||||||
|
@ -162,16 +162,16 @@ Rectangle {
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
switch(usernameEdit.nameRegistrationState){
|
switch(usernameEdit.nameRegistrationState){
|
||||||
case UsernameLineEdit.NameRegistrationState.BLANK:
|
case UsernameTextEdit.NameRegistrationState.BLANK:
|
||||||
return " "
|
return " "
|
||||||
case UsernameLineEdit.NameRegistrationState.SEARCHING:
|
case UsernameTextEdit.NameRegistrationState.SEARCHING:
|
||||||
return " "
|
return " "
|
||||||
case UsernameLineEdit.NameRegistrationState.FREE:
|
case UsernameTextEdit.NameRegistrationState.FREE:
|
||||||
return " "
|
return " "
|
||||||
case UsernameLineEdit.NameRegistrationState.INVALID:
|
case UsernameTextEdit.NameRegistrationState.INVALID:
|
||||||
return root.isRendezVous ? JamiStrings.invalidName :
|
return root.isRendezVous ? JamiStrings.invalidName :
|
||||||
JamiStrings.invalidUsername
|
JamiStrings.invalidUsername
|
||||||
case UsernameLineEdit.NameRegistrationState.TAKEN:
|
case UsernameTextEdit.NameRegistrationState.TAKEN:
|
||||||
return root.isRendezVous ? JamiStrings.nameAlreadyTaken :
|
return root.isRendezVous ? JamiStrings.nameAlreadyTaken :
|
||||||
JamiStrings.usernameAlreadyTaken
|
JamiStrings.usernameAlreadyTaken
|
||||||
}
|
}
|
||||||
|
@ -194,8 +194,8 @@ Rectangle {
|
||||||
color: enabled? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedGrey
|
color: enabled? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedGrey
|
||||||
text: !enabled ? JamiStrings.creatingAccount :
|
text: !enabled ? JamiStrings.creatingAccount :
|
||||||
root.isRendezVous ? JamiStrings.chooseName : JamiStrings.joinJami
|
root.isRendezVous ? JamiStrings.chooseName : JamiStrings.joinJami
|
||||||
enabled: usernameEdit.nameRegistrationState === UsernameLineEdit.NameRegistrationState.FREE
|
enabled: usernameEdit.nameRegistrationState === UsernameTextEdit.NameRegistrationState.FREE
|
||||||
|| usernameEdit.nameRegistrationState === UsernameLineEdit.NameRegistrationState.BLANK
|
|| usernameEdit.nameRegistrationState === UsernameTextEdit.NameRegistrationState.BLANK
|
||||||
|
|
||||||
|
|
||||||
KeyNavigation.tab: showAdvancedButton
|
KeyNavigation.tab: showAdvancedButton
|
||||||
|
@ -212,13 +212,13 @@ Rectangle {
|
||||||
avatar: UtilsAdapter.tempCreationImage(),
|
avatar: UtilsAdapter.tempCreationImage(),
|
||||||
isRendezVous: root.isRendezVous
|
isRendezVous: root.isRendezVous
|
||||||
})
|
})
|
||||||
if (usernameEdit.nameRegistrationState === UsernameLineEdit.NameRegistrationState.FREE) {
|
if (usernameEdit.nameRegistrationState === UsernameTextEdit.NameRegistrationState.FREE) {
|
||||||
enabled = false
|
enabled = false
|
||||||
showAdvancedButton.enabled = false
|
showAdvancedButton.enabled = false
|
||||||
WizardViewStepModel.nextStep()
|
WizardViewStepModel.nextStep()
|
||||||
}
|
}
|
||||||
|
|
||||||
if(usernameEdit.nameRegistrationState === UsernameLineEdit.NameRegistrationState.BLANK)
|
if(usernameEdit.nameRegistrationState === UsernameTextEdit.NameRegistrationState.BLANK)
|
||||||
popup.visible = true
|
popup.visible = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,7 +265,6 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ModalTextEdit {
|
ModalTextEdit {
|
||||||
|
|
||||||
id: displayNameLineEdit
|
id: displayNameLineEdit
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
|
@ -704,7 +704,7 @@ WizardView {
|
||||||
|
|
||||||
// With username
|
// With username
|
||||||
usernameEdit.nameRegistrationState =
|
usernameEdit.nameRegistrationState =
|
||||||
UsernameLineEdit.NameRegistrationState.FREE
|
UsernameTextEdit.NameRegistrationState.FREE
|
||||||
|
|
||||||
keyClick(Qt.Key_Tab)
|
keyClick(Qt.Key_Tab)
|
||||||
compare(chooseUsernameButton.focus, true)
|
compare(chooseUsernameButton.focus, true)
|
||||||
|
|
Loading…
Add table
Reference in a new issue