mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-28 08:09:27 -05:00
fix: the Create Folder window closes when the Folders permission is turned off (#34507)
This commit is contained in:
1 file changed
+9
-7
@@ -1112,13 +1112,15 @@
|
||||
}}
|
||||
/>
|
||||
|
||||
<FolderModal
|
||||
bind:show={showCreateFolderModal}
|
||||
onSubmit={async (folder) => {
|
||||
await createFolder(folder);
|
||||
showCreateFolderModal = false;
|
||||
}}
|
||||
/>
|
||||
{#if $config?.features?.enable_folders && ($user?.role === 'admin' || ($user?.permissions?.features?.folders ?? true))}
|
||||
<FolderModal
|
||||
bind:show={showCreateFolderModal}
|
||||
onSubmit={async (folder) => {
|
||||
await createFolder(folder);
|
||||
showCreateFolderModal = false;
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<svelte:window
|
||||
on:click|capture={sidebarLinkClickHandler}
|
||||
|
||||
Reference in new issue
Block a user