Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/renderer/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@
overflow: hidden !important;
}

/* Model Service Tabs 内容区域滚动 - 仅滚动时显示滚动条 */
.model-service-tabs .ant-tabs-content-holder {
overflow-y: auto;
scrollbar-gutter: stable;
}

.model-service-tabs .ant-tabs-content-holder::-webkit-scrollbar {
width: 6px;
}

.model-service-tabs .ant-tabs-content-holder::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 3px;
}

.model-service-tabs .ant-tabs-content-holder:hover::-webkit-scrollbar-thumb,
.model-service-tabs .ant-tabs-content-holder:active::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
}

.model-service-tabs .ant-tabs-content-holder::-webkit-scrollbar-track {
background: transparent;
}

/* Markdown 预览面板滚动 */
.ant-splitter-panel:last-child {
overflow: auto !important;
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/ModelService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const ModelService: React.FC = () => {
onChange={setActiveKey}
tabPosition="left"
items={items}
className="model-service-tabs"
/>
</ConfigProvider>
);
Expand Down
34 changes: 16 additions & 18 deletions src/renderer/components/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,24 +421,22 @@ const Provider: React.FC<ProviderProps> = ({
)}
/>

<div style={{ display: "flex", justifyContent: "space-between" }}>
<Space>
<Typography.Text>{t('model_config.name_label')}</Typography.Text>
<Input
placeholder={t('model_config.name_placeholder')}
style={{ width: "290px" }}
value={newModelName}
onChange={(e) => setNewModelName(e.target.value)}
/>
<Typography.Text>{t('model_config.id_label')}</Typography.Text>
<Input
placeholder={t('model_config.id_placeholder')}
style={{ width: "290px" }}
value={newModelId}
onChange={(e) => setNewModelId(e.target.value)}
/>
</Space>
<Button type="primary" icon={<PlusOutlined />} onClick={addModel}>
<div style={{ display: "flex", alignItems: "center", gap: 8 }}>
<Typography.Text style={{ whiteSpace: "nowrap", flexShrink: 0 }}>{t('model_config.name_label')}</Typography.Text>
<Input
placeholder={t('model_config.name_placeholder')}
style={{ flex: 1, minWidth: 0 }}
value={newModelName}
onChange={(e) => setNewModelName(e.target.value)}
/>
<Typography.Text style={{ whiteSpace: "nowrap", flexShrink: 0 }}>{t('model_config.id_label')}</Typography.Text>
<Input
placeholder={t('model_config.id_placeholder')}
style={{ flex: 1, minWidth: 0 }}
value={newModelId}
onChange={(e) => setNewModelId(e.target.value)}
/>
<Button type="primary" icon={<PlusOutlined />} onClick={addModel} style={{ whiteSpace: "nowrap", flexShrink: 0 }}>
{t('model_config.add_button')}
</Button>
</div>
Expand Down