From 64fb1764f1afa1d8f4ff5bef52930e604b9b38fc Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 4 Dec 2026 04:24:16 +0400 Subject: [PATCH] refac --- .../chat/Placeholder/FolderNotes.svelte | 5 +- .../components/layout/Sidebar/TeamItem.svelte | 37 +- src/lib/components/teams/Team.svelte | 5 + src/lib/components/teams/TeamMenu.svelte | 4 +- src/lib/components/teams/TeamModal.svelte | 352 ++++++++++-------- src/lib/i18n/locales/ar-BH/translation.json | 3 +- src/lib/i18n/locales/ar/translation.json | 3 +- src/lib/i18n/locales/az-AZ/translation.json | 3 +- src/lib/i18n/locales/bg-BG/translation.json | 3 +- src/lib/i18n/locales/bn-BD/translation.json | 3 +- src/lib/i18n/locales/bo-TB/translation.json | 3 +- src/lib/i18n/locales/bs-BA/translation.json | 3 +- src/lib/i18n/locales/ca-ES/translation.json | 3 +- src/lib/i18n/locales/ceb-PH/translation.json | 3 +- src/lib/i18n/locales/cs-CZ/translation.json | 3 +- src/lib/i18n/locales/da-DK/translation.json | 3 +- src/lib/i18n/locales/de-DE/translation.json | 3 +- src/lib/i18n/locales/dg-DG/translation.json | 3 +- src/lib/i18n/locales/el-GR/translation.json | 3 +- src/lib/i18n/locales/en-GB/translation.json | 3 +- src/lib/i18n/locales/en-US/translation.json | 3 +- src/lib/i18n/locales/es-ES/translation.json | 3 +- src/lib/i18n/locales/et-EE/translation.json | 3 +- src/lib/i18n/locales/eu-ES/translation.json | 3 +- src/lib/i18n/locales/fa-IR/translation.json | 3 +- src/lib/i18n/locales/fi-FI/translation.json | 3 +- src/lib/i18n/locales/fil-PH/translation.json | 3 +- src/lib/i18n/locales/fo-FO/translation.json | 3 +- src/lib/i18n/locales/fr-CA/translation.json | 3 +- src/lib/i18n/locales/fr-FR/translation.json | 3 +- src/lib/i18n/locales/gl-ES/translation.json | 3 +- src/lib/i18n/locales/he-IL/translation.json | 3 +- src/lib/i18n/locales/hi-IN/translation.json | 3 +- src/lib/i18n/locales/hr-HR/translation.json | 3 +- src/lib/i18n/locales/hu-HU/translation.json | 3 +- src/lib/i18n/locales/id-ID/translation.json | 3 +- src/lib/i18n/locales/ie-GA/translation.json | 3 +- src/lib/i18n/locales/it-IT/translation.json | 3 +- src/lib/i18n/locales/ja-JP/translation.json | 3 +- src/lib/i18n/locales/ka-GE/translation.json | 3 +- src/lib/i18n/locales/kab-DZ/translation.json | 3 +- src/lib/i18n/locales/ko-KR/translation.json | 3 +- src/lib/i18n/locales/lt-LT/translation.json | 3 +- src/lib/i18n/locales/lv-LV/translation.json | 3 +- src/lib/i18n/locales/ms-MY/translation.json | 3 +- src/lib/i18n/locales/nb-NO/translation.json | 3 +- src/lib/i18n/locales/nl-NL/translation.json | 3 +- src/lib/i18n/locales/pa-IN/translation.json | 3 +- src/lib/i18n/locales/pl-PL/translation.json | 3 +- src/lib/i18n/locales/pt-BR/translation.json | 3 +- src/lib/i18n/locales/pt-PT/translation.json | 3 +- src/lib/i18n/locales/ro-RO/translation.json | 3 +- src/lib/i18n/locales/ru-RU/translation.json | 3 +- src/lib/i18n/locales/sk-SK/translation.json | 3 +- src/lib/i18n/locales/sl-SI/translation.json | 3 +- src/lib/i18n/locales/sr-RS/translation.json | 3 +- src/lib/i18n/locales/sv-SE/translation.json | 3 +- src/lib/i18n/locales/ta-IN/translation.json | 3 +- src/lib/i18n/locales/th-TH/translation.json | 3 +- src/lib/i18n/locales/tk-TM/translation.json | 3 +- src/lib/i18n/locales/tr-TR/translation.json | 3 +- src/lib/i18n/locales/ug-CN/translation.json | 3 +- src/lib/i18n/locales/uk-UA/translation.json | 3 +- src/lib/i18n/locales/ur-PK/translation.json | 3 +- .../i18n/locales/uz-Cyrl-UZ/translation.json | 3 +- .../i18n/locales/uz-Latn-UZ/translation.json | 3 +- src/lib/i18n/locales/vi-VN/translation.json | 3 +- src/lib/i18n/locales/zh-CN/translation.json | 3 +- src/lib/i18n/locales/zh-TW/translation.json | 3 +- 69 files changed, 375 insertions(+), 220 deletions(-) diff --git a/src/lib/components/chat/Placeholder/FolderNotes.svelte b/src/lib/components/chat/Placeholder/FolderNotes.svelte index 8f30e454d7..5e43d025a3 100644 --- a/src/lib/components/chat/Placeholder/FolderNotes.svelte +++ b/src/lib/components/chat/Placeholder/FolderNotes.svelte @@ -71,7 +71,10 @@
{:else if !notes.length}
-
{$i18n.t('No Notes')}
+
{$i18n.t('No notes yet')}
+
+ {$i18n.t('Notes in this folder will show up here.')} +
{#if canCreate}
+ {#if canManageTeam} + + teams.update((list) => list.map((item) => (item.id === next.id ? next : item)))} + /> + {/if} + {#if open && subTeams.length}
item.id === id); + $: if (team && storedTeam && storedTeam.updated_at > team.updated_at) + team = { ...team, ...storedTeam }; + const setTeam = (next: Team) => { team = next; teams.update((list) => list.map((item) => (item.id === next.id ? next : item))); diff --git a/src/lib/components/teams/TeamMenu.svelte b/src/lib/components/teams/TeamMenu.svelte index ac432c5d1d..c61cc61309 100644 --- a/src/lib/components/teams/TeamMenu.svelte +++ b/src/lib/components/teams/TeamMenu.svelte @@ -19,13 +19,15 @@ export let onUnarchive: (() => void) | null = null; export let onLeave: (() => void) | null = null; export let onDelete: (() => void) | null = null; + // Beside a page title it opens leftward; in the sidebar it opens rightward, as FolderMenu does. + export let align: 'start' | 'end' = 'end'; const row = 'flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[0.8125rem] select-none cursor-pointer hover:bg-base-100 dark:hover:bg-base-900'; const divider = 'border-base-50/30 dark:border-base-800/30 mx-1 my-0.5'; - + -
- -
-
-
- -
- (icon = value ?? '')} - > - - - -
-
- - -
- +
- -
- -