diff --git a/assets/core/account_circle-24px_lines_thin-blocked.svg b/assets/core/account_circle-24px_lines_thin-blocked.svg
new file mode 100644
index 00000000..5c3b9b7a
--- /dev/null
+++ b/assets/core/account_circle-24px_lines_thin-blocked.svg
@@ -0,0 +1,22 @@
+
+
+
diff --git a/assets/core/account_circle-24px_negative_space.svg b/assets/core/account_circle-24px_negative_space.svg
new file mode 100644
index 00000000..c9c4f83c
--- /dev/null
+++ b/assets/core/account_circle-24px_negative_space.svg
@@ -0,0 +1,17 @@
+
+
+
diff --git a/i18n/translation_de.ts b/i18n/translation_de.ts
index 68ad72ff..40bee578 100644
--- a/i18n/translation_de.ts
+++ b/i18n/translation_de.ts
@@ -292,55 +292,55 @@
PeerSettingsPane
-
+
Adresse
-
+
Kopieren
-
+
notification: copied to clipboard
in die Zwischenablage kopiert
-
+
Angezeigter Name
-
+
speichern
-
-
+
+
Save Peer History
-
+
-
+
-
+
löschen
-
+
@@ -348,114 +348,120 @@
ProfileAddEditPane
-
-
+
+
default suggested profile name
-
+
- Onion
+ Send this address to peers you want to connect with
-
+
Kopieren
-
+
notification: copied to clipboard
in die Zwischenablage kopiert
-
-
- Display name
-
-
-
-
+
Password
-
+
Unencrypted (No password)
-
+
Not using a password on this account means that all data stored locally will not be encrypted
-
+
+
+ New Profile || Edit Profile
+
+
+
+
+
+
+
+
+
Current Password
-
+
Password
-
+
Reenter password
-
+
- Create Profile || Save Profile
+ Create || Save
-
+
-
+
Passwords do not match
-
+
Error changing password: Supplied password rejected
-
+
Delete Profile
-
+
+
Type DELETE to confirm
-
+
Really Delete Profile
-
+
DELETE
@@ -520,66 +526,66 @@
Benutzeroberflächen-Zoom (betriftt hauptsächlich Text- und Knopgrößen)
-
+
Language
-
+
-
+
-
+
-
+
-
+
Interface Zoom
-
+
Groß
-
+
Theme
-
+
-
+
-
+
Version %1
-
+
Built on: %2
@@ -590,7 +596,7 @@
defaultmäßige Textgröße (Skalierungsfaktor:
-
+
Klein
diff --git a/i18n/translation_en.qm b/i18n/translation_en.qm
index a0a111b1..5a0195a7 100644
Binary files a/i18n/translation_en.qm and b/i18n/translation_en.qm differ
diff --git a/i18n/translation_en.ts b/i18n/translation_en.ts
index d5c4beda..75a00117 100644
--- a/i18n/translation_en.ts
+++ b/i18n/translation_en.ts
@@ -172,7 +172,7 @@ Right-click to reset.
notification: copied to clipboard
- Copied to Clipboard
+ Copied to Clipboard
@@ -197,12 +197,12 @@ Right-click to reset.
- Synced
+ Synced
- Out of Sync
+ Out of Sync
@@ -372,50 +372,50 @@ Right-click to reset.
PeerSettingsPane
-
+
Address
-
+
Copy
-
+
notification: copied to clipboard
Copied to Clipboard
-
+
Display Name
-
+
Save
-
+
Block Peer
-
-
+
+
Save Peer History
Save Peer History
-
+
Determines whether or not to delete any history associated with the peer.
-
+
Delete Peer History
@@ -424,7 +424,7 @@ Right-click to reset.
Unblock Peer
-
+
Delete
@@ -440,114 +440,125 @@ Right-click to reset.
Edit Profile
-
Display name
- Display name
+ Display name
-
-
+
+
default suggested profile name
Alice
-
-
- Onion
- Onion
+
+
+ New Profile || Edit Profile
+ New Profile
-
+
+
+ Edit Profille
+
+
+
+
+ Send this address to peers you want to connect with
+ Send this address to peers you want to connect with
+
+
+
Copy
-
+
notification: copied to clipboard
Copied to Clipboard
-
+
Password
Password
-
+
Unencrypted (No password)
Unencrypted (No password)
-
+
Not using a password on this account means that all data stored locally will not be encrypted
Not using a password on this account means that all data stored locally will not be encrypted
-
+
Current Password
Current Password
-
+
Password
Password
-
+
Reenter password
Reenter password
-
+
- Create Profile || Save Profile
+ Create || Save
Create Profile
-
+
Save Profile
-
+
Passwords do not match
Passwords do not match
-
+
Error changing password: Supplied password rejected
Error changing password: Supplied password rejected
-
+
Delete Profile
Delete Profile
-
+
+
Type DELETE to confirm
Type DELETE to confirm
-
+
Really Delete Profile
Really Delete Profile
-
+
DELETE
DELETE
@@ -621,66 +632,66 @@ Right-click to reset.
Block Unknown Peers
-
+
Language
Language
-
+
English
-
+
Frances
-
+
Portuguesa
-
+
Deutsche
-
+
Interface Zoom
Zoom level
-
+
Large
-
+
Theme
Theme
-
+
Light
-
+
Dark
-
+
Version %1
Version %1
-
+
Built on: %2
Built on: %2
@@ -691,7 +702,7 @@ Right-click to reset.
Default size text (scale factor:
-
+
Small
diff --git a/i18n/translation_fr.ts b/i18n/translation_fr.ts
index abda02d8..bab389d5 100644
--- a/i18n/translation_fr.ts
+++ b/i18n/translation_fr.ts
@@ -292,55 +292,55 @@
PeerSettingsPane
-
+
Adresse
-
+
Copier
-
+
notification: copied to clipboard
Copié dans le presse-papier
-
+
Pseudo
-
+
Sauvegarder
-
-
+
+
Save Peer History
-
+
-
+
-
+
Effacer
-
+
@@ -348,114 +348,120 @@
ProfileAddEditPane
-
-
+
+
default suggested profile name
-
+
- Onion
+ Send this address to peers you want to connect with
-
+
Copier
-
+
notification: copied to clipboard
Copié dans le presse-papier
-
-
- Display name
-
-
-
-
+
Password
-
+
Unencrypted (No password)
-
+
Not using a password on this account means that all data stored locally will not be encrypted
-
+
+
+ New Profile || Edit Profile
+
+
+
+
+
+
+
+
+
Current Password
-
+
Password
-
+
Reenter password
-
+
- Create Profile || Save Profile
+ Create || Save
-
+
-
+
Passwords do not match
-
+
Error changing password: Supplied password rejected
-
+
Delete Profile
-
+
+
Type DELETE to confirm
-
+
Really Delete Profile
-
+
DELETE
@@ -520,66 +526,66 @@
Interface zoom (essentiellement la taille du texte et des composants de l'interface)
-
+
Language
-
+
-
+
-
+
-
+
-
+
Interface Zoom
-
+
Large
-
+
Theme
-
+
-
+
-
+
Version %1
-
+
Built on: %2
@@ -590,7 +596,7 @@
Taille par défaut du texte (échelle:
-
+
Petit
diff --git a/i18n/translation_pt.ts b/i18n/translation_pt.ts
index 349a5948..237bff16 100644
--- a/i18n/translation_pt.ts
+++ b/i18n/translation_pt.ts
@@ -292,55 +292,55 @@
PeerSettingsPane
-
+
Endereço
-
+
Copiar
-
+
notification: copied to clipboard
Copiado
-
+
Nome de Exibição
-
+
Salvar
-
-
+
+
Save Peer History
-
+
-
+
-
+
Deletar
-
+
@@ -348,114 +348,120 @@
ProfileAddEditPane
-
-
+
+
default suggested profile name
-
+
- Onion
+ Send this address to peers you want to connect with
-
+
Copiar
-
+
notification: copied to clipboard
Copiado
-
-
- Display name
-
-
-
-
+
Password
-
+
Unencrypted (No password)
-
+
Not using a password on this account means that all data stored locally will not be encrypted
-
+
+
+ New Profile || Edit Profile
+
+
+
+
+
+
+
+
+
Current Password
-
+
Password
-
+
Reenter password
-
+
- Create Profile || Save Profile
+ Create || Save
-
+
-
+
Passwords do not match
-
+
Error changing password: Supplied password rejected
-
+
Delete Profile
-
+
+
Type DELETE to confirm
-
+
Really Delete Profile
-
+
DELETE
@@ -520,66 +526,66 @@
Zoom da interface (afeta principalmente tamanho de texto e botões)
-
+
Language
-
+
-
+
-
+
-
+
-
+
Interface Zoom
-
+
Grande
-
+
Theme
-
+
-
+
-
+
Version %1
-
+
Built on: %2
@@ -590,7 +596,7 @@
Texto tamanho padrão (fator de escala:
-
+
Pequeno
diff --git a/qml/opaque b/qml/opaque
index 12b7e514..c33a868d 160000
--- a/qml/opaque
+++ b/qml/opaque
@@ -1 +1 @@
-Subproject commit 12b7e51497868515401edc68be5514c020472da9
+Subproject commit c33a868d0c39929c3cc75ad272f7c9c27da50b2e
diff --git a/qml/panes/GroupSettingsPane.qml b/qml/panes/GroupSettingsPane.qml
index f3dbb722..e7d45789 100644
--- a/qml/panes/GroupSettingsPane.qml
+++ b/qml/panes/GroupSettingsPane.qml
@@ -78,59 +78,59 @@ Opaque.SettingsList { // groupSettingsPane
Opaque.Setting {
property color backgroundColor: parent.color
- inline: true
- label: qsTr("server-info")
- field: Column {
- width: parent.width
- spacing:10
- RowLayout {
- width: parent.width
- Layout.fillWidth: true
- Opaque.ScalingLabel {
- text: gsp.connected ? qsTr("server-connectivity-connected") : qsTr("server-connectivity-disconnected")
- Layout.alignment: Qt.AlignLeft
- }
- Opaque.Icon {
- backgroundColor: Theme.backgroundPaneColor
- id: serverStatusIcon
- height: 18
- width: 18
- Layout.alignment: Qt.AlignRight
- iconColor: gsp.connected ? Theme.statusbarOnlineFontColor : Theme.statusbarDisconnectedTorFontColor
- source: gcd.assetPath + (gsp.connected ? "core/signal_cellular_4_bar-24px.svg" : "core/signal_cellular_connected_no_internet_4_bar-24px.svg")
- }
- }
- RowLayout {
- width: parent.width
- Layout.fillWidth: true
+ inline: true
+ label: qsTr("server-info")
+ field: Column {
+ width: parent.width
+ spacing:10
+ RowLayout {
+ width: parent.width
+ Layout.fillWidth: true
+ Opaque.ScalingLabel {
+ text: gsp.connected ? qsTr("server-connectivity-connected") : qsTr("server-connectivity-disconnected")
+ Layout.alignment: Qt.AlignLeft
+ }
+ Opaque.Icon {
+ backgroundColor: Theme.backgroundPaneColor
+ id: serverStatusIcon
+ height: 18
+ width: 18
+ Layout.alignment: Qt.AlignRight
+ iconColor: gsp.connected ? Theme.statusbarOnlineFontColor : Theme.statusbarDisconnectedTorFontColor
+ source: gcd.assetPath + (gsp.connected ? "core/signal_cellular_4_bar-24px.svg" : "core/signal_cellular_connected_no_internet_4_bar-24px.svg")
+ }
+ }
+ RowLayout {
+ width: parent.width
+ Layout.fillWidth: true
- Opaque.ScalingLabel {
- text: gsp.synced ? qsTr("server-synced") : qsTr("server-not-synced")
- Layout.alignment: Qt.AlignLeft
- }
- Opaque.Icon {
- id: serverSyncedStatusIcon
- backgroundColor: Theme.backgroundPaneColor
- height: 18
- width: 18
- Layout.alignment: Qt.AlignRight
- iconColor : gsp.synced ? Theme.statusbarOnlineFontColor : Theme.statusbarConnectingFontColor
- source: gcd.assetPath + (gsp.synced ? "core/syncing-01.svg" : "core/syncing-03.svg")
- }
- }
+ Opaque.ScalingLabel {
+ text: gsp.synced ? qsTr("server-synced") : qsTr("server-not-synced")
+ Layout.alignment: Qt.AlignLeft
+ }
+ Opaque.Icon {
+ id: serverSyncedStatusIcon
+ backgroundColor: Theme.backgroundPaneColor
+ height: 18
+ width: 18
+ Layout.alignment: Qt.AlignRight
+ iconColor : gsp.synced ? Theme.statusbarOnlineFontColor : Theme.statusbarConnectingFontColor
+ source: gcd.assetPath + (gsp.synced ? "core/syncing-01.svg" : "core/syncing-03.svg")
+ }
+ }
- Opaque.Button {
- icon: "regular/hdd"
- text: qsTr("view-server-info")
- anchors.right: parent.right
+ Opaque.Button {
+ icon: "regular/hdd"
+ text: qsTr("view-server-info")
+ anchors.right: parent.right
- onClicked: {
- gcd.requestServerSettings(gcd.selectedConversation)
- theStack.pane = theStack.serverInfoPane
- }
- }
+ onClicked: {
+ gcd.requestServerSettings(gcd.selectedConversation)
+ theStack.pane = theStack.serverInfoPane
+ }
+ }
- }
+ }
}
@@ -152,7 +152,7 @@ Opaque.SettingsList { // groupSettingsPane
}
}
- }
+ }
Connections {
target: gcd
diff --git a/qml/panes/OverlayPane.qml b/qml/panes/OverlayPane.qml
index 911b0db1..24b8a204 100644
--- a/qml/panes/OverlayPane.qml
+++ b/qml/panes/OverlayPane.qml
@@ -33,10 +33,10 @@ ColumnLayout {
//: Accept group invite button
text: qsTr("accept-group-btn")
icon: "regular/heart"
- onClicked: {
- gcd.acceptGroup(gcd.selectedConversation)
- gcd.requestGroupSettings(gcd.selectedConversation)
- }
+ onClicked: {
+ gcd.acceptGroup(gcd.selectedConversation)
+ gcd.requestGroupSettings(gcd.selectedConversation)
+ }
}
Opaque.Button {
diff --git a/qml/panes/PeerSettingsPane.qml b/qml/panes/PeerSettingsPane.qml
index 5d8bbd64..8822822a 100644
--- a/qml/panes/PeerSettingsPane.qml
+++ b/qml/panes/PeerSettingsPane.qml
@@ -15,6 +15,7 @@ import "../const"
Opaque.SettingsList { // settingsPane
id: root
anchors.fill: parent
+ anchors.topMargin: 20
property string authorization
property string saveHistory
diff --git a/qml/panes/ProfileAddEditPane.qml b/qml/panes/ProfileAddEditPane.qml
index 7b9535cc..4f94076c 100644
--- a/qml/panes/ProfileAddEditPane.qml
+++ b/qml/panes/ProfileAddEditPane.qml
@@ -8,11 +8,19 @@ import QtQuick.Window 2.11
import "../opaque" as Opaque
import "../opaque/theme"
+import "../opaque/fonts"
// import "../styles"
-Opaque.SettingsList { // Add Profile Pane
- id: profileAddEditPane
- anchors.fill: parent
+Opaque.Flickable {
+ id: flickRoot
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ contentWidth: rc.width
+ contentHeight: rc.height
+
+ readonly property string mode_add: "add"
+ readonly property string mode_edit: "edit"
property string mode // edit or add
property string onion
@@ -21,32 +29,49 @@ Opaque.SettingsList { // Add Profile Pane
property bool changingPassword
function reset() {
- mode = "add"
+ flickRoot.contentY = 0
+ mode = mode_add
+ reset_errors()
txtProfileName.text = qsTr("default-profile-name")
changingPassword = false
txtPassword1.text = ""
txtPassword2.text = ""
deleting = false
- deleteConfirmLabel.color = "black"
- passwordErrorLabel.visible = false
- txtCurrentPassword.text = ""
+ deleteConfirmLabel.color = Theme.mainTextColor
+ txtCurrentPassword.text = ""
+ nameLabel.text = ""
+
+ portrait.performTransform = true
+ portrait.source = "core/account_circle-24px_negative_space.svg"
tag = ""
confirmDeleteTxt.text = ""
radioUsePassword.checked = true
- passwordChangeErrorLabel.visible = false
}
- function load(userOnion, name, userTag) {
+ function reset_errors() {
+ txtPassword1.error = false
+ txtPassword2.error = false
+ txtCurrentPassword.error = false
+ passwordErrorLabel.visible = false
+ passwordChangeErrorLabel.visible = false
+ confirmDeleteTxt.error = false
+ }
+
+ function load(userOnion, name, userTag, image) {
reset()
- mode = "edit"
+ mode = mode_edit
tag = userTag
onion = userOnion
txtPassword1.text = ""
txtPassword2.text = ""
onionLabel.text = onion
txtProfileName.text = name
+ nameLabel.text = name
+ portrait.performTransform = false
+ portrait.source = image
+
if (tag == "v1-defaultPassword" || tag == "v1-default-password") {
radioNoPassword.checked = true
@@ -56,174 +81,323 @@ Opaque.SettingsList { // Add Profile Pane
}
- settings: Column {
- anchors.horizontalCenter: parent.horizontalCenter
- width: 700
+ Opaque.ResponsiveContainer {
+ id: rc
+ width: flickRoot.width
+
+ Rectangle {
+ id: leftCol
+ color: Theme.backgroundPaneColor
+ //height:
+ implicitHeight: leftContents.height
+ height: implicitHeight
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
- Opaque.Setting {
- inline: false
- visible: mode == "edit"
+ Column {
+ id: leftContents
+ anchors.horizontalCenter: parent.horizontalCenter
+ Layout.alignment : Qt.AlignHCenter + Qt.AlignTop
+ width: 400 * gcd.themeScale
+ spacing: 10 * gcd.themeScale
- //: Onion
- label: qsTr("profile-onion-label") + ":"
+ Opaque.ScalingLabel {
+ anchors.horizontalCenter: parent.horizontalCenter
+ size: Theme.primaryTextSize
- field: Opaque.ButtonTextField {
- id: onionLabel
- readOnly: true
- button_text: qsTr("copy-btn")
- dropShadowColor: Theme.dropShadowPaneColor
- onClicked: {
- //: notification: copied to clipboard
- gcd.popup(qsTr("copied-to-clipboard-notification"))
- onionLabel.selectAll()
- onionLabel.copy()
- }}
- }
-
-
-
- Opaque.Setting {
- inline: false
- visible: mode == "edit"
-
- //: Display name
- label: qsTr("profile-name") + ":"
-
- field: Opaque.UnderlineTextField {
- id: txtProfileName
- //Layout.fillWidth: true
-
- //: default suggested profile name
- text: qsTr("default-profile-name")
- width: parent.width
+ //: New Profile || Edit Profile
+ text: mode == mode_add ? qsTr("new-profile") : qsTr("edit-profile")
+ bold: true
}
- }
+ // spacing
+ Rectangle {
+ height: 30 * gcd.themeScale
+ width: 100
+ color: Theme.backgroundPaneColor
+ }
- Opaque.Setting {
- inline: false
- visible: mode == "add" || tag == "v1-defaultPassword"
+ Opaque.Portrait {
+ id: portrait
- field:
- ColumnLayout{
- RowLayout {
- //id: radioButtons
+ size: 250
- Opaque.RadioButton {
- id: radioUsePassword
- checked: true
- //: Password
- text: qsTr("radio-use-password")
+ Layout.preferredHeight: size
+ anchors.horizontalCenter: parent.horizontalCenter
- onClicked: {
- changingPassword = true
- }
- }
+ portraitBorderColor: Theme.portraitOnlineBorderColor
+ portraitColor: Theme.portraitOnlineBackgroundColor
+ badgeColor: Theme.portraitProfileBadgeColor
- Opaque.RadioButton {
- id: radioNoPassword
- //: Unencrypted (No password)
- text: qsTr("radio-no-password")
- onClicked: {
- changingPassword = true
- }
- }
+ performTransform: true
+ overlayColor: Theme.portraitProfileBadgeTextColor
+
+ badgeContent: Image {// Profle Type
+ id: profiletype
+ source: radioUsePassword.checked ? gcd.assetPath + "/fontawesome/solid/lock.svg" : gcd.assetPath + "/fontawesome/solid/lock-open.svg"
+ height: 40 * gcd.themeScale
+ width: height
}
+ }
+
+ Opaque.ScalingLabel {
+ id: nameLabel
+ visible: mode == mode_edit
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ size: Theme.primaryTextSize
+ bold: true
+ }
+
+ // spacing
+ Rectangle {
+ visible: mode == mode_edit
+ height: 10 * gcd.themeScale
+ width: 100
+ color: Theme.backgroundPaneColor
+ }
+
+ Opaque.ScalingLabel {
+ visible: mode == mode_edit
+ anchors.horizontalCenter: parent.horizontalCenter
+ size: Theme.secondaryTextSize
+
+ //: Send this address to peers you want to connect with
+ text: qsTr("profile-oniblon-label")
+ }
+
+ Opaque.ButtonTextField {
+ id: onionLabel
+ anchors.horizontalCenter: parent.horizontalCenter
+ visible: mode == mode_edit
+ readOnly: true
+
+ width: leftCol.width - (40*gcd.themeScale)
+
+ button_text: qsTr("copy-btn")
+ dropShadowColor: Theme.dropShadowPaneColor
+ onClicked: {
+ //: notification: copied to clipboard
+ gcd.popup(qsTr("copied-to-clipboard-notification"))
+ onionLabel.selectAll()
+ onionLabel.copy()
+ }
+ }
+
+ // spacing
+ Rectangle {
+ visible: radioNoPassword.checked
+ height: 30 * gcd.themeScale
+ width: 100
+ color: Theme.backgroundPaneColor
+ }
+
+ Rectangle {
+ width: parent.width
+ height: noPasswordLabel.visible ? noPasswordLabel.height : 0
+ color: leftCol.color
+ anchors.horizontalCenter: parent.horizontalCenter
Opaque.ScalingLabel {
id: noPasswordLabel
+ width: parent.width
+ size: Theme.secondaryTextSize
+ anchors.horizontalCenter: parent.horizontalCenter
+
//: Not using a password on this account means that all data stored locally will not be encrypted
text: qsTr("no-password-warning")
visible: radioNoPassword.checked
}
}
- }
- Opaque.Setting{
- inline: false
- visible: radioUsePassword.checked && mode == "edit" && tag != "v1-defaultPassword"
-
-
- //: Current Password
- label: qsTr("current-password-label") + ":"
-
- field: Opaque.TextField {
- id: txtCurrentPassword
- Layout.fillWidth: true
- echoMode: TextInput.Password
+ // spacing
+ Rectangle {
+ height: 30 * gcd.themeScale
+ width: 100
+ color: Theme.backgroundPaneColor
}
}
- Opaque.Setting {
- visible: radioUsePassword.checked
- //: Password
- label: qsTr("password1-label") + ":"
+ }
- field: Opaque.TextField {
- id: txtPassword1
- Layout.fillWidth: true
- //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
+
+
+ Rectangle {
+ id: rightCol
+ color: Theme.backgroundPaneColor
+ anchors.topMargin: 80 * gcd.themeScale
+ height: rightContents.height
+ implicitHeight: height
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
+
+
+
+
+ Column {
+ id: rightContents
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ Layout.alignment : Qt.AlignHCenter + Qt.AlignTop
+ width: 400 * gcd.themeScale
+ spacing: 40 * gcd.themeScale
+
+ Opaque.UnderlineTextField {
+ id: txtProfileName
+ visible: mode == mode_edit
+ //Layout.fillWidth: true
+ backgroundColor: Theme.backgroundPaneColor
+ width: parent.width - (40*gcd.themeScale)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ //: default suggested profile name
+ text: qsTr("default-profile-name")
+
+ }
+
+ RowLayout {
+ visible: (mode == mode_add) || (tag == "v1-defaultPassword")
+
+ width: parent.width - (40*gcd.themeScale)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ //id: radioButtons
+
+ Opaque.RadioButton {
+ id: radioUsePassword
+ checked: true
+ //: Password
+ text: qsTr("radio-use-password")
+
+ onClicked: {
+ changingPassword = true
+ }
+ }
+
+ Opaque.RadioButton {
+ id: radioNoPassword
+ //: Unencrypted (No password)
+ text: qsTr("radio-no-password")
+ onClicked: {
+ changingPassword = true
+ }
+ }
+ }
+
+
+ Opaque.UnderlineTextField {
+ id: txtCurrentPassword
+ visible: radioUsePassword.checked && (mode == mode_edit) && tag != "v1-defaultPassword"
+
+ backgroundColor: Theme.backgroundPaneColor
+
+ width: parent.width - (40*gcd.themeScale)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ //: Current Password
+ placeholderText: qsTr("current-password-label") + ":"
echoMode: TextInput.Password
+
+ }
+
+
+ Opaque.UnderlineTextField {
+ id: txtPassword1
visible: radioUsePassword.checked
+ backgroundColor: Theme.backgroundPaneColor
+
+ width: parent.width - (40*gcd.themeScale)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ echoMode: TextInput.Password
+
+ //: Password
+ placeholderText: qsTr("password1-label")
+
onTextEdited: {
changingPassword = true
}
}
- }
- Opaque.Setting {
- visible: radioUsePassword.checked
-
- //: Reenter password
- label: qsTr("password2-label") + ":"
-
- field: Opaque.TextField {
+ Opaque.UnderlineTextField {
id: txtPassword2
- Layout.fillWidth: true
- //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
- echoMode: TextInput.Password
visible: radioUsePassword.checked
+
+ backgroundColor: Theme.backgroundPaneColor
+
+ width: parent.width - (40*gcd.themeScale)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ //: Reenter password
+ placeholderText: qsTr("password2-label")
+
+ echoMode: TextInput.Password
}
- }
+ Opaque.ScalingLabel {
+ id: passwordErrorLabel
+ anchors.horizontalCenter: parent.horizontalCenter
+ size: Theme.secondaryTextSize
+
+ //: Passwords do not match
+ text: qsTr("password-error-match")
+ visible: false
+ color: Theme.textfieldErrorColor
+ }
+
+ Opaque.ScalingLabel {
+ id: passwordChangeErrorLabel
+ anchors.horizontalCenter: parent.horizontalCenter
+ size: Theme.secondaryTextSize
+
+ //: Error changing password: Supplied password rejected
+ text: qsTr("password-change-error")
+ visible: false
+ color: Theme.textfieldErrorColor
+ }
- Column {
- width:parent.width * 0.95
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: 10 * gcd.themeScale
Opaque.Button { // ADD or SAVE button
- anchors.right: parent.right
height: Theme.primaryTextSize * 1.5
+ anchors.horizontalCenter: parent.horizontalCenter
- //: Create Profile || Save Profile
- text: mode == "add" ? qsTr("create-profile-btn") : qsTr("save-profile-btn")
+
+ //: Create || Save
+ text: mode == mode_add ? qsTr("create-profile-btn") : qsTr("save-profile-btn")
onClicked: {
- if (mode == "add") {
+ reset_errors()
+ if (mode == mode_add) {
if (txtPassword1.text != txtPassword2.text) {
passwordErrorLabel.visible = true
+ txtPassword1.error = true
+ txtPassword2.error = true
} else {
gcd.createProfile(txtProfileName.text, radioNoPassword.checked, txtPassword1.text)
gcd.reloadProfileList()
parentStack.pane = parentStack.managementPane
}
} else {
+ console.log("Save clicked")
gcd.updateNick(onion, txtProfileName.text)
if (changingPassword) {
+ console.log("changingPassword")
if (txtPassword1.text != txtPassword2.text) {
passwordErrorLabel.visible = true
+ txtPassword1.error = true
+ txtPassword2.error = true
} else {
+ console.log("gcd.changePassword")
gcd.changePassword(onion, txtCurrentPassword.text, txtPassword1.text, radioNoPassword.checked)
}
} else {
@@ -235,38 +409,17 @@ Opaque.SettingsList { // Add Profile Pane
}
}
- Opaque.ScalingLabel {
- id: passwordErrorLabel
- //: Passwords do not match
- text: qsTr("password-error-match")
- visible: false
- color: "red"
- }
-
- Opaque.ScalingLabel {
- id: passwordChangeErrorLabel
- //: Error changing password: Supplied password rejected
- text: qsTr("password-change-error")
- visible: false
- color: "red"
- }
-
-
-
-
// ***** Delete button and confirm flow *****
-
-
-
Opaque.Button {
anchors.right: parent.right
+ anchors.rightMargin: 20 * gcd.themeScale
//: Delete Profile
text: qsTr("delete-profile-btn")
- icon: "regular/trash-alt"
- visible: mode == "edit"
+ //icon: "regular/trash-alt"
+ visible: mode == mode_edit
height: Theme.primaryTextSize * 1.5
@@ -277,47 +430,65 @@ Opaque.SettingsList { // Add Profile Pane
Opaque.ScalingLabel {
id: deleteConfirmLabel
+ size: Theme.secondaryTextSize
+
+ anchors.right: parent.right
+ anchors.rightMargin: 20 * gcd.themeScale
+
//: Type DELETE to confirm
text: qsTr("delete-confirm-label")+ ":"
visible: deleting
}
- Opaque.TextField {
+ Opaque.UnderlineTextField {
id: confirmDeleteTxt
- Layout.fillWidth: true
- //style: CwtchTextFieldStyle{ width: tehcol.width * 0.8 }
visible: deleting
+ backgroundColor: Theme.backgroundPaneColor
+
+ width: 300 * gcd.themeScale
+ anchors.right: parent.right
+ anchors.rightMargin: 20 * gcd.themeScale
+
+ placeholderText: qsTr("delete-confirm-label")
}
Opaque.Button {
id: confirmDeleteBtn
- icon: "regular/trash-alt"
+
+ height: Theme.primaryTextSize * 1.5
+ anchors.right: parent.right
+ anchors.rightMargin: 20 * gcd.themeScale
//: Really Delete Profile
text: qsTr("delete-profile-confirm-btn")
- color: "red"
visible: deleting
onClicked: {
//: DELETE
if (confirmDeleteTxt.text == qsTr("delete-confirm-text")) {
- deleteConfirmLabel.color = "black"
+ deleteConfirmLabel.color = Theme.mainTextColor
gcd.deleteProfile(onion)
gcd.reloadProfileList()
parentStack.pane = parentStack.managementPane
} else {
- deleteConfirmLabel.color = "red"
+ confirmDeleteTxt.error = true
+ deleteConfirmLabel.color = Theme.textfieldErrorColor
}
}
}
+
+ // spacing
+ Rectangle {
+ height: 30 * gcd.themeScale
+ width: 100
+ color: Theme.backgroundPaneColor
+ }
}
+ }
- }//end of column
-
-
- Connections { // UPDATE UNREAD MESSAGES COUNTER
+ Connections {
target: gcd
onChangePasswordResponse: function(error) {
@@ -326,7 +497,9 @@ Opaque.SettingsList { // Add Profile Pane
parentStack.pane = parentStack.managementPane
} else {
passwordChangeErrorLabel.visible = true
+ txtCurrentPassword.error = true
}
}
}
}
+}
diff --git a/qml/panes/ProfileManagerPane.qml b/qml/panes/ProfileManagerPane.qml
index beceedde..903a8313 100644
--- a/qml/panes/ProfileManagerPane.qml
+++ b/qml/panes/ProfileManagerPane.qml
@@ -28,7 +28,6 @@ ColumnLayout {
wrapMode: TextEdit.Wrap
size: Theme.primaryTextSize
-
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
@@ -112,6 +111,8 @@ ColumnLayout {
size: Theme.primaryTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
+ anchors.left: parent.left
+ anchors.leftMargin: 25 * gcd.themeScale
//: Your Profiles
text: qsTr("your-profiles")
@@ -136,6 +137,8 @@ ColumnLayout {
size: Theme.primaryTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
+ anchors.left: parent.left
+ anchors.leftMargin: 25 * gcd.themeScale
//: Your Profiles
text: qsTr("your-servers")
diff --git a/qml/panes/ServerInfoPane.qml b/qml/panes/ServerInfoPane.qml
index 31762287..b7dd4d84 100644
--- a/qml/panes/ServerInfoPane.qml
+++ b/qml/panes/ServerInfoPane.qml
@@ -41,37 +41,37 @@ Opaque.SettingsList { // groupSettingsPane
}
}
}
- }
+ }
- Connections {
- target: gcd
+ Connections {
+ target: gcd
- onUpdateContactStatus: function(_handle, _status, _loading) {
- if (txtServer.text == _handle) {
- if (_status >= Const.state_connected) {
- gsp.connected = true
- serverStatusIcon
- if (_status != Const.state_synced) {
- gsp.synced = false
- } else {
- gsp.synced = true
- }
- } else {
- gsp.connected = false
+ onUpdateContactStatus: function(_handle, _status, _loading) {
+ if (txtServer.text == _handle) {
+ if (_status >= Const.state_connected) {
+ gsp.connected = true
+ serverStatusIcon
+ if (_status != Const.state_synced) {
gsp.synced = false
+ } else {
+ gsp.synced = true
}
+ } else {
+ gsp.connected = false
+ gsp.synced = false
}
}
+ }
- onSupplyServerSettings: function(server, key_names, keys) {
- gsp.serverName = server;
- toolbar.setTitle(qsTr("server-settings"));
- console.log("Servers: " + key_names);
- for (let i=0; i