mirror of
https://github.com/QRouland/UTPass.git
synced 2026-01-10 19:36:57 +00:00
Fix style command
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import QtQuick 2.4
|
||||
import Lomiri.Components 1.3
|
||||
import Qt.labs.folderlistmodel 2.1
|
||||
import Pass 1.0
|
||||
import "../components"
|
||||
import Lomiri.Components 1.3
|
||||
import Pass 1.0
|
||||
import Qt.labs.folderlistmodel 2.1
|
||||
import QtQuick 2.4
|
||||
import "headers"
|
||||
|
||||
Page {
|
||||
@@ -11,25 +11,8 @@ Page {
|
||||
property string passwordStorePath
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
header: MainHeader {
|
||||
id: passwordListHeader
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
Component.onCompleted: {
|
||||
passwordStorePath = "file:" + Pass.password_store;
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -38,13 +21,14 @@ Page {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
visible: folderModel.count == 0
|
||||
|
||||
Text {
|
||||
text: i18n.tr(
|
||||
"No password found<br>You can import a password store zip in the settings")
|
||||
text: i18n.tr("No password found<br>You can import a password store zip in the settings")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ListView {
|
||||
@@ -56,17 +40,38 @@ Page {
|
||||
|
||||
model: FolderListModel {
|
||||
id: folderModel
|
||||
|
||||
nameFilters: ["*.gpg"]
|
||||
rootFolder: passwordStorePath
|
||||
folder: passwordStorePath
|
||||
showDirs: true
|
||||
}
|
||||
|
||||
delegate: FileDir {
|
||||
id: fileDelegate
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
passwordStorePath = "file:" + Pass.password_store
|
||||
header: MainHeader {
|
||||
id: passwordListHeader
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user