From b5607757131031c1a85dccebacf3c8c400ce6a9c Mon Sep 17 00:00:00 2001 From: Shirasawa <764798966@qq.com> Date: Thu, 4 Dec 2025 06:16:38 +0800 Subject: [PATCH] fix: do not display the move button when no folders (#19705) --- src/lib/components/layout/Navbar/Menu.svelte | 54 +++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/lib/components/layout/Navbar/Menu.svelte b/src/lib/components/layout/Navbar/Menu.svelte index a64e438ef0..6d5d478719 100644 --- a/src/lib/components/layout/Navbar/Menu.svelte +++ b/src/lib/components/layout/Navbar/Menu.svelte @@ -437,33 +437,37 @@ {#if !$temporaryChatEnabled && chat?.id}
- - - + {#if $folders.length > 0} + + + -
{$i18n.t('Move')}
-
- - {#each $folders.sort((a, b) => b.updated_at - a.updated_at) as folder} - { - moveChatHandler(chat?.id, folder?.id); - }} - > - +
{$i18n.t('Move')}
+
+ + {#each $folders.sort((a, b) => b.updated_at - a.updated_at) as folder} + {#if folder?.id} + { + moveChatHandler(chat.id, folder.id); + }} + > + -
{folder?.name ?? 'Folder'}
-
- {/each} -
-
+
{folder.name ?? 'Folder'}
+ + {/if} + {/each} + + + {/if}