diff --git a/CMakeLists.txt b/CMakeLists.txt index 132afa6..8fb6795 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,8 @@ install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR}) install(DIRECTORY qml DESTINATION ${DATA_DIR}) install(DIRECTORY assets DESTINATION ${DATA_DIR}) install(DIRECTORY local/lib DESTINATION ${DATA_DIR}) +install(DIRECTORY password-store DESTINATION ${DATA_DIR}) + # Translations file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js) diff --git a/password-store/.gitKeep b/password-store/.gitKeep new file mode 100644 index 0000000..e69de29 diff --git a/po/utpass.qrouland.pot b/po/utpass.qrouland.pot index ecf7966..a9b6d74 100644 --- a/po/utpass.qrouland.pot +++ b/po/utpass.qrouland.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: utpass.qrouland\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-13 18:16+0000\n" +"POT-Creation-Date: 2019-03-13 20:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/qml/Main.qml b/qml/Main.qml index 58ca293..14b07d3 100644 --- a/qml/Main.qml +++ b/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() } diff --git a/qml/components/ViewFileDir.qml b/qml/components/ViewFileDir.qml index 7523f7c..7485a71 100644 --- a/qml/components/ViewFileDir.qml +++ b/qml/components/ViewFileDir.qml @@ -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