From e4ad766315879e1ff05bb111229f073f8f0ed68e Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Mon, 10 Oct 2022 21:30:02 +0200 Subject: PassFish: Initial Commit Well, that's a lie. But nobody needs to see all the iterations I decided to sweep under the rug. That said, I think the repo is, while not clean, clean enough now, to not be embarrassed by uploading it to github. --- qml/cover/CoverPage.qml | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 qml/cover/CoverPage.qml (limited to 'qml/cover') diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml new file mode 100644 index 0000000..5b5af6c --- /dev/null +++ b/qml/cover/CoverPage.qml @@ -0,0 +1,73 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +CoverBackground { + Column{ + x: Theme.paddingLarge + y: Theme.paddingLarge + width: parent.width - 2 * x + spacing: Theme.paddingLarge + Label { + id: label + text: qsTr("PassFish") + color: Theme.highlightColor + fontSizeMode: Text.Fit + font.pixelSize: Theme.fontSizeLarge + bottomPadding: Theme.paddingLarge + width: parent.width + elide: Text.ElideNone + } + Column{ + width: parent.width + spacing: Theme.paddingSmall + Label { + id: urlLabel + color: Theme.highlightColor + text: qsTr("Used Text:") + font.pixelSize: Theme.fontSizeSmall + truncationMode: TruncationMode.Fade + width: parent.width + } + Label { + id: generated_for_url + text: passwordmaker.used_text + font.pixelSize: Theme.fontSizeSmall + truncationMode: TruncationMode.Fade + width: parent.width + } + } + Column{ + width: parent.width + spacing: Theme.paddingSmall + Label { + id: readyLabel + color: Theme.highlightColor + text: passwordmaker.generated_password.length > 0 + && passwordmaker.generator_state === 0 + ? qsTr("Pass Ready") + : qsTr("Input Needed") + font.pixelSize: Theme.fontSizeSmall + truncationMode: TruncationMode.Fade + width: parent.width + } + } + } + + CoverActionList { + id: coverAction + enabled: passwordmaker.generated_password.length > 0 + && passwordmaker.generator_state === 0 + CoverAction { + iconSource: "image://theme/icon-s-clipboard" + onTriggered: Clipboard.text = passwordmaker.generated_password; + } + + CoverAction { + iconSource: "image://theme/icon-cover-cancel" + onTriggered: { + passwordmaker.master_password = ""; + passwordmaker.url = ""; + } + } + } +} -- cgit v1.2.3