This repository has been archived on 2021-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
ui/qml/panes/ProfileManagerPane.qml

160 lines
3.9 KiB
QML

import QtQuick 2.0
import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import "../widgets"
import "../opaque" as Opaque
import "../opaque/controls"
import "../opaque/styles"
import "../opaque/theme"
import "../opaque/fonts"
ColumnLayout {
id: thecol
anchors.fill: parent
//leftPadding: 10
//spacing: 5
Opaque.ScalingLabel {
anchors.horizontalCenter: parent.horizontalCenter
wrapMode: TextEdit.Wrap
size: Theme.primaryTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
//: Please enter password:
text: qsTr("enter-profile-password")+":"
}
RowLayout {
width: 700 * gcd.themeScale
Layout.alignment: Qt.AlignHCenter
Opaque.UnderlineTextField {
id: txtPassword
//anchors.horizontalCenter: parent.horizontalCenter
//Layout.fillWidth: true
Layout.maximumWidth: 450 * gcd.themeScale
Layout.minimumWidth: 450 * gcd.themeScale
Layout.rightMargin: 40
Layout.leftMargin: 40
placeholderText: qsTr("password")
echoMode: TextInput.Password
onAccepted: button.clicked()
}
Opaque.Button {
id: "button"
//anchors.horizontalCenter: parent.horizontalCenter
width: 100 * gcd.themeScale
icon: "solid/unlock-alt"
//: Unlock
text: qsTr("unlock")
height: Theme.primaryTextSize * gcd.themeScale
onClicked: {
gcd.unlockProfiles(txtPassword.text)
txtPassword.text = ""
error.visible = false
}
}
}
Opaque.ScalingLabel {
id: error
anchors.horizontalCenter: parent.horizontalCenter
color: "red"
//: 0 profiles loaded with that password
text: qsTr("error-0-profiles-loaded-for-password")
visible: false
}
Connections { // ADD/REMOVE CONTACT ENTRIES
target: gcd
onErrorLoaded0: function() {
error.visible = true
}
}
Opaque.ResponsiveContainer {
Layout.fillHeight: true
Layout.fillWidth: true
Rectangle {
color: Theme.backgroundMainColor
Layout.fillHeight: true
Layout.fillWidth: true
Opaque.ScalingLabel {
id: profileLabel
size: Theme.primaryTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
anchors.left: parent.left
anchors.leftMargin: 25 * gcd.themeScale
//: Your Profiles
text: qsTr("your-profiles")
}
ProfileList {
anchors.top: profileLabel.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
}
}
Rectangle {
color: Theme.backgroundMainColor
Layout.fillHeight: true
Layout.fillWidth: true
Opaque.ScalingLabel {
id: serverLabel
size: Theme.primaryTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
anchors.left: parent.left
anchors.leftMargin: 25 * gcd.themeScale
//: Your Profiles
text: qsTr("your-servers")
}
ServerList {
anchors.top: serverLabel.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
}
}
}
}