1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-02-11 15:07:16 +00:00
UTPass/qml/components/GitCloneHttpAuth.qml

74 lines
1.7 KiB
QML
Raw Normal View History

2025-01-17 10:40:54 +01:00
import Git 1.0
import Lomiri.Components 1.3
import Pass 1.0
2025-01-20 11:23:40 +01:00
import QtQuick 2.4
2025-01-17 10:40:54 +01:00
Column {
signal repoUrlChanged(string url)
function setRepoUrl(url) {
repoUrlInput.text = url;
}
2025-01-17 10:40:54 +01:00
anchors.top: parent.fill
spacing: units.gu(1)
Text {
id: repoUrlLabel
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
text: i18n.tr('Repo Url')
2025-01-28 10:17:57 +01:00
color: theme.palette.normal.backgroundText
2025-01-17 10:40:54 +01:00
}
TextField {
id: repoUrlInput
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
2025-01-28 10:17:57 +01:00
placeholderText: "http(s)://<username>@<hostname>"
onContentWidthChanged: repoUrlChanged(repoUrlInput.text)
2025-01-17 10:40:54 +01:00
}
Text {
id: repoPasswordLabel
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
text: i18n.tr('Password')
2025-01-28 10:17:57 +01:00
color: theme.palette.normal.backgroundText
2025-01-17 10:40:54 +01:00
}
TextField {
id: repoPasswordInput
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
echoMode: TextInput.Password
2025-01-28 10:17:57 +01:00
placeholderText: i18n.tr('Password')
}
Rectangle {
width: parent.width
height: units.gu(1)
color: theme.palette.normal.background
2025-01-17 10:40:54 +01:00
}
Button {
id: buttonClone
width: parent.width
color: theme.palette.normal.positive
text: i18n.tr('Clone')
onClicked: {
Git.cloneHttpPass(repoUrlInput.text, Pass.password_store, repoPasswordInput.text);
}
}
}