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 { 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 { SettingOutlined, CopyOutlined, UserAddOutlined, LogoutOutlined, ReloadOutlined } from '@ant-design/icons';
import { useDashboard } from './useDashboard.hook'; import { useDashboard } from './useDashboard.hook';
import { AccountItem } from './accountItem/AccountItem'; import { AccountItem } from './accountItem/AccountItem';
@ -82,16 +82,19 @@ export function Dashboard({ token, config, logout }) {
</Select> </Select>
</div> </div>
<div class="field"> <div class="field">
<Checkbox onChange={(e) => actions.setEnableImage(e.target.checked)} <div>Enable Image Queue:&nbsp;</div>
defaultChecked={true} checked={state.enableImage}>Enable Image Queue</Checkbox> <Switch onChange={(e) => actions.setEnableImage(e)} size="small"
defaultChecked={true} checked={state.enableImage} />
</div> </div>
<div class="field"> <div class="field">
<Checkbox onChange={(e) => actions.setEnableAudio(e.target.checked)} <div>Enable Audio Queue:&nbsp;</div>
defaultChecked={true} checked={state.enableAudio}>Enable Audio Queue</Checkbox> <Switch onChange={(e) => actions.setEnableAudio(e)} size="small"
defaultChecked={true} checked={state.enableAudio} />
</div> </div>
<div class="field"> <div class="field">
<Checkbox onChange={(e) => actions.setEnableVideo(e.target.checked)} <div>Enable Video Queue:&nbsp;</div>
defaultChecked={true} checked={state.enableVideo}>Enable Video Queue</Checkbox> <Switch onChange={(e) => actions.setEnableVideo(e)} size="small"
defaultChecked={true} checked={state.enableVideo} />
</div> </div>
</SettingsLayout> </SettingsLayout>
</Modal> </Modal>

View File

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