From 3931e2843bd01740a861e98c39cd8f133867b989 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 28 Feb 2021 00:11:07 +0300 Subject: Add Settings page --- qml/SettingsPage.qml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 qml/SettingsPage.qml (limited to 'qml/SettingsPage.qml') diff --git a/qml/SettingsPage.qml b/qml/SettingsPage.qml new file mode 100644 index 0000000..a7490fe --- /dev/null +++ b/qml/SettingsPage.qml @@ -0,0 +1,30 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.12 +import org.kde.kirigami 2.12 as Kirigami + +import DeltaChat 1.0 + +Kirigami.Page { + id: settingsPageRoot + + title: "Settings" + + required property DcContext context + + ColumnLayout { + anchors.fill: parent + + Switch { + text: "Prefer end-to-end encryption" + checked: settingsPageRoot.context.getConfig("e2ee_enabled") == "1" + onToggled: settingsPageRoot.context.setConfig("e2ee_enabled", checked ? "1" : "0") + } + + Switch { + text: "Read receipts" + checked: settingsPageRoot.context.getConfig("mdns_enabled") == "1" + onToggled: settingsPageRoot.context.setConfig("mdns_enabled", checked ? "1" : "0") + } + } +} -- cgit v1.2.3-70-g09d2