1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Add notepad file persistence & overwrite save options

This commit is contained in:
purian23
2025-09-07 15:39:05 -04:00
parent c23088c98a
commit 8abc94fd07
3 changed files with 207 additions and 7 deletions

View File

@@ -41,6 +41,9 @@ Singleton {
property string wallpaperCyclingTime: "06:00" // HH:mm format
property string lastBrightnessDevice: ""
property string notepadContent: ""
property string notepadCurrentFileName: ""
property string notepadCurrentFileUrl: ""
property string notepadLastSavedContent: ""
Component.onCompleted: {
loadSettings()
@@ -96,6 +99,9 @@ Singleton {
wallpaperCyclingTime = settings.wallpaperCyclingTime !== undefined ? settings.wallpaperCyclingTime : "06:00"
lastBrightnessDevice = settings.lastBrightnessDevice !== undefined ? settings.lastBrightnessDevice : ""
notepadContent = settings.notepadContent !== undefined ? settings.notepadContent : ""
notepadCurrentFileName = settings.notepadCurrentFileName !== undefined ? settings.notepadCurrentFileName : ""
notepadCurrentFileUrl = settings.notepadCurrentFileUrl !== undefined ? settings.notepadCurrentFileUrl : ""
notepadLastSavedContent = settings.notepadLastSavedContent !== undefined ? settings.notepadLastSavedContent : ""
}
} catch (e) {
@@ -132,7 +138,10 @@ Singleton {
"wallpaperCyclingInterval": wallpaperCyclingInterval,
"wallpaperCyclingTime": wallpaperCyclingTime,
"lastBrightnessDevice": lastBrightnessDevice,
"notepadContent": notepadContent
"notepadContent": notepadContent,
"notepadCurrentFileName": notepadCurrentFileName,
"notepadCurrentFileUrl": notepadCurrentFileUrl,
"notepadLastSavedContent": notepadLastSavedContent
}, null, 2))
}