1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-06-29 16:52:29 +00:00

Various improvement :)

This commit is contained in:
2019-03-15 17:53:40 +01:00
parent a017136f6a
commit bd2fa6922e
26 changed files with 393 additions and 85 deletions

59
qml/pages/Info.qml Normal file
View File

@ -0,0 +1,59 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import "headers"
import "../components"
Page {
header: StackHeader {
id : infoHeader
title: i18n.tr('Info')
}
Rectangle {
anchors.top: infoHeader.bottom
anchors.bottom: parent.bottom
width: parent.width
color: "#FFF"
Flow {
spacing: 2
anchors.fill: parent
Rectangle {
width: parent.width
height: units.gu(4)
}
Rectangle {
width: parent.width
height: units.gu(12)
Image {
source: "../../assets/logo.svg"
width: units.gu(12)
height: units.gu(12)
anchors.horizontalCenter: parent.horizontalCenter
}
}
Rectangle {
width: parent.width
height: units.gu(4)
}
Text {
horizontalAlignment: Text.AlignHCenter
width: parent.width
height: units.gu(6)
text: i18n.tr('UTPass')
}
Text {
horizontalAlignment: Text.AlignHCenter
width: parent.width
height: units.gu(6)
text: "Version" //i18n.tr("Version %1").arg(Manifest.get("version"))
}
Link {
url: "https://github.com/QRouland/UTPass/issues"
text: i18n.tr('Suggest improvements or report a bug')
}
}
}
}

View File

@ -0,0 +1,59 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import Qt.labs.folderlistmodel 2.1
import "../components"
import "headers"
Page {
header : MainHeader {
flickable : nav
leadingActionBar.height: units.gu(4)
leadingActionBar.actions: [
Action {
id: backAction
iconName: "back"
text: i18n.tr("Back")
visible:false
onTriggered: {
folderModel.folder = folderModel.parentFolder;
if(folderModel.rootFolder === folderModel.folder) {
backAction.visible = false;
}
}
}
]
}
Flickable {
id: nav
height: parent.height
width: parent.width
Rectangle {
width: parent.width
visible: folderModel.count == 0
height: units.gu(5)
Text {
text: i18n.tr("No password found in the current folder")
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
ListView {
anchors.fill: parent
spacing: 1
model: FolderListModel {
id: folderModel
nameFilters: ["*.gpg"]
rootFolder: "file:password-store"
folder: "file:password-store"
}
delegate: FileDir {
id: fileDelegate
}
}
}
}

30
qml/pages/Settings.qml Normal file
View File

@ -0,0 +1,30 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import "headers"
Page {
header: StackHeader {
id:settingsHeader
title: i18n.tr('Settings')
}
Rectangle {
anchors.top: settingsHeader.bottom
anchors.bottom: parent.bottom
width: parent.width
color: "#FFF"
Flow {
spacing: 1
anchors.fill: parent
Text {
horizontalAlignment: Text.AlignHCenter
width: parent.width
height: units.gu(6)
text: "Settings"
}
}
}
}

View File

@ -0,0 +1,32 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
PageHeader {
id: mainHeader
width: parent.width
height: units.gu(6)
title: i18n.tr("UTPass")
trailingActionBar.height: units.gu(4)
trailingActionBar.numberOfSlots: 2
trailingActionBar.actions: [
Action {
iconName: "search"
text: i18n.tr("Search")
},
Action {
iconName: "settings"
text: i18n.tr("Settings")
onTriggered: {
pageStack.push(Qt.resolvedUrl("../Settings.qml"))
}
},
Action {
iconName: "info"
text: i18n.tr("Info")
onTriggered: {
pageStack.push(Qt.resolvedUrl("../Info.qml"))
}
}
]
}

View File

@ -0,0 +1,20 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
PageHeader {
width: parent.width
height: units.gu(6)
title: i18n.tr("UTPass")
leadingActionBar.height: units.gu(4)
leadingActionBar.actions: [
Action {
id: backAction
iconName: "back"
text: "Back"
onTriggered: {
pageStack.pop()
}
}
]
}

2
qml/pages/headers/qmldir Normal file
View File

@ -0,0 +1,2 @@
MainHeader 1.0 MainHeader.qml
StackHeader 1.0 StackHeader.qml

4
qml/pages/qmldir Normal file
View File

@ -0,0 +1,4 @@
Info 1.0 Info.qml
PassordList 1.0 Password.qml
Settings 1.0 Settings.qml
UTPassPage 1.0 UTPassPage.qml