diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-23 20:18:01 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-23 20:18:01 +0200 |
| commit | ec4d2a77def6809ebb2e4f8dac461e97b8a8695c (patch) | |
| tree | 67255f5f92ebd9ae963c6fbf0e4e76596c996662 /desktop/Prefs.qml | |
| parent | 2b934e4c6d83fafd418aa0f1940f31925ae63068 (diff) | |
| download | quickshell-ec4d2a77def6809ebb2e4f8dac461e97b8a8695c.tar.gz quickshell-ec4d2a77def6809ebb2e4f8dac461e97b8a8695c.zip | |
prefs: companionArtists, saved like companionApps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Prefs.qml')
| -rw-r--r-- | desktop/Prefs.qml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml index f7e841b..610e004 100644 --- a/desktop/Prefs.qml +++ b/desktop/Prefs.qml @@ -90,6 +90,21 @@ Singleton { root.write(d); } + // The companion's artist lines as saved, keyed by lowercased artist, or + // null for the defaults in companion/Lines.js. The Companion artists + // page edits it. + property var companionArtists: null + function setCompanionArtists(map) { + root.companionArtists = map; + root.write(Object.assign({}, root.doc, { companionArtists: map })); + } + function resetCompanionArtists() { + root.companionArtists = null; + const d = Object.assign({}, root.doc); + delete d.companionArtists; + root.write(d); + } + // The settings window's sidebar width, dragged by its edge. readonly property int sidebarMin: 160 readonly property int sidebarMax: 420 @@ -154,6 +169,8 @@ Singleton { root.companionBlushFile = typeof parsed.companionBlushFile === "string" ? parsed.companionBlushFile : ""; const ca = parsed.companionApps; root.companionApps = ca && typeof ca === "object" && !Array.isArray(ca) ? ca : null; + const cr = parsed.companionArtists; + root.companionArtists = cr && typeof cr === "object" && !Array.isArray(cr) ? cr : null; root.ready = true; } @@ -169,6 +186,6 @@ Singleton { onFileChanged: reload() onLoaded: root.reparse() // Missing file: the defaults, and nothing written. - onLoadFailed: { root.doc = {}; root.pinnedIp = ""; root.presets = null; root.settingsSidebar = 200; root.assistantModel = ""; root.companion = true; root.companionBlushFile = ""; root.companionSkirtless = 60; root.companionApps = null; root.ready = true; } + onLoadFailed: { root.doc = {}; root.pinnedIp = ""; root.presets = null; root.settingsSidebar = 200; root.assistantModel = ""; root.companion = true; root.companionBlushFile = ""; root.companionSkirtless = 60; root.companionApps = null; root.companionArtists = null; root.ready = true; } } } |
