Skip to content

Commit

Permalink
feat: change sidebar opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfenmao committed Aug 12, 2024
1 parent 57f9550 commit 994ee8d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 36 deletions.
4 changes: 2 additions & 2 deletions src/renderer/src/assets/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
--color-scrollbar-thumb: rgba(255, 255, 255, 0.15);
--color-scrollbar-thumb-hover: rgba(255, 255, 255, 0.3);

--navbar-background: rgba(0, 0, 0, 0.8);
--sidebar-background: rgba(0, 0, 0, 0.8);
--navbar-background: rgba(30, 30, 30, 0.75);
--sidebar-background: rgba(30, 30, 30, 0.75);
--input-bar-background: rgba(255, 255, 255, 0.02);

--navbar-height: 42px;
Expand Down
1 change: 0 additions & 1 deletion src/renderer/src/pages/home/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const HomeHeader: FC<Props> = ({ activeAssistant }) => {
}

const AssistantName = styled.span`
font-weight: bold;
margin-left: 5px;
margin-right: 10px;
font-family: Ubuntu;
Expand Down
64 changes: 31 additions & 33 deletions src/renderer/src/pages/settings/AssistantSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,23 @@ const AssistantSettings: FC = () => {
placeholder={t('common.assistant') + t('common.name')}
value={defaultAssistant.name}
onChange={(e) => updateDefaultAssistant({ ...defaultAssistant, name: e.target.value })}
style={{ margin: '10px 0' }}
/>
<SettingSubtitle>{t('common.prompt')}</SettingSubtitle>
<TextArea
rows={4}
placeholder={t('common.assistant') + t('common.prompt')}
value={defaultAssistant.prompt}
onChange={(e) => updateDefaultAssistant({ ...defaultAssistant, prompt: e.target.value })}
style={{ margin: '10px 0' }}
/>
<SettingDivider />
<SettingSubtitle
style={{
marginTop: 0,
marginBottom: 20,
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between'
}}>
<span>{t('settings.assistant.model_params')}</span>
{t('settings.assistant.model_params')}
<Button onClick={onReset} style={{ width: 90 }}>
{t('chat.settings.reset')}
</Button>
Expand Down Expand Up @@ -173,35 +172,34 @@ const AssistantSettings: FC = () => {
}}
/>
</Row>
{enableMaxTokens && (
<Row align="middle" gutter={20}>
<Col span={21}>
<Slider
min={0}
max={32000}
onChange={setMaxTokens}
onChangeComplete={onMaxTokensChange}
value={typeof maxTokens === 'number' ? maxTokens : 0}
step={100}
marks={{
0: '0',
32000: t('chat.settings.max')
}}
/>
</Col>
<Col span={3}>
<InputNumber
min={0}
max={32000}
step={100}
value={maxTokens}
onChange={onMaxTokensChange}
controls={true}
style={{ width: '100%' }}
/>
</Col>
</Row>
)}
<Row align="middle" gutter={20}>
<Col span={21}>
<Slider
disabled={!enableMaxTokens}
min={0}
max={32000}
onChange={setMaxTokens}
onChangeComplete={onMaxTokensChange}
value={typeof maxTokens === 'number' ? maxTokens : 0}
step={100}
marks={{
0: '0',
32000: t('chat.settings.max')
}}
/>
</Col>
<Col span={3}>
<InputNumber
min={0}
max={32000}
step={100}
value={maxTokens}
onChange={onMaxTokensChange}
controls={true}
style={{ width: '100%' }}
/>
</Col>
</Row>
</SettingContainer>
)
}
Expand Down

0 comments on commit 994ee8d

Please sign in to comment.