added 'insert' button and 'show password' button for PageSetupWizardCredentials
This commit is contained in:
parent
66f9a82f31
commit
aa66133813
10 changed files with 53 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,6 +8,7 @@ deploy/build/*
|
|||
deploy/build_32/*
|
||||
deploy/build_64/*
|
||||
winbuild*.bat
|
||||
.cache/
|
||||
|
||||
|
||||
# Qt-es
|
||||
|
|
|
@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
|||
|
||||
set(PROJECT AmneziaVPN)
|
||||
|
||||
project(${PROJECT} VERSION 3.0.8.1
|
||||
project(${PROJECT} VERSION 4.0.0.1
|
||||
DESCRIPTION "AmneziaVPN"
|
||||
HOMEPAGE_URL "https://amnezia.org/"
|
||||
)
|
||||
set(RELEASE_DATE "2023-07-15")
|
||||
set(RELEASE_DATE "2023-07-31")
|
||||
set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
|
|
6
client/images/controls/eye-off.svg
Normal file
6
client/images/controls/eye-off.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.88 9.87988C9.58526 10.1545 9.34885 10.4857 9.18488 10.8537C9.02091 11.2217 8.93274 11.619 8.92564 12.0218C8.91853 12.4246 8.99263 12.8247 9.14351 13.1983C9.2944 13.5718 9.51898 13.9112 9.80385 14.196C10.0887 14.4809 10.4281 14.7055 10.8016 14.8564C11.1752 15.0073 11.5753 15.0814 11.9781 15.0742C12.3809 15.0671 12.7782 14.979 13.1462 14.815C13.5142 14.651 13.8454 14.4146 14.12 14.1199" stroke="#CBCBCB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.73 5.08C11.1513 5.02751 11.5754 5.00079 12 5C19 5 22 12 22 12C21.5529 12.9571 20.9922 13.8569 20.33 14.68" stroke="#CBCBCB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6.61 6.61011C4.62125 7.96473 3.02987 9.82537 2 12.0001C2 12.0001 5 19.0001 12 19.0001C13.9159 19.0052 15.7908 18.4452 17.39 17.3901" stroke="#CBCBCB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2 2L22 22" stroke="#CBCBCB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
4
client/images/controls/eye.svg
Normal file
4
client/images/controls/eye.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 12C2 12 5 5 12 5C19 5 22 12 22 12C22 12 19 19 12 19C5 19 2 12 2 12Z" stroke="#CBCBCB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z" stroke="#CBCBCB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
After Width: | Height: | Size: 474 B |
|
@ -278,5 +278,7 @@
|
|||
<file>images/controls/copy.svg</file>
|
||||
<file>ui/qml/Pages2/PageServiceTorWebsiteSettings.qml</file>
|
||||
<file>ui/qml/Pages2/PageSetupWizardQrReader.qml</file>
|
||||
<file>images/controls/eye.svg</file>
|
||||
<file>images/controls/eye-off.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -11,17 +11,17 @@ Item {
|
|||
readonly property int defaultMargin: 20
|
||||
|
||||
function isMobile() {
|
||||
if (Qt.platform.os == "android" ||
|
||||
Qt.platform.os == "ios") {
|
||||
if (Qt.platform.os === "android" ||
|
||||
Qt.platform.os === "ios") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function isDesktop() {
|
||||
if (Qt.platform.os == "windows" ||
|
||||
Qt.platform.os == "linux" ||
|
||||
Qt.platform.os == "osx") {
|
||||
if (Qt.platform.os === "windows" ||
|
||||
Qt.platform.os === "linux" ||
|
||||
Qt.platform.os === "osx") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
|
@ -54,7 +54,11 @@ Button {
|
|||
|
||||
contentItem: Item {
|
||||
anchors.fill: background
|
||||
|
||||
implicitWidth: content.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
RowLayout {
|
||||
id: content
|
||||
anchors.centerIn: parent
|
||||
|
||||
Image {
|
||||
|
@ -72,6 +76,7 @@ Button {
|
|||
ButtonTextType {
|
||||
color: textColor
|
||||
text: root.text
|
||||
visible: root.text === "" ? false : true
|
||||
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
@ -14,6 +14,7 @@ Item {
|
|||
property alias errorText: errorField.text
|
||||
|
||||
property string buttonText
|
||||
property string buttonImageSource
|
||||
property var clickedFunc
|
||||
|
||||
property alias textField: textField
|
||||
|
@ -101,7 +102,7 @@ Item {
|
|||
}
|
||||
|
||||
BasicButtonType {
|
||||
visible: root.buttonText !== ""
|
||||
visible: (root.buttonText !== "") || (root.buttonImageSource !== "")
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
|
@ -111,8 +112,10 @@ Item {
|
|||
borderWidth: 0
|
||||
|
||||
text: root.buttonText
|
||||
imageSource: root.buttonImageSource
|
||||
|
||||
Layout.rightMargin: 24
|
||||
Layout.preferredHeight: 32
|
||||
|
||||
onClicked: {
|
||||
if (root.clickedFunc && typeof root.clickedFunc === "function") {
|
||||
|
|
|
@ -76,9 +76,9 @@ It's okay if a friend passed the code.")
|
|||
|
||||
DividerType {}
|
||||
|
||||
//todo ifdef mobile platforms
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
visible: GC.isMobile()
|
||||
|
||||
text: qsTr("QR-code")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
@ -90,7 +90,9 @@ It's okay if a friend passed the code.")
|
|||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
DividerType {
|
||||
visible: GC.isMobile()
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
@ -53,6 +53,12 @@ PageType {
|
|||
textField.validator: RegularExpressionValidator {
|
||||
regularExpression: InstallController.ipAddressPortRegExp()
|
||||
}
|
||||
buttonText: qsTr("Insert")
|
||||
|
||||
clickedFunc: function() {
|
||||
textField.text = ""
|
||||
textField.paste()
|
||||
}
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
|
@ -61,14 +67,27 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
headerText: qsTr("Login to connect via SSH")
|
||||
textFieldPlaceholderText: "root"
|
||||
buttonText: qsTr("Insert")
|
||||
|
||||
clickedFunc: function() {
|
||||
textField.text = ""
|
||||
textField.paste()
|
||||
}
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
id: secretData
|
||||
|
||||
property bool hidePassword: true
|
||||
|
||||
Layout.fillWidth: true
|
||||
headerText: qsTr("Password / SSH private key")
|
||||
textField.echoMode: TextInput.Password
|
||||
textField.echoMode: hidePassword ? TextInput.Password : TextInput.Normal
|
||||
buttonImageSource: hidePassword ? "qrc:/images/controls/eye.svg" : "qrc:/images/controls/eye-off.svg"
|
||||
|
||||
clickedFunc: function() {
|
||||
hidePassword = !hidePassword
|
||||
}
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue