add api host setting

This commit is contained in:
josc146
2023-05-24 22:03:30 +08:00
parent 03a494e1f1
commit f439b3d382
8 changed files with 25 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { Page } from '../components/Page';
import { Dropdown, Option, Switch } from '@fluentui/react-components';
import { Dropdown, Input, Option, Switch } from '@fluentui/react-components';
import { Labeled } from '../components/Labeled';
import commonStore from '../stores/commonStore';
import { observer } from 'mobx-react-lite';
@@ -20,6 +20,7 @@ export type SettingsType = {
autoUpdatesCheck: boolean
giteeUpdatesSource: boolean
cnMirror: boolean
host: string
}
export const Settings: FC = observer(() => {
@@ -87,6 +88,14 @@ export const Settings: FC = observer(() => {
}} />
} />
}
<Labeled label={t('API Host')} flex spaceBetween content={
<Input value={commonStore.settings.host}
onChange={(e, data) => {
commonStore.setSettings({
host: data.value
});
}} />
} />
</div>
} />
);