mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-25 06:52:28 +00:00
Add search password feature (equivalent to pass find)
This commit is contained in:
@ -6,15 +6,33 @@ import Lomiri.Components.Themes 1.3
|
||||
import Pass 1.0
|
||||
import QtQuick 2.4
|
||||
|
||||
Component {
|
||||
Item {
|
||||
//property string folder
|
||||
|
||||
id: fileDir
|
||||
|
||||
property string fName
|
||||
property bool fIsDir
|
||||
property bool commonBorder: true
|
||||
property int lBorderwidth: 0
|
||||
property int rBorderwidth: 0
|
||||
property int tBorderwidth: 0
|
||||
property int bBorderwidth: 0
|
||||
property int commonBorderWidth: 0
|
||||
property string borderColor: LomiriColors.warmGrey
|
||||
|
||||
signal clicked()
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
height: units.gu(5)
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
height: units.gu(5)
|
||||
anchors.fill: parent
|
||||
color: theme.palette.normal.background
|
||||
|
||||
Text {
|
||||
text: fileIsDir ? fileName : fileName.slice(0, -4) // remove .gpg if it's a file
|
||||
text: fileDir.fIsDir ? fileDir.fName : fileDir.fName.slice(0, -4) // remove .gpg if it's a file
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: units.gu(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@ -26,32 +44,36 @@ Component {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: units.gu(2)
|
||||
height: units.gu(4)
|
||||
name: fileIsDir ? "go-next" : "lock"
|
||||
name: fileDir.fIsDir ? "go-next" : "lock"
|
||||
color: LomiriColors.orange
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
// onClicked: {
|
||||
// var path = fileDir.fdfolder + "/" + fileName;
|
||||
// if (fileIsDir) {
|
||||
// fileDir.fdfolder = path;
|
||||
// //backAction.visible = true;
|
||||
// // passwordListHeader.title = fileName;
|
||||
// } else {
|
||||
// console.debug("pass show %1".arg(path));
|
||||
// Pass.show(path);
|
||||
// }
|
||||
// }
|
||||
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
var path = folderModel.folder + "/" + fileName;
|
||||
if (fileIsDir) {
|
||||
folderModel.folder = path;
|
||||
backAction.visible = true;
|
||||
passwordListHeader.title = fileName;
|
||||
} else {
|
||||
console.debug("pass show %1".arg(path));
|
||||
Pass.show(path);
|
||||
}
|
||||
}
|
||||
onClicked: fileDir.clicked()
|
||||
}
|
||||
|
||||
CustomBorder {
|
||||
commonBorder: false
|
||||
lBorderwidth: 0
|
||||
rBorderwidth: 0
|
||||
tBorderwidth: 0
|
||||
bBorderwidth: 1
|
||||
borderColor: LomiriColors.warmGrey
|
||||
id: cb
|
||||
|
||||
commonBorder: fileDir.commonBorder
|
||||
lBorderwidth: fileDir.lBorderwidth
|
||||
rBorderwidth: fileDir.rBorderwidth
|
||||
tBorderwidth: fileDir.tBorderwidth
|
||||
bBorderwidth: fileDir.bBorderwidth
|
||||
borderColor: fileDir.borderColor
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user