add storage time setting

This commit is contained in:
Tobias Fella 2020-03-26 18:43:20 +01:00
parent 195b6d63ee
commit 9fdee82660
No known key found for this signature in database
GPG Key ID: E55EDAB3CA5D9925
2 changed files with 30 additions and 0 deletions

View File

@ -5,5 +5,13 @@
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="alligatorrc" />
<group name="General">
<entry name="deleteAfterCount" type="Int">
<label>Delete after count</label>
<default>2</default>
</entry>
<entry name="deleteAfterType" type="Int">
<label>Delete after type</label>
<default>2</default>
</entry>
</group>
</kcfg>

View File

@ -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()
}
}
}
}