Skip to content

Commit

Permalink
refactor: change position of search message button
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Nov 2, 2023
1 parent 061fa39 commit 424f861
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
24 changes: 12 additions & 12 deletions client/web/src/components/Panel/group/TextPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,30 +120,30 @@ export const TextPanel: React.FC<TextPanelProps> = React.memo(
]}
suffixActions={({ setRightPanel }) => [
<IconBtn
key="members"
title={t('成员列表')}
key="search"
title={t('聊天记录搜索')}
shape="square"
icon="mdi:account-supervisor-outline"
icon="mdi:text-search"
iconClassName="text-2xl"
onClick={() =>
setRightPanel({
name: t('成员') + ` (${groupMembers.length})`,
panel: <MembersPanel groupId={groupId} />,
name: t('聊天记录'),
panel: (
<MessageSearchPanel groupId={groupId} converseId={panelId} />
),
})
}
/>,
<IconBtn
key="search"
title={t('聊天记录搜索')}
key="members"
title={t('成员列表')}
shape="square"
icon="mdi:text-search"
icon="mdi:account-supervisor-outline"
iconClassName="text-2xl"
onClick={() =>
setRightPanel({
name: t('聊天记录'),
panel: (
<MessageSearchPanel groupId={groupId} converseId={panelId} />
),
name: t('成员') + ` (${groupMembers.length})`,
panel: <MembersPanel groupId={groupId} />,
})
}
/>,
Expand Down
26 changes: 13 additions & 13 deletions client/web/src/components/Panel/personal/ConversePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ export const ConversePanel: React.FC<ConversePanelProps> = React.memo(
}
/>
),
<IconBtn
key="search"
title={t('聊天记录搜索')}
shape="square"
icon="mdi:text-search"
iconClassName="text-2xl"
onClick={() =>
setRightPanel({
name: t('聊天记录'),
panel: <MessageSearchPanel converseId={converseId} />,
})
}
/>,
// 当成员数大于2时,显示成员列表按钮
converse.members.length > 2 && (
<IconBtn
Expand All @@ -136,19 +149,6 @@ export const ConversePanel: React.FC<ConversePanelProps> = React.memo(
}
/>
),
<IconBtn
key="search"
title={t('聊天记录搜索')}
shape="square"
icon="mdi:text-search"
iconClassName="text-2xl"
onClick={() =>
setRightPanel({
name: t('聊天记录'),
panel: <MessageSearchPanel converseId={converseId} />,
})
}
/>,
]);
}}
>
Expand Down

0 comments on commit 424f861

Please sign in to comment.