Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 69 additions & 6 deletions KeePit/qml/Entry.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,23 @@ Page {
Action {
text: i18n.tr("Copy")
iconName: "edit-copy"
onTriggered: Clipboard.push(password.text);
onTriggered: {
Clipboard.push(password.text);
textCopied.text = i18n.tr("Password copied to clipboard")
textCopied.show()
textCopiedTimer.start()
}
}
,
Action {
text: i18n.tr("Clear")
iconName: "burn-after-read"
onTriggered: {
Clipboard.push("");
textCopied.text = i18n.tr("Clipboard Cleared")
textCopied.show()
textCopiedTimer.start()
}
}
]
}
Expand All @@ -64,21 +80,48 @@ Page {
}

Label {
id:usernameLabel
text: i18n.tr("Username")
width: parent.width
}

Button {
anchors.right: parent.right
iconName: "edit-copy"
width: 0
onClicked: {
Clipboard.push(userName.text)
textCopied.text = i18n.tr("Username copied to clipboard")
textCopied.show()
textCopiedTimer.start()
}
}
Timer {
id: textCopiedTimer
interval: 2000; running: false; repeat: false
onTriggered: textCopied.hide()
}
TextField {
id: userName
text: database.selectedEntry.username
readOnly: true
width: parent.width
}

Label {
id: passwordLabel
text: i18n.tr("Password")
width: parent.width
}

Button {
anchors.right: parent.right
anchors.top: password.top
iconName: "edit-copy"
width: 0
onClicked: {
Clipboard.push(password.text)
textCopied.text = i18n.tr("Password copied to clipboard")
textCopied.show()
textCopiedTimer.start()
}
}
PasswordInput {
id: password
inputWidth: parent.width
Expand All @@ -89,7 +132,18 @@ Page {

Label {
text: i18n.tr("Url")
width: parent.width
}
Button {
anchors.right: parent.right
anchors.top: url.top
iconName: "edit-copy"
width: 0
onClicked: {
Clipboard.push(url.text)
textCopied.text = i18n.tr("URL copied to clipboard")
textCopied.show()
textCopiedTimer.start()
}
}

TextField {
Expand All @@ -98,6 +152,15 @@ Page {
readOnly: true
width: parent.width
}
Popover {
id: textCopied
property alias text: popoverText.text
Text {
id: popoverText
text: "default"
anchors.horizontalCenter: parent.horizontalCenter
}
}

Label {
text: i18n.tr("Notes")
Expand Down