From 275f30f0487a02e96289d8df5ea107bdd591212e Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 28 Jul 2024 00:05:52 +0800 Subject: [PATCH] feat: add feed channel into search command panel --- src/client/components/CommandPanel.tsx | 28 +++++++++++++++++++++ src/client/components/layout/UserConfig.tsx | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/client/components/CommandPanel.tsx b/src/client/components/CommandPanel.tsx index e30a0b5..0cb1e15 100644 --- a/src/client/components/CommandPanel.tsx +++ b/src/client/components/CommandPanel.tsx @@ -10,6 +10,7 @@ import { CommandSeparator, } from '@/components/ui/command'; import { + LuActivitySquare, LuAreaChart, LuBellDot, LuFilePieChart, @@ -143,6 +144,14 @@ export const CommandPanel: React.FC = React.memo((props) => { {t('Survey')} + + + {t('Feed')} + @@ -195,6 +204,9 @@ export const CommandPanelSearchGroup: React.FC = const { data: surveys = [] } = trpc.survey.all.useQuery({ workspaceId, }); + const { data: feedChannels = [] } = trpc.feed.channels.useQuery({ + workspaceId, + }); if (!search) { return null; @@ -282,6 +294,22 @@ export const CommandPanelSearchGroup: React.FC = {s.name} ))} + {feedChannels.map((channel) => ( + + + {channel.name} + + ))} ); }); diff --git a/src/client/components/layout/UserConfig.tsx b/src/client/components/layout/UserConfig.tsx index cf460c4..2ce749e 100644 --- a/src/client/components/layout/UserConfig.tsx +++ b/src/client/components/layout/UserConfig.tsx @@ -201,7 +201,7 @@ export const UserConfig: React.FC = React.memo((props) => { - + v{version}