mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 10:39:20 +08:00
系统设置增加时区设置
This commit is contained in:
@@ -32,3 +32,13 @@
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.ql-container-wrapper.ql-setting-container {
|
||||
.ant-tabs-tabpane > div {
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.ant-tabs-tabpane > .ant-form {
|
||||
padding-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,12 @@ import Countdown from 'antd/lib/statistic/Countdown';
|
||||
import useProgress from './progress';
|
||||
import pick from 'lodash/pick';
|
||||
import { disableBody } from '@/utils';
|
||||
import { TIMEZONES } from '@/utils/const';
|
||||
|
||||
const dataMap = {
|
||||
'log-remove-frequency': 'logRemoveFrequency',
|
||||
'cron-concurrency': 'cronConcurrency',
|
||||
timezone: 'timezone',
|
||||
};
|
||||
|
||||
const Other = ({
|
||||
@@ -37,6 +39,7 @@ const Other = ({
|
||||
const [systemConfig, setSystemConfig] = useState<{
|
||||
logRemoveFrequency?: number | null;
|
||||
cronConcurrency?: number | null;
|
||||
timezone?: string | null;
|
||||
}>();
|
||||
const [form] = Form.useForm();
|
||||
const [exportLoading, setExportLoading] = useState(false);
|
||||
@@ -252,6 +255,34 @@ const Other = ({
|
||||
</Button>
|
||||
</Input.Group>
|
||||
</Form.Item>
|
||||
<Form.Item label={intl.get('时区')} name="timezone">
|
||||
<Input.Group compact>
|
||||
<Select
|
||||
value={systemConfig?.timezone}
|
||||
style={{ width: 180 }}
|
||||
onChange={(value) => {
|
||||
setSystemConfig({ ...systemConfig, timezone: value });
|
||||
}}
|
||||
options={TIMEZONES.map((timezone) => ({
|
||||
value: timezone,
|
||||
label: timezone,
|
||||
}))}
|
||||
showSearch
|
||||
filterOption={(input, option) =>
|
||||
option?.value?.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
updateSystemConfig('timezone');
|
||||
}}
|
||||
style={{ width: 84 }}
|
||||
>
|
||||
{intl.get('确认')}
|
||||
</Button>
|
||||
</Input.Group>
|
||||
</Form.Item>
|
||||
<Form.Item label={intl.get('语言')} name="lang">
|
||||
<Select
|
||||
defaultValue={localStorage.getItem('lang') || ''}
|
||||
|
||||
Reference in New Issue
Block a user