From a39cd5f3c0a3e287652f945d203facab413b5b65 Mon Sep 17 00:00:00 2001 From: ekambains Date: Sat, 12 Apr 2025 15:11:28 -0400 Subject: feat(web): Optionally add short description to lists (#1225) * feat(web): Optionally add short description to lists * regenerate openapi spec --------- Co-authored-by: Mohamed Bassem --- .../components/dashboard/lists/EditListModal.tsx | 22 ++++++++++++++++++++++ apps/web/components/dashboard/lists/ListHeader.tsx | 5 +++++ apps/web/lib/i18n/locales/en/translation.json | 3 ++- 3 files changed, 29 insertions(+), 1 deletion(-) (limited to 'apps/web') diff --git a/apps/web/components/dashboard/lists/EditListModal.tsx b/apps/web/components/dashboard/lists/EditListModal.tsx index 1851d416..2940a856 100644 --- a/apps/web/components/dashboard/lists/EditListModal.tsx +++ b/apps/web/components/dashboard/lists/EditListModal.tsx @@ -82,6 +82,7 @@ export function EditListModal({ resolver: zodResolver(zNewBookmarkListSchema), defaultValues: { name: list?.name ?? prefill?.name ?? "", + description: list?.description ?? prefill?.description ?? "", icon: list?.icon ?? prefill?.icon ?? "🚀", parentId: list?.parentId ?? prefill?.parentId, type: list?.type ?? prefill?.type ?? "manual", @@ -96,6 +97,7 @@ export function EditListModal({ useEffect(() => { form.reset({ name: list?.name ?? prefill?.name ?? "", + description: list?.description ?? prefill?.description ?? "", icon: list?.icon ?? prefill?.icon ?? "🚀", parentId: list?.parentId ?? prefill?.parentId, type: list?.type ?? prefill?.type ?? "manual", @@ -259,6 +261,26 @@ export function EditListModal({ }} /> + { + return ( + + {t("lists.description")} + + + + + + ); + }} + /> {list.icon} {list.name} + {list.description && ( + + {`(${list.description})`} + + )}
diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json index 536bea57..5166d6bd 100644 --- a/apps/web/lib/i18n/locales/en/translation.json +++ b/apps/web/lib/i18n/locales/en/translation.json @@ -229,7 +229,8 @@ "manual_list": "Manual List", "smart_list": "Smart List", "search_query": "Search Query", - "search_query_help": "Learn more about the search query language." + "search_query_help": "Learn more about the search query language.", + "description": "Description (Optional)" }, "tags": { "all_tags": "All Tags", -- cgit v1.2.3-70-g09d2