feat(switch): dms switch stable|beta replaces installed packages in place

- Settings, plugins and session state are backed up before dms changes w/restore options when returning to stable
- Snapshots are only taken when dms itself changes channel
- Info annotated on danklinux docs
This commit is contained in:
purian23 committed 2026-10-17 22:20:12 -04:00
1 parent 47885e4981
commit 207cbe5aae
19 files changed
+1174 -50

No files matched your search

+14
View File
@@ -1839,6 +1839,10 @@ Singleton {
let loadedSettings = JSON.stringify(obj);
const oldVersion = obj?.configVersion ?? 0;
if (oldVersion > settingsConfigVersion && !isGreeterMode) {
newerSettingsBackup.path = `${_configDir}/DankMaterialShell/settings.v${oldVersion}.json`;
newerSettingsBackup.setText(JSON.stringify(obj, null, 2));
}
const legacyPins = oldVersion < 13 ? Store.extractPins(obj) : null;
const sessionPayload = oldVersion < 15 ? Store.extractSessionPayload(obj) : null;
const cachePayload = oldVersion < 15 ? Store.extractCachePayload(obj) : null;
@@ -4060,6 +4064,16 @@ Singleton {
}
}
// Our first save drops the keys a newer shell wrote, so its settings are kept for going back.
FileView {
id: newerSettingsBackup
preload: false
blockWrites: true
atomicWrites: true
printErrors: false
}
FileView {
id: pluginSettingsFile