mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-16 09:41:23 +00:00
fix: only fall back to the admin terminal display default when unset
The backend treated any value other than 'inline' or 'sidebar' as unset and fell back to the admin default, while the frontend (src/routes/+layout.svelte) does a plain equality check against 'inline'. Nothing validates UserSettings.ui, so a stored value like 'Inline' or true rendered inline on the backend-managed tool path and sidebar in the browser for the same user. Falling back only on None matches the frontend for every storable value and keeps the fallback for the absent key, which strip_default_interface_settings creates whenever the user's value equals the admin default.
This commit is contained in:
parent
8f5d760515
commit
b7c8082965
1 changed files with 1 additions and 1 deletions
|
|
@ -303,7 +303,7 @@ async def is_terminal_file_display_inline(user: UserModel) -> bool:
|
|||
ui_settings = user.settings.ui if isinstance(user.settings, UserSettings) else None
|
||||
value = (ui_settings or {}).get('terminalFileDisplay')
|
||||
|
||||
if value not in ('inline', 'sidebar'):
|
||||
if value is None:
|
||||
default_interface_settings = await Config.get('ui.default_interface_settings')
|
||||
if isinstance(default_interface_settings, dict):
|
||||
value = default_interface_settings.get('terminalFileDisplay')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue