mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
feat: save user settings to db
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
import ArchiveBox from '../icons/ArchiveBox.svelte';
|
||||
import ArchivedChatsModal from './Sidebar/ArchivedChatsModal.svelte';
|
||||
import UserMenu from './Sidebar/UserMenu.svelte';
|
||||
import { updateUserSettings } from '$lib/apis/users';
|
||||
|
||||
const BREAKPOINT = 768;
|
||||
|
||||
@@ -184,6 +185,8 @@
|
||||
const saveSettings = async (updated) => {
|
||||
await settings.set({ ...$settings, ...updated });
|
||||
localStorage.setItem('settings', JSON.stringify($settings));
|
||||
await updateUserSettings(localStorage.token, { ui: $settings });
|
||||
|
||||
location.href = '/';
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user