added exportController and PageShare
- added a blank PageSettingsProtocol
This commit is contained in:
parent
3034019d5a
commit
be7386f0d7
38 changed files with 1080 additions and 115 deletions
|
@ -59,7 +59,7 @@ ListView {
|
|||
menuContent.currentIndex = index
|
||||
containersDropDown.menuVisible = false
|
||||
} else {
|
||||
ContainersModel.setCurrentlyInstalledContainerIndex(proxyContainersModel.mapToSource(index))
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
containersDropDown.menuVisible = false
|
||||
|
|
|
@ -8,8 +8,12 @@ import "../../Components"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
implicitHeight: col.implicitHeight
|
||||
implicitWidth: col.implicitWidth
|
||||
|
||||
ColumnLayout {
|
||||
id: col
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.leftMargin: 16
|
||||
|
@ -51,13 +55,79 @@ Item {
|
|||
}
|
||||
|
||||
DropDownType {
|
||||
id: hash
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: 74
|
||||
|
||||
rootButtonBorderWidth: 0
|
||||
|
||||
descriptionText: qsTr("Hash")
|
||||
headerText: qsTr("Hash")
|
||||
|
||||
listView: ListViewType {
|
||||
rootWidth: root.width
|
||||
|
||||
model: ListModel {
|
||||
ListElement { name : qsTr("SHA512") }
|
||||
ListElement { name : qsTr("SHA384") }
|
||||
ListElement { name : qsTr("SHA256") }
|
||||
ListElement { name : qsTr("SHA3-512") }
|
||||
ListElement { name : qsTr("SHA3-384") }
|
||||
ListElement { name : qsTr("SHA3-256") }
|
||||
ListElement { name : qsTr("whirlpool") }
|
||||
ListElement { name : qsTr("BLAKE2b512") }
|
||||
ListElement { name : qsTr("BLAKE2s256") }
|
||||
ListElement { name : qsTr("SHA1") }
|
||||
}
|
||||
currentIndex: 0
|
||||
|
||||
clickedFunction: {
|
||||
hash.text = selectedText
|
||||
hash.menuVisible = false
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
hash.text = selectedText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DropDownType {
|
||||
id: cipher
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: 74
|
||||
|
||||
rootButtonBorderWidth: 0
|
||||
|
||||
descriptionText: qsTr("Cipher")
|
||||
headerText: qsTr("Cipher")
|
||||
|
||||
listView: ListViewType {
|
||||
rootWidth: root.width
|
||||
|
||||
model: ListModel {
|
||||
ListElement { name : qsTr("AES-256-GCM") }
|
||||
ListElement { name : qsTr("AES-192-GCM") }
|
||||
ListElement { name : qsTr("AES-128-GCM") }
|
||||
ListElement { name : qsTr("AES-256-CBC") }
|
||||
ListElement { name : qsTr("AES-192-CBC") }
|
||||
ListElement { name : qsTr("AES-128-CBC") }
|
||||
ListElement { name : qsTr("ChaCha20-Poly1305") }
|
||||
ListElement { name : qsTr("ARIA-256-CBC") }
|
||||
ListElement { name : qsTr("CAMELLIA-256-CBC") }
|
||||
ListElement { name : qsTr("none") }
|
||||
}
|
||||
currentIndex: 0
|
||||
|
||||
clickedFunction: {
|
||||
cipher.text = selectedText
|
||||
cipher.menuVisible = false
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
cipher.text = selectedText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckBoxType {
|
||||
|
|
|
@ -88,9 +88,10 @@ ListView {
|
|||
|
||||
onClicked: {
|
||||
if (isInstalled) {
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(root.model.mapToSource(index))
|
||||
goToPage(PageEnum.PageSettingsServerProtocol)
|
||||
} else {
|
||||
ContainersModel.setCurrentlyInstalledContainerIndex(root.model.mapToSource(index))
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(root.model.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
}
|
||||
|
|
177
client/ui/qml/Components/ShareConnectionDrawer.qml
Normal file
177
client/ui/qml/Components/ShareConnectionDrawer.qml
Normal file
|
@ -0,0 +1,177 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
DrawerType {
|
||||
id: root
|
||||
|
||||
property var qrCodes: []
|
||||
property alias configText: configContent.text
|
||||
property alias headerText: header.headerText
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
|
||||
Item{
|
||||
anchors.fill: parent
|
||||
|
||||
FlickableType {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height + 32
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
anchors.topMargin: 20
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
Header2Type {
|
||||
id: header
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
text: qsTr("Save connection code")
|
||||
|
||||
onClicked: {
|
||||
ExportController.saveFile()
|
||||
}
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Copy")
|
||||
|
||||
onClicked: {
|
||||
configContent.selectAll()
|
||||
configContent.copy()
|
||||
configContent.select(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
|
||||
text: showContent ? qsTr("Collapse content") : qsTr("Show content")
|
||||
|
||||
onClicked: {
|
||||
showContent = !showContent
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: configContent.implicitHeight + configContent.anchors.topMargin + configContent.anchors.bottomMargin
|
||||
|
||||
radius: 10
|
||||
color: "#2C2D30"
|
||||
|
||||
visible: showContent
|
||||
|
||||
height: 24
|
||||
|
||||
TextField {
|
||||
id: configContent
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: 16
|
||||
|
||||
height: 24
|
||||
|
||||
color: "#D7D8DB"
|
||||
|
||||
font.pixelSize: 16
|
||||
font.weight: Font.Medium
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
enabled: false
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: width
|
||||
Layout.topMargin: 20
|
||||
|
||||
color: "white"
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
smooth: false
|
||||
|
||||
Timer {
|
||||
property int idx: 0
|
||||
interval: 1000
|
||||
running: qrCodes.length > 0
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
idx++
|
||||
if (idx >= qrCodes.length) {
|
||||
idx = 0
|
||||
}
|
||||
parent.source = qrCodes[idx]
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on source {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
|
||||
visible: qrCodes.length > 0
|
||||
}
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
Layout.bottomMargin: 32
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: qsTr("To read the QR code in the Amnezia app, select \"Add Server\" → \"I have connection details\"")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue