aboutsummaryrefslogtreecommitdiff
path: root/qml/pages/SettingsEditor.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/pages/SettingsEditor.qml')
-rw-r--r--qml/pages/SettingsEditor.qml90
1 files changed, 90 insertions, 0 deletions
diff --git a/qml/pages/SettingsEditor.qml b/qml/pages/SettingsEditor.qml
new file mode 100644
index 0000000..9baa51c
--- /dev/null
+++ b/qml/pages/SettingsEditor.qml
@@ -0,0 +1,90 @@
+import QtQuick 2.6
+import Sailfish.Silica 1.0
+
+Dialog {
+ id: settingsEditor
+
+ property var clear_generated_password;
+ property var clear_master_password;
+ property alias hide_generated_password: hide_generated_passwordBox.checked;
+
+ onAccepted: {
+ clear_generated_password =
+ clear_generated_passwordBox.checked
+ ? clear_generated_password_time.sliderValue * 60
+ : null;
+ clear_master_password =
+ clear_master_passwordBox.checked
+ ? clear_master_password_time.sliderValue * 60
+ : null;
+ }
+
+
+ SilicaFlickable {
+ anchors.fill: parent
+ contentHeight: column.height
+
+ VerticalScrollDecorator {}
+
+ Column {
+ id: column
+ width: parent.width
+ bottomPadding: Theme.paddingLarge
+ DialogHeader {
+ title: qsTr("Edit Settings")
+ }
+ TextSwitch {
+ id: hide_generated_passwordBox
+ text: qsTr("Hide Generated Password")
+ palette.highlightColor : Theme.highlightColor
+ highlighted: down
+ }
+ TextSwitch {
+ id: clear_generated_passwordBox
+ text: qsTr("Auto-clear generated password")
+ palette.highlightColor : Theme.highlightColor
+ highlighted: down
+ checked: typeof clear_generated_password !== 'undefined'
+ }
+ Slider {
+ id: clear_generated_password_time
+ minimumValue: 1
+ maximumValue: 15
+ stepSize: 1
+ width: parent.width
+ valueText: value + " min"
+ visible: clear_generated_passwordBox.checked
+ label: qsTr("Auto-clear generated pass timeout")
+ value: clear_generated_password/60 || 1
+ }
+ TextSwitch {
+ id: clear_master_passwordBox
+ text: qsTr("Auto-clear master password")
+ palette.highlightColor : Theme.highlightColor
+ highlighted: down
+ checked: typeof clear_master_password !== 'undefined'
+ }
+ Slider {
+ id: clear_master_password_time
+ minimumValue: clear_generated_passwordBox.checked
+ ? clear_generated_password_time.sliderValue
+ : 1
+ maximumValue: 30
+ stepSize: 1
+ width: parent.width
+ valueText: sliderValue + " min"
+ visible: clear_master_passwordBox.checked
+ label: qsTr("Auto-clear master pass timeout")
+ value: clear_master_password/60 || 5
+ }
+ Label {
+ topPadding: Theme.paddingLarge
+ width: parent.width - 2*Theme.horizontalPageMargin
+ x: Theme.horizontalPageMargin
+ wrapMode: Text.WordWrap
+ color: Theme.highlightColor
+ text: qsTr("Profiles can be edited directly in the profiles selector.")
+ }
+ }
+ }
+}