feat(i18n): integrate i18next for internationalization support and add initial translation setup

This commit is contained in:
kever
2026-02-16 14:54:14 +08:00
parent 208d87a6ab
commit dc73f6f6af
2 changed files with 23 additions and 15 deletions

View File

@@ -900,9 +900,8 @@ const getMainStatLabel = (target: 'necklace' | 'ring' | 'boots', value: MainStat
</div> </div>
</div> </div>
<div className="optimizer-weight-panel" style={leftPanelsHeight ? {height: leftPanelsHeight} : undefined}> <div className="optimizer-weight-panel" style={leftPanelsHeight ? {height: leftPanelsHeight} : undefined}>
<div className="optimizer-weight-row"> <div className="optimizer-weight-row optimizer-weight-row-no-label">
<span className="optimizer-weight-icon"></span> <span className="optimizer-weight-icon"></span>
<span className="optimizer-weight-label"></span>
<Slider <Slider
min={0} min={0}
max={5} max={5}
@@ -1006,17 +1005,17 @@ const getMainStatLabel = (target: 'necklace' | 'ring' | 'boots', value: MainStat
</div> </div>
</div> </div>
</div> </div>
<div style={{display: 'flex', gap: 8}}> <div style={{display: 'flex', gap: 8, alignItems: 'center', justifyContent: 'flex-end', width: '100%'}}>
<Button icon={<ReloadOutlined/>} onClick={loadLatestData} loading={loading}> <Button icon={<ReloadOutlined/>} onClick={loadLatestData} loading={loading} style={{height: 32}}>
</Button> </Button>
<Button icon={<ReloadOutlined/>} onClick={resetSetsAndAttrs}> <Button icon={<ReloadOutlined/>} onClick={resetSetsAndAttrs} style={{height: 32}}>
{'\u91cd\u7f6e\u5957\u88c5'} {'\u91cd\u7f6e\u5957\u88c5'}
</Button> </Button>
<Button icon={<FilterOutlined/>} onClick={resetPreferences}> <Button icon={<FilterOutlined/>} onClick={resetPreferences} style={{height: 32}}>
{'\u91cd\u7f6e\u504f\u597d'} {'\u91cd\u7f6e\u504f\u597d'}
</Button> </Button>
<Button type="primary" icon={<AppstoreOutlined/>} onClick={buildResults}> <Button type="primary" icon={<AppstoreOutlined/>} onClick={buildResults} style={{height: 32}}>
{'\u5f00\u59cb\u914d\u88c5'} {'\u5f00\u59cb\u914d\u88c5'}
</Button> </Button>
</div> </div>

View File

@@ -242,6 +242,14 @@
padding: 6px; padding: 6px;
} }
.optimizer-weight-row-no-label {
grid-template-columns: 20px 1fr;
}
.optimizer-weight-row-no-label .optimizer-weight-label {
display: none;
}
.optimizer-weight-row:last-child { .optimizer-weight-row:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
@@ -269,13 +277,7 @@
} }
.optimizer-weight-slider .ant-slider-rail { .optimizer-weight-slider .ant-slider-rail {
background: repeating-linear-gradient( background: rgba(255, 255, 255, 0.15);
to right,
rgba(255, 255, 255, 0.25),
rgba(255, 255, 255, 0.25) 2px,
rgba(255, 255, 255, 0) 14px,
rgba(255, 255, 255, 0) 18px
);
height: 4px; height: 4px;
} }
@@ -287,8 +289,15 @@
.optimizer-weight-slider .ant-slider-handle { .optimizer-weight-slider .ant-slider-handle {
width: 12px; width: 12px;
height: 12px; height: 12px;
margin-top: -4px; margin-top: -1px;
border-color: #7bb4ff; border-color: #7bb4ff;
box-shadow: none;
border-radius: 50%;
background-color: #ffffff;
}
.optimizer-weight-slider .ant-slider-handle::after {
display: none;
} }
.optimizer-weight-row .ant-slider-rail { .optimizer-weight-row .ant-slider-rail {
background-color: rgba(255, 255, 255, 0.15); background-color: rgba(255, 255, 255, 0.15);