mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-06 02:37:21 +03:00
Add dialog for settings
This commit is contained in:
parent
3856c53e7b
commit
f117e4de92
15
qml/Main.qml
15
qml/Main.qml
@ -48,6 +48,10 @@ ApplicationWindow {
|
||||
text: qsTr('Reset...')
|
||||
onTriggered: reset.open()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr('Settings')
|
||||
onTriggered: settings.open()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit()
|
||||
@ -72,6 +76,17 @@ ApplicationWindow {
|
||||
id: addCredential
|
||||
}
|
||||
|
||||
/*******
|
||||
|
||||
Settings dialog
|
||||
|
||||
*******/
|
||||
|
||||
Settings {
|
||||
id: settings
|
||||
}
|
||||
|
||||
|
||||
/*******
|
||||
|
||||
Set password dialog
|
||||
|
71
qml/Settings.qml
Normal file
71
qml/Settings.qml
Normal file
@ -0,0 +1,71 @@
|
||||
import QtQuick 2.6
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
Dialog {
|
||||
title: qsTr("Settings")
|
||||
modality: Qt.ApplicationModal
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Label {
|
||||
text: qsTr("Authenticator Mode")
|
||||
font.bold: true
|
||||
}
|
||||
ColumnLayout {
|
||||
ExclusiveGroup {
|
||||
id: mode
|
||||
}
|
||||
RadioButton {
|
||||
id: ccid
|
||||
text: qsTr("CCID (Smart card)")
|
||||
checked: true
|
||||
exclusiveGroup: mode
|
||||
}
|
||||
RadioButton {
|
||||
id: slot
|
||||
text: qsTr("YubiKey Slots")
|
||||
exclusiveGroup: mode
|
||||
}
|
||||
CheckBox {
|
||||
id: slot1
|
||||
enabled: mode.current == slot
|
||||
text: qsTr("Slot 1")
|
||||
}
|
||||
RowLayout{
|
||||
Label {
|
||||
text: qsTr("Digits")
|
||||
enabled: mode.current == slot && slot1.checked
|
||||
}
|
||||
ComboBox {
|
||||
id: slot1digits
|
||||
enabled: mode.current == slot && slot1.checked
|
||||
model: [6, 8]
|
||||
}
|
||||
|
||||
}
|
||||
CheckBox {
|
||||
id: slot2
|
||||
enabled: mode.current == slot
|
||||
text: qsTr("Slot 2")
|
||||
}
|
||||
RowLayout{
|
||||
Label {
|
||||
text: qsTr("Digits")
|
||||
enabled: mode.current == slot && slot2.checked
|
||||
}
|
||||
ComboBox {
|
||||
id: slot2digits
|
||||
enabled: mode.current == slot && slot2.checked
|
||||
model: [6, 8]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user