1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-01-24 15:46:40 +00:00

Update UI Color with recommandation and fix the issues with dark theme

This commit is contained in:
Quentin Rouland 2025-01-13 20:51:29 +01:00
parent b022e30a89
commit 8ec593becc
15 changed files with 101 additions and 121 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: utpass.qrouland\n" "Project-Id-Version: utpass.qrouland\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-13 17:26+0000\n" "POT-Creation-Date: 2025-01-13 20:49+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,22 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../qml/components/FileDir.qml:69 #: ../qml/components/FileDir.qml:72
msgid "Decryption failed !" msgid "Decryption failed !"
msgstr "" msgstr ""
#: ../qml/dialogs/DoubleValidationDialog.qml:28
#: ../qml/dialogs/PassphraseDialog.qml:29
#: ../qml/dialogs/SimpleValidationDialog.qml:19
msgid "Ok"
msgstr ""
#: ../qml/dialogs/DoubleValidationDialog.qml:44
#: ../qml/dialogs/PassphraseDialog.qml:41
#: ../qml/dialogs/SimpleValidationDialog.qml:30
msgid "Cancel"
msgstr ""
#: ../qml/dialogs/ErrorDialog.qml:12 #: ../qml/dialogs/ErrorDialog.qml:12
msgid "Error !" msgid "Error !"
msgstr "" msgstr ""
@ -53,6 +41,16 @@ msgstr ""
msgid "passphrase" msgid "passphrase"
msgstr "" msgstr ""
#: ../qml/dialogs/PassphraseDialog.qml:29
#: ../qml/dialogs/SimpleValidationDialog.qml:9
msgid "Ok"
msgstr ""
#: ../qml/dialogs/PassphraseDialog.qml:41
#: ../qml/dialogs/SimpleValidationDialog.qml:33
msgid "Cancel"
msgstr ""
#: ../qml/dialogs/SuccessDialog.qml:12 #: ../qml/dialogs/SuccessDialog.qml:12
msgid "Success !" msgid "Success !"
msgstr "" msgstr ""
@ -61,27 +59,27 @@ msgstr ""
msgid "OK" msgid "OK"
msgstr "" msgstr ""
#: ../qml/pages/Info.qml:58 #: ../qml/pages/Info.qml:61
msgid "<b>Version</b>" msgid "<b>Version</b>"
msgstr "" msgstr ""
#: ../qml/pages/Info.qml:77 #: ../qml/pages/Info.qml:82
msgid "<b>Maintainer</>" msgid "<b>Maintainer</>"
msgstr "" msgstr ""
#: ../qml/pages/Info.qml:102 #: ../qml/pages/Info.qml:109
msgid "Suggest improvement(s) or report a bug(s)" msgid "Suggest improvement(s) or report a bug(s)"
msgstr "" msgstr ""
#: ../qml/pages/Info.qml:107 #: ../qml/pages/Info.qml:114
msgid "Access to the source code" msgid "Access to the source code"
msgstr "" msgstr ""
#: ../qml/pages/Info.qml:115 #: ../qml/pages/Info.qml:122
msgid "Released under the terms of the GNU GPL v3" msgid "Released under the terms of the GNU GPL v3"
msgstr "" msgstr ""
#: ../qml/pages/Info.qml:123 ../qml/pages/headers/MainHeader.qml:33 #: ../qml/pages/Info.qml:131 ../qml/pages/headers/MainHeader.qml:33
msgid "Info" msgid "Info"
msgstr "" msgstr ""
@ -100,7 +98,7 @@ msgstr ""
msgid "UTPass" msgid "UTPass"
msgstr "" msgstr ""
#: ../qml/pages/headers/MainHeader.qml:26 ../qml/pages/settings/Settings.qml:68 #: ../qml/pages/headers/MainHeader.qml:26 ../qml/pages/settings/Settings.qml:70
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
@ -116,26 +114,31 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportGitClone.qml:69 #: ../qml/pages/settings/ImportGitClone.qml:70
msgid "Clone" msgid "Clone"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportGitClone.qml:89 #: ../qml/pages/settings/ImportGitClone.qml:90
msgid "" msgid ""
"Importing a git repo will delete<br>any existing password store!" "Importing a git repo will delete<br>any existing password store!"
"<br>Continue ?" "<br>Continue ?"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportGitClone.qml:101 #: ../qml/pages/settings/ImportGitClone.qml:91
#: ../qml/pages/settings/ImportZip.qml:62 ../qml/pages/settings/InfoKeys.qml:77
msgid "Yes"
msgstr ""
#: ../qml/pages/settings/ImportGitClone.qml:104
msgid "An error occured during git clone !" msgid "An error occured during git clone !"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportGitClone.qml:110 #: ../qml/pages/settings/ImportGitClone.qml:113
#: ../qml/pages/settings/ImportZip.qml:82 #: ../qml/pages/settings/ImportZip.qml:84
msgid "Password store sucessfully imported !" msgid "Password store sucessfully imported !"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportGitClone.qml:122 #: ../qml/pages/settings/ImportGitClone.qml:125
msgid "Git Clone Import" msgid "Git Clone Import"
msgstr "" msgstr ""
@ -156,39 +159,35 @@ msgid ""
"Importing a new zip will delete<br>any existing password store!<br>Continue ?" "Importing a new zip will delete<br>any existing password store!<br>Continue ?"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportZip.qml:73 #: ../qml/pages/settings/ImportZip.qml:75
msgid "Password store import failed !" msgid "Password store import failed !"
msgstr "" msgstr ""
#: ../qml/pages/settings/ImportZip.qml:94 #: ../qml/pages/settings/ImportZip.qml:96
msgid "Zip Password Store Import" msgid "Zip Password Store Import"
msgstr "" msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:40 #: ../qml/pages/settings/InfoKeys.qml:41
msgid "Key id : %1" msgid "Key id : %1"
msgstr "" msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:46 #: ../qml/pages/settings/InfoKeys.qml:54
msgid "Delete this key" msgid "Delete this key"
msgstr "" msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:67 #: ../qml/pages/settings/InfoKeys.qml:76
msgid "You're are about to delete<br>%1<br>Continue ?" msgid "You're are about to delete<br>%1<br>Continue ?"
msgstr "" msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:68 #: ../qml/pages/settings/InfoKeys.qml:94
msgid "%1<br>will be definitively removed.<br>Continue ?"
msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:84
msgid "Key removal failed !" msgid "Key removal failed !"
msgstr "" msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:93 #: ../qml/pages/settings/InfoKeys.qml:103
msgid "Key successfully deleted !" msgid "Key successfully deleted !"
msgstr "" msgstr ""
#: ../qml/pages/settings/InfoKeys.qml:104 #: ../qml/pages/settings/InfoKeys.qml:114
msgid "Info Keys" msgid "Info Keys"
msgstr "" msgstr ""
@ -196,26 +195,26 @@ msgstr ""
msgid "GPG" msgid "GPG"
msgstr "" msgstr ""
#: ../qml/pages/settings/Settings.qml:28 #: ../qml/pages/settings/Settings.qml:29
msgid "Import a GPG key file" msgid "Import a GPG key file"
msgstr "" msgstr ""
#: ../qml/pages/settings/Settings.qml:33 #: ../qml/pages/settings/Settings.qml:34
msgid "Show GPG keys" msgid "Show GPG keys"
msgstr "" msgstr ""
#: ../qml/pages/settings/Settings.qml:41 #: ../qml/pages/settings/Settings.qml:42
msgid "Password Store" msgid "Password Store"
msgstr "" msgstr ""
#: ../qml/pages/settings/Settings.qml:46 #: ../qml/pages/settings/Settings.qml:48
msgid "Import a Password Store using Git" msgid "Import a Password Store using Git"
msgstr "" msgstr ""
#: ../qml/pages/settings/Settings.qml:51 #: ../qml/pages/settings/Settings.qml:53
msgid "Import a Password Store Zip" msgid "Import a Password Store Zip"
msgstr "" msgstr ""
#: ../qml/pages/settings/Settings.qml:60 #: ../qml/pages/settings/Settings.qml:62
msgid "Warning: importing delete any exiting Password Store" msgid "Warning: importing delete any exiting Password Store"
msgstr "" msgstr ""

