diff options
| author | Andreas Grois <andi@grois.info> | 2022-10-10 21:30:02 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2022-10-10 21:37:15 +0200 |
| commit | e4ad766315879e1ff05bb111229f073f8f0ed68e (patch) | |
| tree | 4b043ff47c78b2c00c80c94ebda622c32c8b6d3d /qml/cover | |
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.
Diffstat (limited to 'qml/cover')
| -rw-r--r-- | qml/cover/CoverPage.qml | 73 |
1 files changed, 73 insertions, 0 deletions
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 = ""; + } + } + } +} |
