diff --git a/src/lib/components/layout/ImportChatsModal.svelte b/src/lib/components/layout/ImportChatsModal.svelte
index 30302bc650..7b746583c6 100644
--- a/src/lib/components/layout/ImportChatsModal.svelte
+++ b/src/lib/components/layout/ImportChatsModal.svelte
@@ -258,7 +258,7 @@
{#if rawChats.length > 0}
- Total: {rawChats.length} | Selected: {selectedIndices.size}
+ 总计: {rawChats.length} | 已选: {selectedIndices.size}
diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte
index 38bd20373d..a44c3858c0 100644
--- a/src/lib/components/layout/Sidebar.svelte
+++ b/src/lib/components/layout/Sidebar.svelte
@@ -1,1367 +1,1230 @@
{
- await initChatList();
- }}
+ bind:show={$showArchivedChats}
+ onUpdate={async () => {
+ await initChatList();
+ }}
/>
{
- const res = await createNewChannel(localStorage.token, {
- name: name,
- access_control: access_control
- }).catch((error) => {
- toast.error(`${error}`);
- return null;
- });
+ bind:show={showCreateChannel}
+ onSubmit={async ({ name, access_control }) => {
+ const res = await createNewChannel(localStorage.token, {
+ name: name,
+ access_control: access_control
+ }).catch((error) => {
+ toast.error(`${error}`);
+ return null;
+ });
- if (res) {
- $socket.emit('join-channels', { auth: { token: $user?.token } });
- await initChannels();
- showCreateChannel = false;
- }
- }}
+ if (res) {
+ $socket.emit('join-channels', { auth: { token: $user?.token } });
+ await initChannels();
+ showCreateChannel = false;
+ }
+ }}
/>
{
- await createFolder(folder);
- showCreateFolderModal = false;
- }}
+ bind:show={showCreateFolderModal}
+ onSubmit={async (folder) => {
+ await createFolder(folder);
+ showCreateFolderModal = false;
+ }}
/>
-
-
{#if $showSidebar}
-
{/if}
{
- await importChatsHandler(chats);
- }}
-/>
+ bind:show={showImportChatsModal}
+ onImport={async (chats) => {
+ await importChatsHandler(chats);
+ }}
+/>
\ No newline at end of file