View File

@ -6,6 +6,8 @@ import QtQuick.Layouts 1.1
import "dialogs" import "dialogs"
MainView { MainView {
//theme.name: "Lomiri.Components.Themes.SuruDark"
id: root id: root
signal responsePassphraseDialog(bool canceled, string passphrase) signal responsePassphraseDialog(bool canceled, string passphrase)

View File

@ -20,12 +20,14 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: theme.palette.normal.background
Text { Text {
text: externalLink.text text: externalLink.text
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: units.gu(2) anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
} }
Icon { Icon {

View File

@ -2,6 +2,7 @@ import "../dialogs"
import "../styles" import "../styles"
import Lomiri.Components 1.3 import Lomiri.Components 1.3
import Lomiri.Components.Popups 1.3 import Lomiri.Components.Popups 1.3
import Lomiri.Components.Themes 1.3
import Pass 1.0 import Pass 1.0
import QtQuick 2.4 import QtQuick 2.4
@ -14,12 +15,14 @@ Component {
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
height: units.gu(5) height: units.gu(5)
color: theme.palette.normal.background
Text { Text {
text: fileBaseName text: fileBaseName
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: units.gu(2) anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
} }
Icon { Icon {

View File

@ -22,12 +22,14 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: theme.palette.normal.background
Text { Text {
text: pageStackLink.text text: pageStackLink.text
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: units.gu(2) anchors.leftMargin: units.gu(2)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: theme.palette.normal.backgroundText
} }
Icon { Icon {

View File

@ -1,53 +0,0 @@
import Lomiri.Components 1.3
import Lomiri.Components.Popups 1.3
import QtQuick 2.4
Dialog {
id: doubleValidationDialog
property int nb_validation: 0
property string text1
property string text2
signal doubleValidated()
signal canceled()
Text {
visible: nb_validation == 0
horizontalAlignment: Text.AlignHCenter
text: text1
}
Text {
visible: nb_validation == 1
horizontalAlignment: Text.AlignHCenter
text: text2
}
Button {
text: i18n.tr("Ok")
color: LomiriColors.green
onClicked: {
if (nb_validation == 1) {
nb_validation = 0;
doubleValidated();
PopupUtils.close(doubleValidationDialog);
} else {
nb_validation += 1;
}
}
}
Button {
id: cancelButton
text: i18n.tr("Cancel")
color: LomiriColors.red
onClicked: {
nb_validation = 0;
canceled();
PopupUtils.close(doubleValidationDialog);
}
}
}

View File

@ -3,7 +3,7 @@ import Lomiri.Components.Popups 1.3
import QtQuick 2.4 import QtQuick 2.4
Dialog { Dialog {
id: dialogError id: dialog
property string textError property string textError
@ -14,10 +14,9 @@ Dialog {
Button { Button {
text: i18n.tr("Close") text: i18n.tr("Close")
color: LomiriColors.red
onClicked: function() { onClicked: function() {
dialogClosed(); dialogClosed();
PopupUtils.close(dialogError); PopupUtils.close(dialog);
} }
} }

View File

@ -3,7 +3,7 @@ import Lomiri.Components.Popups 1.3
import QtQuick 2.4 import QtQuick 2.4
Dialog { Dialog {
id: passphraseProvider id: dialog
signal validated(string passphrase) signal validated(string passphrase)
signal canceled() signal canceled()
@ -27,11 +27,11 @@ Dialog {
id: okButton id: okButton
text: i18n.tr("Ok") text: i18n.tr("Ok")
color: LomiriColors.green color: theme.palette.normal.positive
onClicked: { onClicked: {
validated(passphraseField.text); validated(passphraseField.text);
passphraseField.text = ""; passphraseField.text = "";
PopupUtils.close(passphraseProvider); PopupUtils.close(dialog);
} }
} }
@ -39,10 +39,9 @@ Dialog {
id: cancelButton id: cancelButton
text: i18n.tr("Cancel") text: i18n.tr("Cancel")
color: LomiriColors.red
onClicked: { onClicked: {
canceled(); canceled();
PopupUtils.close(passphraseProvider); PopupUtils.close(dialog);
} }
} }

View File

@ -3,24 +3,28 @@ import Lomiri.Components.Popups 1.3
import QtQuick 2.4 import QtQuick 2.4
Dialog { Dialog {
id: doubleValidationDialog id: dialog
property string text property string text
property string continueText: i18n.tr("Ok")
property color continueColor: theme.palette.normal.positive
signal validated() signal validated()
signal canceled() signal canceled()
Text { Text {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: doubleValidationDialog.text text: dialog.text
} }
Button { Button {
text: i18n.tr("Ok") id: continueButton
color: LomiriColors.green
text: dialog.continueText
color: dialog.continueColor
onClicked: { onClicked: {
validated(); validated();
PopupUtils.close(doubleValidationDialog); PopupUtils.close(dialog);
} }
} }
@ -28,10 +32,9 @@ Dialog {
id: cancelButton id: cancelButton
text: i18n.tr("Cancel") text: i18n.tr("Cancel")
color: LomiriColors.red
onClicked: { onClicked: {
canceled(); canceled();
PopupUtils.close(doubleValidationDialog); PopupUtils.close(dialog);
} }
} }

View File

@ -3,7 +3,7 @@ import Lomiri.Components.Popups 1.3
import QtQuick 2.4 import QtQuick 2.4
Dialog { Dialog {
id: dialogSuccess id: dialog
property string textSuccess property string textSuccess
@ -14,10 +14,9 @@ Dialog {
Button { Button {
text: i18n.tr("OK") text: i18n.tr("OK")
color: LomiriColors.green
onClicked: function() { onClicked: function() {
dialogClosed(); dialogClosed();
PopupUtils.close(dialogSuccess); PopupUtils.close(dialog);
} }
} }

View File

@ -25,6 +25,7 @@ Page {
Rectangle { Rectangle {
width: parent.width width: parent.width
height: units.gu(1) height: units.gu(1)
color: theme.palette.normal.background
} }
Text { Text {
@ -36,11 +37,13 @@ Page {
height: units.gu(8) height: units.gu(8)
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
font.pixelSize: 144 font.pixelSize: 144
color: theme.palette.normal.backgroundText
} }
Rectangle { Rectangle {
width: parent.width width: parent.width
height: units.gu(12) height: units.gu(12)
color: theme.palette.normal.background
Image { Image {
source: "../../assets/logo.svg" source: "../../assets/logo.svg"
@ -58,6 +61,7 @@ Page {
text: i18n.tr("<b>Version</b>") text: i18n.tr("<b>Version</b>")
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
font.pixelSize: 72 font.pixelSize: 72
color: theme.palette.normal.backgroundText
} }
Text { Text {
@ -68,6 +72,7 @@ Page {
height: units.gu(4) height: units.gu(4)
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
font.pixelSize: 72 font.pixelSize: 72
color: theme.palette.normal.backgroundText
} }
Text { Text {
@ -77,6 +82,7 @@ Page {
text: i18n.tr("<b>Maintainer</>") text: i18n.tr("<b>Maintainer</>")
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
font.pixelSize: 72 font.pixelSize: 72
color: theme.palette.normal.backgroundText
} }
Text { Text {
@ -87,6 +93,7 @@ Page {
height: units.gu(2) height: units.gu(2)
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
font.pixelSize: 72 font.pixelSize: 72
color: theme.palette.normal.backgroundText
} }
} }
@ -113,6 +120,7 @@ Page {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: i18n.tr("Released under the terms of the GNU GPL v3") text: i18n.tr("Released under the terms of the GNU GPL v3")
color: theme.palette.normal.backgroundText
} }
} }

View File

@ -66,6 +66,7 @@ Page {
id: buttonAdd id: buttonAdd
width: parent.width width: parent.width
color: theme.palette.normal.positive
text: i18n.tr('Clone') text: i18n.tr('Clone')
onClicked: { onClicked: {
var ret = false; var ret = false;
@ -87,6 +88,8 @@ Page {
SimpleValidationDialog { SimpleValidationDialog {
text: i18n.tr("Importing a git repo will delete<br>any existing password store!<br>Continue ?") text: i18n.tr("Importing a git repo will delete<br>any existing password store!<br>Continue ?")
continueText: i18n.tr("Yes")
continueColor: theme.palette.normal.negative
onCanceled: { onCanceled: {
pageStack.pop(); pageStack.pop();
} }

View File

@ -59,6 +59,8 @@ Page {
SimpleValidationDialog { SimpleValidationDialog {
text: i18n.tr("Importing a new zip will delete<br>any existing password store!<br>Continue ?") text: i18n.tr("Importing a new zip will delete<br>any existing password store!<br>Continue ?")
continueText: i18n.tr("Yes")
continueColor: theme.palette.normal.negative
onCanceled: { onCanceled: {
pageStack.pop(); pageStack.pop();
} }

View File

@ -29,6 +29,7 @@ Page {
Rectangle { Rectangle {
width: parent.width width: parent.width
height: units.gu(1) height: units.gu(1)
color: theme.palette.normal.background
} }
Text { Text {
@ -38,13 +39,20 @@ Page {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: i18n.tr('Key id : %1').arg(model.modelData.uid) text: i18n.tr('Key id : %1').arg(model.modelData.uid)
color: theme.palette.normal.backgroundText
}
Rectangle {
width: parent.width
height: units.gu(1)
color: theme.palette.normal.background
} }
Button { Button {
id: buttonDeleteKey id: buttonDeleteKey
text: i18n.tr("Delete this key") text: i18n.tr("Delete this key")
color: LomiriColors.red color: theme.palette.normal.negative
onClicked: { onClicked: {
infoKeysPage.currentKey = model.modelData.uid; infoKeysPage.currentKey = model.modelData.uid;
PopupUtils.open(infoKeysPageDeleteValidation, infoKeysPage); PopupUtils.open(infoKeysPageDeleteValidation, infoKeysPage);
@ -54,6 +62,7 @@ Page {
Rectangle { Rectangle {
width: parent.width width: parent.width
height: units.gu(1) height: units.gu(1)
color: theme.palette.normal.background
} }
} }
@ -63,10 +72,11 @@ Page {
Component { Component {
id: infoKeysPageDeleteValidation id: infoKeysPageDeleteValidation
DoubleValidationDialog { SimpleValidationDialog {
text1: i18n.tr("You're are about to delete<br>%1<br>Continue ?").arg(infoKeysPage.currentKey) text: i18n.tr("You're are about to delete<br>%1<br>Continue ?").arg(infoKeysPage.currentKey)
text2: i18n.tr("%1<br>will be definitively removed.<br>Continue ?").arg(infoKeysPage.currentKey) continueText: i18n.tr("Yes")
onDoubleValidated: { continueColor: theme.palette.normal.negative
onValidated: {
var status = Pass.gpgDeleteKeyId(infoKeysPage.currentKey); var status = Pass.gpgDeleteKeyId(infoKeysPage.currentKey);
if (status) if (status)
PopupUtils.open(infoKeysPageDeleteSuccess); PopupUtils.open(infoKeysPageDeleteSuccess);

View File

@ -21,6 +21,7 @@ Page {
width: parent.width width: parent.width
height: units.gu(4) height: units.gu(4)
text: i18n.tr('GPG') text: i18n.tr('GPG')
color: theme.palette.normal.backgroundText
} }
PageStackLink { PageStackLink {
@ -39,6 +40,7 @@ Page {
width: parent.width width: parent.width
height: units.gu(4) height: units.gu(4)
text: i18n.tr('Password Store') text: i18n.tr('Password Store')
color: theme.palette.normal.backgroundText
} }
PageStackLink { PageStackLink {