aboutsummaryrefslogtreecommitdiff
path: root/qml/SettingsPage.qml
blob: b7a38bb4ccd82dcb05575cf4d8fa9c2857809502 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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

    Kirigami.FormLayout {
        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")
        }
    }
}