feat(settings): add function to set settings

Added function setSetting, which sets a setting, to useSettings
composable.
This commit is contained in:
2026-08-06 15:33:55 +02:00
parent 396c025ec4
commit 15697144b1
@@ -40,5 +40,15 @@ export const useSettings = function useSettings () {
); );
}; };
return { getSetting }; /**
* Sets the value of a specific setting.
* @param {string[]} key - The setting key.
* @param value - The new value for the setting.
*/
const setSetting = function setSetting (key, value) {
const settingsStore = useSettingsStore();
settingsStore.set(key.join('.'), value);
};
return { getSetting, setSetting };
}; };