mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-25 06:52:28 +00:00
Save last git clone settings (urls,types)
This commit is contained in:
53
qml/components/GitCloneHttp.qml
Normal file
53
qml/components/GitCloneHttp.qml
Normal file
@ -0,0 +1,53 @@
|
||||
import Git 1.0
|
||||
import Lomiri.Components 1.3
|
||||
import Pass 1.0
|
||||
import QtQuick 2.4
|
||||
|
||||
Column {
|
||||
signal repoUrlChanged(string url)
|
||||
|
||||
function setRepoUrl(url) {
|
||||
repoUrlInput.text = url;
|
||||
}
|
||||
|
||||
width: parent.width
|
||||
spacing: units.gu(1)
|
||||
|
||||
Text {
|
||||
id: repoUrlLabel
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
text: i18n.tr('Repo Url')
|
||||
color: theme.palette.normal.backgroundText
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: repoUrlInput
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
placeholderText: "http(s)://<hostname>"
|
||||
onContentWidthChanged: repoUrlChanged(repoUrlInput.text)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: units.gu(1)
|
||||
color: theme.palette.normal.background
|
||||
}
|
||||
|
||||
Button {
|
||||
id: buttonClone
|
||||
|
||||
width: parent.width
|
||||
color: theme.palette.normal.positive
|
||||
text: i18n.tr('Clone')
|
||||
onClicked: {
|
||||
Git.cloneHttp(repoUrlInput.text, Pass.password_store);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
73
qml/components/GitCloneHttpAuth.qml
Normal file
73
qml/components/GitCloneHttpAuth.qml
Normal file
@ -0,0 +1,73 @@
|
||||
import Git 1.0
|
||||
import Lomiri.Components 1.3
|
||||
import Pass 1.0
|
||||
import QtQuick 2.4
|
||||
|
||||
Column {
|
||||
signal repoUrlChanged(string url)
|
||||
|
||||
function setRepoUrl(url) {
|
||||
repoUrlInput.text = url;
|
||||
}
|
||||
|
||||
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')
|
||||
color: theme.palette.normal.backgroundText
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: repoUrlInput
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
placeholderText: "http(s)://<username>@<hostname>"
|
||||
onContentWidthChanged: repoUrlChanged(repoUrlInput.text)
|
||||
}
|
||||
|
||||
Text {
|
||||
id: repoPasswordLabel
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
text: i18n.tr('Password')
|
||||
color: theme.palette.normal.backgroundText
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: repoPasswordInput
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
echoMode: TextInput.Password
|
||||
placeholderText: i18n.tr('Password')
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: units.gu(1)
|
||||
color: theme.palette.normal.background
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user