mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
auto update policy
This commit is contained in:
2
src/layout/index.tsx
vendored
2
src/layout/index.tsx
vendored
@@ -23,7 +23,7 @@ const ChatLayout: FC<ChatLayoutProps> = ({ children }) => {
|
||||
const go = useNavigate();
|
||||
|
||||
const checkAppUpdate = async () => {
|
||||
await invoke('run_check_update');
|
||||
await invoke('run_check_update', {silent: false});
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
19
src/view/General.tsx
vendored
19
src/view/General.tsx
vendored
@@ -10,10 +10,17 @@ import { clone, omit, isEqual } from 'lodash';
|
||||
import useInit from '@/hooks/useInit';
|
||||
import { DISABLE_AUTO_COMPLETE, chatRoot } from '@/utils';
|
||||
|
||||
const CheckUpdateLabel = () => {
|
||||
const AutoUpdateLabel = () => {
|
||||
return (
|
||||
<span>
|
||||
Auto Check Update <Tooltip title={`check update on start`}><QuestionCircleOutlined style={{ color: '#1677ff' }} /></Tooltip>
|
||||
Auto Update <Tooltip title={(
|
||||
<div>
|
||||
<div>Auto Update Policy</div>
|
||||
<span><strong>Prompt</strong>: prompt to install</span><br/>
|
||||
<span><strong>Silent</strong>: install silently</span><br/>
|
||||
{/*<span><strong>Disable</strong>: disable auto update</span><br/>*/}
|
||||
</div>
|
||||
)}><QuestionCircleOutlined style={{ color: '#1677ff' }} /></Tooltip>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -121,8 +128,12 @@ 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 label={<AutoUpdateLabel />} name="auto_update">
|
||||
<Radio.Group>
|
||||
<Radio value="Prompt">Prompt</Radio>
|
||||
<Radio value="Silent">Silent</Radio>
|
||||
{/*<Radio value="Disable">Disable</Radio>*/}
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
<Form.Item label={<GlobalShortcut />} name="global_shortcut">
|
||||
<Input placeholder="CmdOrCtrl+Shift+O" {...DISABLE_AUTO_COMPLETE} />
|
||||
|
||||
Reference in New Issue
Block a user