From 0abaa610672337dd6761277f255b28917f514717 Mon Sep 17 00:00:00 2001 From: rinzlxr Date: Thu, 25 Mar 2021 04:17:33 +0200 Subject: [PATCH] fix: typos and switch statement string literals remove console log fix last typo --- .../Profile/Sections/Ens/Search.qml | 29 ++++++------------- ui/imports/Constants.qml | 2 +- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/Ens/Search.qml b/ui/app/AppLayouts/Profile/Sections/Ens/Search.qml index 5658b5ca05..810caef85e 100644 --- a/ui/app/AppLayouts/Profile/Sections/Ens/Search.qml +++ b/ui/app/AppLayouts/Profile/Sections/Ens/Search.qml @@ -72,21 +72,10 @@ Item { width: 624 anchors.horizontalCenter: parent.horizontalCenter - StyledText { - id: sectionTitle - text: "" - anchors.left: parent.left - anchors.leftMargin: Style.current.bigPadding - anchors.top: parent.top - anchors.topMargin: Style.current.bigPadding - font.weight: Font.Bold - font.pixelSize: 20 - } - Rectangle { id: circleAt - anchors.top: sectionTitle.bottom - anchors.topMargin: Style.current.bigPadding + anchors.top: parent.top + anchors.topMargin: Style.current.bigPadding*2 anchors.horizontalCenter: parent.horizontalCenter width: 60 height: 60 @@ -143,17 +132,17 @@ Item { loading = false; ensStatus = ensResult; switch(ensResult){ - case Constants.ens_available: - case Constants.ens_owned: - case Constants.ens_connected: - case Constants.ens_connected_dkey: + case "available": + case "owned": + case "connected": + case "connected-different-key": valid = true; validationMessage = Constants.ensState[ensResult] break; - case Constants.ens_taken: - validationMessage = !isStatus ? Constants.ensState['taken_custom'] : Constants.ensState['taken']; + case "taken": + validationMessage = Constants.ensState[!isStatus ? 'taken-custom' : 'taken'] break; - case Constants.already_connected: + case "already-connected": validationMessage = Constants.ensState[ensResult] break; } diff --git a/ui/imports/Constants.qml b/ui/imports/Constants.qml index 4bdf823e74..d61f83805c 100644 --- a/ui/imports/Constants.qml +++ b/ui/imports/Constants.qml @@ -144,7 +144,7 @@ QtObject { //% "Continuing will connect this username with your chat key." "owned": qsTrId("ens-username-owned-continue"), //% "✓ Username available!" - "availabe": qsTrId("ens-username-available"), + "available": qsTrId("ens-username-available"), //% "Username is already connected with your chat key and can be used inside Status." "already-connected": qsTrId("ens-username-already-added"), //% "This user name is owned by you and connected with your chat key. Continue to set `Show my ENS username in chats`."