diff --git a/nymea-app/translations/nymea-app-de.ts b/nymea-app/translations/nymea-app-de.ts
index 1c499199..2c2ab088 100644
--- a/nymea-app/translations/nymea-app-de.ts
+++ b/nymea-app/translations/nymea-app-de.ts
@@ -2227,7 +2227,7 @@ Bitte versuche es erneut.
nymea is a registered trademark of guh GmbH.
- nymea ist ein eingetragener Markenname der guh GmbH.
+ nymea ist ein eingetragener Markenname der guh GmbH.
Licensed under the terms of the GNU general public license, version 2. Please visit the GitHub page for source code and build instructions.
@@ -2261,6 +2261,10 @@ Bitte versuche es erneut.
License text
Lizenztext
+
+ nymea is a registered trademark of nymea GmbH.
+ nymea ist ein eingetragenes Markenzeichen der nymea GmbH
+
InputTriggerDevicePage
@@ -3396,6 +3400,13 @@ Möchtest Du fortfahren?
Neue Magie
+
+ NewScenePage
+
+ New scene
+ Neue Szene
+
+
NewThingMagicPage
@@ -3568,10 +3579,12 @@ Möchtest Du fortfahren?
light
+ Select ...
Beleuchtung
sensor
+ Select ...
Sensor
@@ -3584,10 +3597,12 @@ Möchtest Du fortfahren?
battery powered thing
+ Select ...
batteriebetriebenes Gerät
connectable thing
+ Select ...
verbindbares Gerät
@@ -3616,14 +3631,17 @@ Möchtest Du fortfahren?
switchable thing
+ Select ...
einschalbare Geräte
daylight sensor
+ Select ...
Tageslichtsensor
presence sensor
+ Select ...
Anwesenheitssensor
@@ -3632,28 +3650,48 @@ Möchtest Du fortfahren?
doorbell
+ Select ...
Türklingel
alert
+ Select ...
Alarm
button
+ Select ...
Taster
access control
+ Select ...
Zugangskontrolle
smart meter
+ Select ...
Smart Meter
media player
+ Select ...
Medienabspielgerät
+
+ Fingerprint reader
+ Fingerabdruck Lesegerät
+
+
+ moisture sensor
+ Select ...
+ Feuchtigkeitssensor
+
+
+ thing to notify
+ Select ...
+ "Thing" zum Benachrichtigen
+
NymeaConnection
@@ -3711,6 +3749,30 @@ Möchtest Du fortfahren?
Pick a password
Wähle ein Passwort
+
+ Minimum %1 characters
+ Minimum %1 Zeichen
+
+
+ Lowercase letters
+ Kleinbuchstaben
+
+
+ Uppercase letters
+ Großbuchstaben
+
+
+ Numbers
+ Zahlen
+
+
+ Special characters
+ Sonderzeichen
+
+
+ Confirm password
+ Passwort bestätigen
+
PluginParamsPage
@@ -3846,15 +3908,15 @@ Möchtest Du fortfahren?
Confirm password
- Passwort bestätigen
+ Passwort bestätigen
<font color="%1">The passwords match.</font>
- <font color="%1">Die Passwörter stimmen überein.</font>
+ <font color="%1">Die Passwörter stimmen überein.</font>
<font color="%1">The passwords </font><font color="%2">do not</font><font color="%1"> match.</font>
- <font color="%1">Die Passwörter stimmen </font><font color="%2">nicht</font><font color="%1"> überein.</font>
+ <font color="%1">Die Passwörter stimmen </font><font color="%2">nicht</font><font color="%1"> überein.</font>
<font color="%1">The password needs to be </font><font color="%2">at least 12 characters long</font><font color="%1">, contain </font><font color="%3">lowercase</font><font color="%1">, </font><font color="%4">uppercase</font><font color="%1"> letters as well as </font><font color="%5">numbers</font><font color="%1"> and </font><font color="%6">special characters</font><font color="%1">.</font>
@@ -3862,7 +3924,7 @@ Möchtest Du fortfahren?
<font color="%1">The password needs to be </font><font color="%2">at least %3 characters long</font><font color="%1">, contain </font><font color="%4">lowercase</font><font color="%1">, </font><font color="%5">uppercase</font><font color="%1"> letters as well as </font><font color="%6">numbers</font><font color="%1"> and </font><font color="%7">special characters</font><font color="%1">.</font>
- <font color="%1">Das Passwort muss </font><font color="%2">mindestens %3 Zeichen lang</font><font color="%1"> sein, </font><font color="%4">Kleinbuchstaben</font><font color="%1">, </font><font color="%5">Großbuchstaben</font><font color="%1"> sowie </font><font color="%6">Zahlen</font><font color="%1"> und </font><font color="%7">Sonderzeichen</font><font color="%1"> beinhalten.</font>
+ <font color="%1">Das Passwort muss </font><font color="%2">mindestens %3 Zeichen lang</font><font color="%1"> sein, </font><font color="%4">Kleinbuchstaben</font><font color="%1">, </font><font color="%5">Großbuchstaben</font><font color="%1"> sowie </font><font color="%6">Zahlen</font><font color="%1"> und </font><font color="%7">Sonderzeichen</font><font color="%1"> beinhalten.</font>
@@ -4009,7 +4071,7 @@ Möchtest Du fortfahren?
SelectThingPage
Select a thing
- "Thing" auswählen
+ "Thing" auswählen
A specific thing
@@ -4021,16 +4083,32 @@ Möchtest Du fortfahren?
Select a kind of things
- Typ von "Things" auswählen
+ Typ von "Things" auswählen
Select a %1
- %1 auswählen
+ %1 auswählen
Any %1
Jede(s) %1
+
+ Select kind of things
+ "Thing" Kategorie
+
+
+ Select %1
+ %1 auswählen
+
+
+ Select thing
+ "Thing" auswählen
+
+
+ OK
+ OK
+
SensorDevicePagePost110
@@ -4397,6 +4475,14 @@ Möchtest Du fortfahren?
Next
Weiter
+
+ OAuth is not supported on this platform. Please use this app on a different device to set up this thing.
+ OAuth wird auf diesem System nicht unterstützt. Bitte benutze diese App auf einem anderen Gerät um dieses "Thing" einzurichten.
+
+
+ In order to use OAuth on this platform, make sure qml-module-qtwebview is installed.
+ Um OAuth auf diesem System zu benutzen, stelle sicher, dass qml-module-qtwebview installiert ist.
+
ShutterDeviceListPage
@@ -4637,6 +4723,10 @@ Do you want to proceed?
Möchtest Du fortfahren?
+
+ Failure adding repository.
+ Fehler beim Hinzufügen der Paketquelle.
+
TimeEventDelegate
diff --git a/nymea-app/translations/nymea-app-en.ts b/nymea-app/translations/nymea-app-en.ts
index c5704b10..e395919f 100644
--- a/nymea-app/translations/nymea-app-en.ts
+++ b/nymea-app/translations/nymea-app-en.ts
@@ -1669,10 +1669,6 @@ Please try again.
Howdy cowboy!
-
- nymea is a registered trademark of guh GmbH.
-
-
Licensed under the terms of the GNU general public license, version 2. Please visit the GitHub page for source code and build instructions.
@@ -1705,6 +1701,10 @@ Please try again.
License text
+
+ nymea is a registered trademark of nymea GmbH.
+
+
Interfaces
@@ -2598,6 +2598,13 @@ Please try again.
+
+ NewScenePage
+
+ New scene
+
+
+
NewThingMagicPage
@@ -2786,30 +2793,37 @@ Please try again.
light
+ Select ...
sensor
+ Select ...
battery powered thing
+ Select ...
connectable thing
+ Select ...
switchable thing
+ Select ...
daylight sensor
+ Select ...
presence sensor
+ Select ...
@@ -2818,26 +2832,46 @@ Please try again.
doorbell
+ Select ...
alert
+ Select ...
button
+ Select ...
access control
+ Select ...
smart meter
+ Select ...
media player
+ Select ...
+
+
+
+ Fingerprint reader
+
+
+
+ moisture sensor
+ Select ...
+
+
+
+ thing to notify
+ Select ...
@@ -2897,6 +2931,30 @@ Please try again.
Pick a password
+
+ Minimum %1 characters
+
+
+
+ Lowercase letters
+
+
+
+ Uppercase letters
+
+
+
+ Numbers
+
+
+
+ Special characters
+
+
+
+ Confirm password
+
+
PluginParamsPage
@@ -3006,18 +3064,6 @@ Please try again.
example: "and temperature > 5"
-
- Confirm password
-
-
-
- <font color="%1">The passwords match.</font>
-
-
-
- <font color="%1">The passwords </font><font color="%2">do not</font><font color="%1"> match.</font>
-
-
only if %1 %2 %3
@@ -3026,10 +3072,6 @@ Please try again.
and %1 %2 %3
-
- <font color="%1">The password needs to be </font><font color="%2">at least %3 characters long</font><font color="%1">, contain </font><font color="%4">lowercase</font><font color="%1">, </font><font color="%5">uppercase</font><font color="%1"> letters as well as </font><font color="%6">numbers</font><font color="%1"> and </font><font color="%7">special characters</font><font color="%1">.</font>
-
-
SelectActionPage
@@ -3154,22 +3196,26 @@ Please try again.
SelectThingPage
-
- Select a kind of things
-
-
-
- Select a %1
-
-
-
- Select a thing
-
-
Any %1
+
+ Select kind of things
+
+
+
+ Select %1
+
+
+
+ Select thing
+
+
+
+ OK
+
+
SensorDevicePagePost110
@@ -3428,6 +3474,14 @@ Please try again.
Next
+
+ OAuth is not supported on this platform. Please use this app on a different device to set up this thing.
+
+
+
+ In order to use OAuth on this platform, make sure qml-module-qtwebview is installed.
+
+
ShutterDeviceListPage
@@ -3605,6 +3659,10 @@ Please only use this if you are sure you want this and consider reporting the is
Do you want to proceed?
+
+ Failure adding repository.
+
+
TimeEventDelegate
diff --git a/nymea-app/translations/nymea-app-en_US.ts b/nymea-app/translations/nymea-app-en_US.ts
index c5704b10..e395919f 100644
--- a/nymea-app/translations/nymea-app-en_US.ts
+++ b/nymea-app/translations/nymea-app-en_US.ts
@@ -1669,10 +1669,6 @@ Please try again.
Howdy cowboy!
-
- nymea is a registered trademark of guh GmbH.
-
-
Licensed under the terms of the GNU general public license, version 2. Please visit the GitHub page for source code and build instructions.
@@ -1705,6 +1701,10 @@ Please try again.
License text
+
+ nymea is a registered trademark of nymea GmbH.
+
+
Interfaces
@@ -2598,6 +2598,13 @@ Please try again.
+
+ NewScenePage
+
+ New scene
+
+
+
NewThingMagicPage
@@ -2786,30 +2793,37 @@ Please try again.
light
+ Select ...
sensor
+ Select ...
battery powered thing
+ Select ...
connectable thing
+ Select ...
switchable thing
+ Select ...
daylight sensor
+ Select ...
presence sensor
+ Select ...
@@ -2818,26 +2832,46 @@ Please try again.
doorbell
+ Select ...
alert
+ Select ...
button
+ Select ...
access control
+ Select ...
smart meter
+ Select ...
media player
+ Select ...
+
+
+
+ Fingerprint reader
+
+
+
+ moisture sensor
+ Select ...
+
+
+
+ thing to notify
+ Select ...
@@ -2897,6 +2931,30 @@ Please try again.
Pick a password
+
+ Minimum %1 characters
+
+
+
+ Lowercase letters
+
+
+
+ Uppercase letters
+
+
+
+ Numbers
+
+
+
+ Special characters
+
+
+
+ Confirm password
+
+
PluginParamsPage
@@ -3006,18 +3064,6 @@ Please try again.
example: "and temperature > 5"
-
- Confirm password
-
-
-
- <font color="%1">The passwords match.</font>
-
-
-
- <font color="%1">The passwords </font><font color="%2">do not</font><font color="%1"> match.</font>
-
-
only if %1 %2 %3
@@ -3026,10 +3072,6 @@ Please try again.
and %1 %2 %3
-
- <font color="%1">The password needs to be </font><font color="%2">at least %3 characters long</font><font color="%1">, contain </font><font color="%4">lowercase</font><font color="%1">, </font><font color="%5">uppercase</font><font color="%1"> letters as well as </font><font color="%6">numbers</font><font color="%1"> and </font><font color="%7">special characters</font><font color="%1">.</font>
-
-
SelectActionPage
@@ -3154,22 +3196,26 @@ Please try again.
SelectThingPage
-
- Select a kind of things
-
-
-
- Select a %1
-
-
-
- Select a thing
-
-
Any %1
+
+ Select kind of things
+
+
+
+ Select %1
+
+
+
+ Select thing
+
+
+
+ OK
+
+
SensorDevicePagePost110
@@ -3428,6 +3474,14 @@ Please try again.
Next
+
+ OAuth is not supported on this platform. Please use this app on a different device to set up this thing.
+
+
+
+ In order to use OAuth on this platform, make sure qml-module-qtwebview is installed.
+
+
ShutterDeviceListPage
@@ -3605,6 +3659,10 @@ Please only use this if you are sure you want this and consider reporting the is
Do you want to proceed?
+
+ Failure adding repository.
+
+
TimeEventDelegate
diff --git a/nymea-app/translations/nymea-app-ko.ts b/nymea-app/translations/nymea-app-ko.ts
index 11500825..c46086a4 100644
--- a/nymea-app/translations/nymea-app-ko.ts
+++ b/nymea-app/translations/nymea-app-ko.ts
@@ -1707,7 +1707,7 @@ Please try again.
nymea is a registered trademark of guh GmbH.
- nymea는 guh GmbH의 등록 상표입니다.
+ nymea는 guh GmbH의 등록 상표입니다.
Licensed under the terms of the GNU general public license, version 2. Please visit the GitHub page for source code and build instructions.
@@ -1741,6 +1741,10 @@ Please try again.
License text
라이센스
+
+ nymea is a registered trademark of nymea GmbH.
+
+
Interfaces
@@ -2633,6 +2637,13 @@ Please try again.
마법 만들기
+
+ NewScenePage
+
+ New scene
+
+
+
NewThingMagicPage
@@ -2821,30 +2832,37 @@ Please try again.
light
+ Select ...
빛
sensor
+ Select ...
센서
battery powered thing
+ Select ...
배터리로 작동하는 것
connectable thing
+ Select ...
연결 가능한 것
switchable thing
+ Select ...
스위치 있는 것
daylight sensor
+ Select ...
일광 센서
presence sensor
+ Select ...
움직임 감지 센서
@@ -2853,28 +2871,48 @@ Please try again.
doorbell
+ Select ...
초인종
alert
+ Select ...
경보
button
+ Select ...
버튼
access control
+ Select ...
액세스 제어
smart meter
+ Select ...
스마트 미터
media player
+ Select ...
미디어 플레이어
+
+ Fingerprint reader
+
+
+
+ moisture sensor
+ Select ...
+
+
+
+ thing to notify
+ Select ...
+
+
NymeaConnection
@@ -2932,6 +2970,30 @@ Please try again.
Pick a password
암호 선택
+
+ Minimum %1 characters
+
+
+
+ Lowercase letters
+
+
+
+ Uppercase letters
+
+
+
+ Numbers
+
+
+
+ Special characters
+
+
+
+ Confirm password
+ 비밀번호 확인
+
PluginParamsPage
@@ -3043,15 +3105,15 @@ Please try again.
Confirm password
- 비밀번호 확인
+ 비밀번호 확인
<font color="%1">The passwords match.</font>
- <font color="%1" >암호가 일치 합니다.</font>
+ <font color="%1" >암호가 일치 합니다.</font>
<font color="%1">The passwords </font><font color="%2">do not</font><font color="%1"> match.</font>
- <font color="%1">비밀번호가 </font><font color="%2"></font><font color="%1">틀립니다.</font>
+ <font color="%1">비밀번호가 </font><font color="%2"></font><font color="%1">틀립니다.</font>
only if %1 %2 %3
@@ -3063,7 +3125,7 @@ Please try again.
<font color="%1">The password needs to be </font><font color="%2">at least %3 characters long</font><font color="%1">, contain </font><font color="%4">lowercase</font><font color="%1">, </font><font color="%5">uppercase</font><font color="%1"> letters as well as </font><font color="%6">numbers</font><font color="%1"> and </font><font color="%7">special characters</font><font color="%1">.</font>
- <font color="%1">비밀번호는 </font><font color="%4">소문자 </font><font color = "% 1">, </ font> <font color = "% 5"> 대문자 </ font> <font color="%1">, </font><font color = "% 1 "> 문자 및 </ font> <font color ="% 6 "> 숫자 </ font><font color="%1">, </font> <font color ="% 7 "> 특수 문자 </ font> <font color="%1">포함 </font><font color="%1">,</font> <font color="%2">최소 % 3 자 이상이어야 합니다<font color="%1">. </ font>
+ <font color="%1">비밀번호는 </font><font color="%4">소문자 </font><font color = "% 1">, </ font> <font color = "% 5"> 대문자 </ font> <font color="%1">, </font><font color = "% 1 "> 문자 및 </ font> <font color ="% 6 "> 숫자 </ font><font color="%1">, </font> <font color ="% 7 "> 특수 문자 </ font> <font color="%1">포함 </font><font color="%1">,</font> <font color="%2">최소 % 3 자 이상이어야 합니다<font color="%1">. </ font>
@@ -3191,20 +3253,36 @@ Please try again.
SelectThingPage
Select a kind of things
- 종류 선택
+ 종류 선택
Select a %1
- %1 선택
+ %1 선택
Select a thing
- 사물(장치) 선택
+ 사물(장치) 선택
Any %1
아무나 %1
+
+ Select kind of things
+
+
+
+ Select %1
+
+
+
+ Select thing
+
+
+
+ OK
+ 확인
+
SensorDevicePagePost110
@@ -3463,6 +3541,14 @@ Please try again.
Next
다음
+
+ OAuth is not supported on this platform. Please use this app on a different device to set up this thing.
+
+
+
+ In order to use OAuth on this platform, make sure qml-module-qtwebview is installed.
+
+
ShutterDeviceListPage
@@ -3640,6 +3726,10 @@ Do you want to proceed?
진행 하시겠습니까?
+
+ Failure adding repository.
+
+
TimeEventDelegate
diff --git a/nymea-app/ui/appsettings/CloudLoginPage.qml b/nymea-app/ui/appsettings/CloudLoginPage.qml
index 57bd7c7f..2ee11a4c 100644
--- a/nymea-app/ui/appsettings/CloudLoginPage.qml
+++ b/nymea-app/ui/appsettings/CloudLoginPage.qml
@@ -180,23 +180,10 @@ Page {
}
RowLayout {
Layout.leftMargin: app.margins; Layout.rightMargin: app.margins
- TextField {
+ PasswordTextField {
id: passwordTextField
Layout.fillWidth: true
- echoMode: hiddenPassword ? TextInput.Password : TextInput.Normal
- property bool hiddenPassword: true
- }
- ColorIcon {
- Layout.preferredHeight: app.iconSize
- Layout.preferredWidth: app.iconSize
- name: "../images/eye.svg"
- color: passwordTextField.hiddenPassword ? keyColor : app.accentColor
- MouseArea {
- anchors.fill: parent
- onClicked: {
- passwordTextField.hiddenPassword = !passwordTextField.hiddenPassword
- }
- }
+ signup: false
}
}
@@ -208,7 +195,7 @@ Page {
enabled: usernameTextField.acceptableInput
onClicked: {
busyOverlay.shown = true
- AWSClient.login(usernameTextField.text, passwordTextField.text);
+ AWSClient.login(usernameTextField.text, passwordTextField.password);
}
}
@@ -338,13 +325,18 @@ Page {
id: passwordTextField
Layout.leftMargin: app.margins; Layout.rightMargin: app.margins
Layout.fillWidth: true
+ minPasswordLength: 8
+ requireLowerCaseLetter: true
+ requireUpperCaseLetter: true
+ requireNumber: true
+ requireSpecialChar: false
}
Button {
Layout.fillWidth: true
Layout.leftMargin: app.margins; Layout.rightMargin: app.margins; Layout.topMargin: app.margins
text: qsTr("Sign up")
- enabled: usernameTextField.acceptableInput && passwordTextField.isValidPassword
+ enabled: usernameTextField.acceptableInput && passwordTextField.isValid
onClicked: {
busyOverlay.shown = true;
AWSClient.signup(usernameTextField.text, passwordTextField.password)
@@ -576,13 +568,18 @@ Page {
PasswordTextField {
id: passwordTextField
+ minPasswordLength: 8
+ requireLowerCaseLetter: true
+ requireUpperCaseLetter: true
+ requireNumber: true
+ requireSpecialChar: false
Layout.fillWidth: true; Layout.leftMargin: app.margins; Layout.rightMargin: app.margins
}
Button {
Layout.fillWidth: true; Layout.leftMargin: app.margins; Layout.rightMargin: app.margins
text: qsTr("Reset password")
- enabled: passwordTextField.isValidPassword && codeTextField.text.length > 0
+ enabled: passwordTextField.isValid && codeTextField.text.length > 0
onClicked: {
busyOverlay.shown = true
AWSClient.confirmForgotPassword(confirmResetPasswordPage.email, codeTextField.text, passwordTextField.password)
diff --git a/nymea-app/ui/components/PasswordTextField.qml b/nymea-app/ui/components/PasswordTextField.qml
index 9822a037..4ee3d03e 100644
--- a/nymea-app/ui/components/PasswordTextField.qml
+++ b/nymea-app/ui/components/PasswordTextField.qml
@@ -5,18 +5,31 @@ import QtQuick.Layouts 1.2
ColumnLayout {
id: root
- property int minPasswordLength: 12
property bool signup: true
+ // Only used when signup is true
+ property int minPasswordLength: 12
+ property bool requireSpecialChar: true
+ property bool requireNumber: true
+ property bool requireUpperCaseLetter: true
+ property bool requireLowerCaseLetter: true
+
readonly property alias password: passwordTextField.text
- readonly property bool isValidPassword: isLongEnough && hasLower && hasUpper && hasNumbers && hasSpecialChar && (confirmationMatches || !signup)
+ readonly property bool isValidPassword:
+ isLongEnough &&
+ (hasLower || !requireLowerCaseLetter) &&
+ (hasUpper || !requireUpperCaseLetter) &&
+ (hasNumbers || !requireNumber) &&
+ (hasSpecialChar || !requireSpecialChar)
+
+ readonly property bool isValid: !signup || (isValidPassword && confirmationMatches)
readonly property bool isLongEnough: passwordTextField.text.length >= minPasswordLength
readonly property bool hasLower: passwordTextField.text.search(/[a-z]/) >= 0
readonly property bool hasUpper: passwordTextField.text.search(/[A-Z/]/) >= 0
- readonly property bool hasNumbers: passwordTextField.text.search(/[0-9]/) >= 0
- readonly property bool hasSpecialChar: passwordTextField.text.search(/[\.,\*!"$%&/()=?`'+#'¡^°²³¼\[\]|{}\\@]/) >= 0
+ readonly property bool hasNumbers: passwordTextField.text.search(/[0-9]/) >= 0
+ readonly property bool hasSpecialChar: passwordTextField.text.search(/(?=.*?[$*.\[\]{}()?\-'"!@#%&/\\,><':;|_~`^])/) >= 0
readonly property bool confirmationMatches: passwordTextField.text === confirmationPasswordTextField.text
property bool hiddenPassword: true
@@ -29,6 +42,41 @@ ColumnLayout {
Layout.fillWidth: true
echoMode: root.hiddenPassword ? TextInput.Password : TextInput.Normal
placeholderText: root.signup ? qsTr("Pick a password") : ""
+
+ ToolTip.visible: root.signup && focus && !root.isValidPassword
+ ToolTip.delay: 1000
+ ToolTip.onVisibleChanged: print("Tooltip visible changed:", ToolTip.visible, focus, root.isValidPassword)
+ ToolTip.text: {
+ var texts = []
+ var checks = []
+ texts.push(qsTr("Minimum %1 characters").arg(root.minPasswordLength))
+ checks.push(root.isLongEnough)
+ if (root.requireLowerCaseLetter) {
+ texts.push(qsTr("Lowercase letters"))
+ checks.push(root.hasLower)
+ }
+ if (root.requireUpperCaseLetter) {
+ texts.push(qsTr("Uppercase letters"))
+ checks.push(root.hasUpper)
+ }
+ if (root.requireNumber) {
+ texts.push(qsTr("Numbers"))
+ checks.push(root.hasNumbers)
+ }
+ if (root.requireSpecialChar) {
+ texts.push(qsTr("Special characters"))
+ checks.push(root.hasSpecialChar)
+ }
+ var ret = []
+ for (var i = 0; i < texts.length; i++) {
+ var entry = "• ".arg(checks[i] ? app.foregroundColor : app.accentColor)
+ entry += texts[i]
+ entry += ""
+ ret.push(entry)
+ }
+ return ret.join("
")
+ }
+
}
ColorIcon {
Layout.preferredHeight: app.iconSize
@@ -44,24 +92,6 @@ ColumnLayout {
}
}
-
- Label {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- visible: root.signup
-
- // TRANSLATORS: %1 will be replaced with the normal text color, %2 the color for the length check
- text: qsTr("The password needs to be at least %3 characters long, contain lowercase, uppercase letters as well as numbers and special characters.")
- .arg(app.accentColor)
- .arg(!root.isLongEnough ? "red" : app.accentColor)
- .arg(root.minPasswordLength)
- .arg(!root.hasLower ? "red" : app.accentColor)
- .arg(!root.hasUpper ? "red" : app.accentColor)
- .arg(!root.hasNumbers ? "red" : app.accentColor)
- .arg(!root.hasSpecialChar ? "red" : app.accentColor)
- font.pixelSize: app.smallFont
- }
-
RowLayout {
visible: root.signup
@@ -71,28 +101,5 @@ ColumnLayout {
echoMode: root.hiddenPassword ? TextInput.Password : TextInput.Normal
placeholderText: qsTr("Confirm password")
}
-
- ColorIcon {
- Layout.preferredHeight: app.iconSize
- Layout.preferredWidth: app.iconSize
- name: "../images/eye.svg"
- color: root.hiddenPassword ? keyColor : app.accentColor
- MouseArea {
- anchors.fill: parent
- onClicked: {
- root.hiddenPassword = !root.hiddenPassword
- }
- }
- }
- }
-
-
- Label {
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- visible: root.signup
-
- text: root.confirmationMatches ? qsTr("The passwords match.").arg(app.accentColor) : qsTr("The passwords do not match.").arg(app.accentColor).arg("red")
- font.pixelSize: app.smallFont
}
}
diff --git a/nymea-app/ui/connection/LoginPage.qml b/nymea-app/ui/connection/LoginPage.qml
index b5baef09..b9d49e92 100644
--- a/nymea-app/ui/connection/LoginPage.qml
+++ b/nymea-app/ui/connection/LoginPage.qml
@@ -104,6 +104,10 @@ Page {
id: passwordTextField
Layout.fillWidth: true
minPasswordLength: 8
+ requireLowerCaseLetter: true
+ requireUpperCaseLetter: true
+ requireNumber: true
+ requireSpecialChar: false
signup: engine.jsonRpcClient.initialSetupRequired
}
}
@@ -112,7 +116,7 @@ Page {
Layout.fillWidth: true
Layout.leftMargin: app.margins; Layout.rightMargin: app.margins; Layout.bottomMargin: app.margins
text: qsTr("OK")
- enabled: passwordTextField.isValidPassword
+ enabled: passwordTextField.isValid
onClicked: {
if (engine.jsonRpcClient.initialSetupRequired) {
print("create user")
diff --git a/nymea-app/ui/thingconfiguration/SetupWizard.qml b/nymea-app/ui/thingconfiguration/SetupWizard.qml
index b3560e43..55afc4a6 100644
--- a/nymea-app/ui/thingconfiguration/SetupWizard.qml
+++ b/nymea-app/ui/thingconfiguration/SetupWizard.qml
@@ -440,11 +440,11 @@ Page {
visible: pairingPage.setupMethod === "SetupMethodUserAndPassword"
}
- TextField {
+ PasswordTextField {
id: pinTextField
Layout.fillWidth: true
visible: pairingPage.setupMethod === "SetupMethodDisplayPin" || pairingPage.setupMethod === "SetupMethodUserAndPassword"
- echoMode: TextField.Password
+ signup: false
}