Add 'Auto Check Update' config to control whether to check for updates on start

This commit is contained in:
tk103331
2023-01-04 13:10:46 +08:00
parent c19698bc41
commit a7cd73b314
6 changed files with 38 additions and 13 deletions

11
src/view/General.tsx vendored
View File

@@ -10,6 +10,14 @@ import { clone, omit, isEqual } from 'lodash';
import useInit from '@/hooks/useInit';
import { DISABLE_AUTO_COMPLETE, chatRoot } from '@/utils';
const CheckUpdateLabel = () => {
return (
<span>
Auto Check Update <Tooltip title={`check update on start`}><QuestionCircleOutlined style={{ color: '#1677ff' }} /></Tooltip>
</span>
)
}
const OriginLabel = ({ url }: { url: string }) => {
return (
<span>
@@ -108,6 +116,9 @@ export default function General() {
<Form.Item label="Stay On Top" name="stay_on_top" valuePropName="checked">
<Switch />
</Form.Item>
<Form.Item label={<CheckUpdateLabel />} name="auto_check_update" valuePropName="checked">
<Switch />
</Form.Item>
<Form.Item label={<GlobalShortcut />} name="global_shortcut">
<Input placeholder="CmdOrCtrl+Shift+O" {...DISABLE_AUTO_COMPLETE} />
</Form.Item>