From 9fdee82660f216a6da5f02c51009705bd80667cc Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Thu, 26 Mar 2020 18:43:20 +0100 Subject: [PATCH] add storage time setting --- src/alligatorsettings.kcfg | 8 ++++++++ src/contents/ui/SettingsPage.qml | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/alligatorsettings.kcfg b/src/alligatorsettings.kcfg index b196b441..9069c74b 100644 --- a/src/alligatorsettings.kcfg +++ b/src/alligatorsettings.kcfg @@ -5,5 +5,13 @@ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > + + + 2 + + + + 2 + diff --git a/src/contents/ui/SettingsPage.qml b/src/contents/ui/SettingsPage.qml index 96c5dc85..a654c00d 100644 --- a/src/contents/ui/SettingsPage.qml +++ b/src/contents/ui/SettingsPage.qml @@ -6,4 +6,26 @@ Kirigami.ScrollablePage { title: "Settings" property QtObject settings + + + Kirigami.FormLayout { + Controls.TextField { + id: deleteAfterCount + text: settings.deleteAfterCount + Kirigami.FormData.label: "Delete posts after:" + } + Controls.ComboBox { + id: deleteAfterType + currentIndex: settings.deleteAfterType + model: ["Posts", "Days", "Weeks", "Months"] + } + Controls.Button { + text: "Save" + onClicked: { + settings.deleteAfterCount = deleteAfterCount.text + settings.deleteAfterType = deleteAfterType.currentIndex + settings.save() + } + } + } }