fixing admin login bug

This commit is contained in:
Roland Osborne 2022-09-02 12:02:58 -07:00
parent e550cf4d2b
commit fba1a2e691
2 changed files with 12 additions and 8 deletions

View File

@ -1,5 +1,5 @@
import { DashboardWrapper, SettingsButton, AddButton, SettingsLayout, CreateLayout } from './Dashboard.styled';
import { Tooltip, Checkbox, Select, Button, Modal, Input, InputNumber, List } from 'antd';
import { Tooltip, Switch, Select, Button, Modal, Input, InputNumber, List } from 'antd';
import { SettingOutlined, CopyOutlined, UserAddOutlined, LogoutOutlined, ReloadOutlined } from '@ant-design/icons';
import { useDashboard } from './useDashboard.hook';
import { AccountItem } from './accountItem/AccountItem';
@ -82,16 +82,19 @@ export function Dashboard({ token, config, logout }) {
</Select>
</div>
<div class="field">
<Checkbox onChange={(e) => actions.setEnableImage(e.target.checked)}
defaultChecked={true} checked={state.enableImage}>Enable Image Queue</Checkbox>
<div>Enable Image Queue:&nbsp;</div>
<Switch onChange={(e) => actions.setEnableImage(e)} size="small"
defaultChecked={true} checked={state.enableImage} />
</div>
<div class="field">
<Checkbox onChange={(e) => actions.setEnableAudio(e.target.checked)}
defaultChecked={true} checked={state.enableAudio}>Enable Audio Queue</Checkbox>
<div>Enable Audio Queue:&nbsp;</div>
<Switch onChange={(e) => actions.setEnableAudio(e)} size="small"
defaultChecked={true} checked={state.enableAudio} />
</div>
<div class="field">
<Checkbox onChange={(e) => actions.setEnableVideo(e.target.checked)}
defaultChecked={true} checked={state.enableVideo}>Enable Video Queue</Checkbox>
<div>Enable Video Queue:&nbsp;</div>
<Switch onChange={(e) => actions.setEnableVideo(e)} size="small"
defaultChecked={true} checked={state.enableVideo} />
</div>
</SettingsLayout>
</Modal>

View File

@ -50,8 +50,9 @@ export function usePrompt() {
if (state.unclaimed === true) {
await setNodeStatus(state.password);
}
await getNodeConfig(state.password);
const config = await getNodeConfig(state.password);
updateState({ busy: false });
return config;
}
catch (err) {
console.log(err);