mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-30 07:39:06 +08:00
fix: left sidebar icon
This commit is contained in:
parent
e6e1502308
commit
e6122a3d36
@ -86,14 +86,10 @@ const Assistants: FC<Props> = ({ activeAssistant, setActiveAssistant, onCreateAs
|
||||
})
|
||||
}
|
||||
|
||||
if (assistant.id === activeAssistant?.id) {
|
||||
toggleShowTopics()
|
||||
}
|
||||
|
||||
EventEmitter.emit(EVENT_NAMES.SWITCH_TOPIC_SIDEBAR)
|
||||
setActiveAssistant(assistant)
|
||||
},
|
||||
[activeAssistant?.id, generating, setActiveAssistant, t, toggleShowTopics]
|
||||
[generating, setActiveAssistant, t]
|
||||
)
|
||||
|
||||
return (
|
||||
@ -105,7 +101,13 @@ const Assistants: FC<Props> = ({ activeAssistant, setActiveAssistant, onCreateAs
|
||||
onClick={() => onSwitchAssistant(assistant)}
|
||||
className={assistant.id === activeAssistant?.id ? 'active' : ''}>
|
||||
<AssistantName className="name">{assistant.name || t('chat.default.name')}</AssistantName>
|
||||
<ArrowRightButton className="arrow-button">
|
||||
<ArrowRightButton
|
||||
className="arrow-button"
|
||||
onClick={() => {
|
||||
if (assistant.id === activeAssistant?.id) {
|
||||
toggleShowTopics()
|
||||
}
|
||||
}}>
|
||||
<i className="iconfont icon-gridlines" />
|
||||
</ArrowRightButton>
|
||||
{false && <TopicCount className="topics-count">{assistant.topics.length}</TopicCount>}
|
||||
@ -144,7 +146,7 @@ const AssistantItem = styled.div`
|
||||
opacity: 0;
|
||||
color: var(--color-text-3);
|
||||
}
|
||||
&:hover {
|
||||
/* &:hover {
|
||||
background-color: var(--color-background-soft);
|
||||
.topics-count {
|
||||
display: none;
|
||||
@ -152,7 +154,7 @@ const AssistantItem = styled.div`
|
||||
.iconfont {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
} */
|
||||
&.active {
|
||||
background-color: var(--color-background-mute);
|
||||
.topics-count {
|
||||
|
||||
@ -43,7 +43,7 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant, setActiveAssistant, setActiv
|
||||
{showAssistants && (
|
||||
<NavbarLeft style={{ justifyContent: 'space-between', borderRight: 'none', padding: '0 8px' }}>
|
||||
<NewButton onClick={toggleShowAssistants} style={{ marginLeft: isMac ? 8 : 0 }}>
|
||||
<i className="iconfont icon-sidebar-left" />
|
||||
<i className="iconfont icon-sidebar-right" />
|
||||
</NewButton>
|
||||
<NewButton onClick={onCreateAssistant} style={{ marginRight: 6 }}>
|
||||
<i className="iconfont icon-a-addchat" />
|
||||
@ -61,7 +61,7 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant, setActiveAssistant, setActiv
|
||||
<HStack alignItems="center">
|
||||
{!showAssistants && (
|
||||
<NewButton onClick={toggleShowAssistants} style={{ marginRight: isMac ? 8 : 25 }}>
|
||||
<i className="iconfont icon-sidebar-right" />
|
||||
<i className="iconfont icon-sidebar-left" />
|
||||
</NewButton>
|
||||
)}
|
||||
{showAssistants && (
|
||||
@ -78,8 +78,10 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant, setActiveAssistant, setActiv
|
||||
<NavbarRight style={{ justifyContent: 'space-between', paddingRight: isWindows ? 130 : 12, flex: 1 }}>
|
||||
<HStack alignItems="center">
|
||||
{!showAssistants && !showTopics && (
|
||||
<NewButton onClick={() => toggleShowAssistants()} style={{ marginRight: isMac ? 8 : 25 }}>
|
||||
<i className="iconfont icon-sidebar-right" />
|
||||
<NewButton
|
||||
onClick={() => toggleShowAssistants()}
|
||||
style={{ marginRight: isMac ? 8 : 25, marginLeft: isMac ? 8 : 0 }}>
|
||||
<i className="iconfont icon-sidebar-left" />
|
||||
</NewButton>
|
||||
)}
|
||||
<TitleText>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user