fix: the Create Folder window closes when the Folders permission is turned off (#34507)

This commit is contained in:
G30 authored and GitHub committed 2026-11-15 23:24:45 -05:00
1 parent 1675f4cff4
commit a6d77fbe6a
1 file changed
+9 -7
+9 -7
View File
@@ -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}