mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-29 16:52:29 +00:00
Show a message if no password if found
This commit is contained in:
16
qml/Main.qml
16
qml/Main.qml
@ -46,6 +46,17 @@ MainView {
|
||||
id: navigation
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
width: page.width
|
||||
visible: folderModel.count == 0
|
||||
height: units.gu(5)
|
||||
Text {
|
||||
text: "No password found in current folder"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id : listViewDirs
|
||||
anchors.fill: parent
|
||||
@ -53,8 +64,8 @@ MainView {
|
||||
model: FolderListModel {
|
||||
id: folderModel
|
||||
nameFilters: ["*.gpg"]
|
||||
rootFolder: "file:assets/lol"
|
||||
folder: "file:assets/lol"
|
||||
rootFolder: "file:password-store"
|
||||
folder: "file:password-store"
|
||||
}
|
||||
delegate: MyComponents.ViewFileDir {
|
||||
id: fileDelegate
|
||||
@ -63,6 +74,5 @@ MainView {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Component.onCompleted: Pass.speak()
|
||||
}
|
||||
|
@ -5,12 +5,14 @@ Component {
|
||||
Rectangle {
|
||||
width: page.width
|
||||
height: units.gu(5)
|
||||
|
||||
Text {
|
||||
text: fileBaseName
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: units.gu(1)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Icon {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@ -19,13 +21,13 @@ Component {
|
||||
name: fileIsDir ? "go-next" : "lock"
|
||||
color: UbuntuColors.orange
|
||||
}
|
||||
MouseArea
|
||||
{
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: { if (fileIsDir){ folderModel.folder = folderModel.folder + "/" + fileName ; backAction.visible = true;} }
|
||||
}
|
||||
CustomBorder
|
||||
{
|
||||
|
||||
CustomBorder {
|
||||
commonBorder: false
|
||||
lBorderwidth: 0
|
||||
rBorderwidth: 0
|
||||
|
Reference in New Issue
Block a user