mirror of
https://github.com/balzack/databag.git
synced 2025-04-26 11:35:19 +00:00
adjusting dashboard icon layout
This commit is contained in:
parent
9bfbcc56f6
commit
25c8e64a95
@ -54,17 +54,11 @@ export function useAdmin() {
|
|||||||
if (state.unclaimed === true) {
|
if (state.unclaimed === true) {
|
||||||
await setNodeStatus(state.password);
|
await setNodeStatus(state.password);
|
||||||
}
|
}
|
||||||
console.log("CHECK1");
|
|
||||||
await getNodeConfig(state.password);
|
await getNodeConfig(state.password);
|
||||||
console.log("CHECK2");
|
|
||||||
updateState({ busy: false });
|
updateState({ busy: false });
|
||||||
console.log("CHECK3");
|
|
||||||
console.log(app);
|
|
||||||
app.actions.setAdmin(state.password);
|
app.actions.setAdmin(state.password);
|
||||||
console.log("DONE!");
|
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
console.log("ERROR!");
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
updateState({ busy: false });
|
updateState({ busy: false });
|
||||||
throw new Error("login failed");
|
throw new Error("login failed");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { DashboardWrapper, SettingsButton, AddButton, SettingsLayout, CreateLayout } from './Dashboard.styled';
|
import { AlertIcon, DashboardWrapper, SettingsButton, AddButton, SettingsLayout, CreateLayout } from './Dashboard.styled';
|
||||||
import { Tooltip, Switch, Select, Button, Modal, Input, InputNumber, List } from 'antd';
|
import { Tooltip, Switch, Select, Button, Modal, Input, InputNumber, List } from 'antd';
|
||||||
import { ExclamationCircleOutlined, SettingOutlined, CopyOutlined, UserAddOutlined, LogoutOutlined, ReloadOutlined } from '@ant-design/icons';
|
import { ExclamationCircleOutlined, SettingOutlined, CopyOutlined, UserAddOutlined, LogoutOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||||
import { useDashboard } from './useDashboard.hook';
|
import { useDashboard } from './useDashboard.hook';
|
||||||
@ -39,9 +39,9 @@ console.log("IN DASHBOARD here");
|
|||||||
onClick={() => actions.logout()}></SettingsButton>
|
onClick={() => actions.logout()}></SettingsButton>
|
||||||
</div>
|
</div>
|
||||||
{ state.errorMessage && (
|
{ state.errorMessage && (
|
||||||
<div class="alert">
|
<AlertIcon>
|
||||||
<ExclamationCircleOutlined />
|
<ExclamationCircleOutlined />
|
||||||
</div>
|
</AlertIcon>
|
||||||
)}
|
)}
|
||||||
<div class="add">
|
<div class="add">
|
||||||
<AddButton type="text" size="large" icon={<UserAddOutlined />}
|
<AddButton type="text" size="large" icon={<UserAddOutlined />}
|
||||||
@ -71,9 +71,9 @@ console.log("IN DASHBOARD here");
|
|||||||
</div>
|
</div>
|
||||||
{ state.errorMessage && (
|
{ state.errorMessage && (
|
||||||
<Tooltip placement="topRight" title={state.errorMessage}>
|
<Tooltip placement="topRight" title={state.errorMessage}>
|
||||||
<div class="alert">
|
<AlertIcon class="alert">
|
||||||
<ExclamationCircleOutlined />
|
<ExclamationCircleOutlined />
|
||||||
</div>
|
</AlertIcon>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<div class="add">
|
<div class="add">
|
||||||
|
@ -76,6 +76,13 @@ export const SettingsButton = styled(Button)`
|
|||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const AlertIcon = styled.div`
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: ${Colors.alert};
|
||||||
|
padding-left: 8px;
|
||||||
|
`
|
||||||
|
|
||||||
export const SettingsLayout = styled(Space)`
|
export const SettingsLayout = styled(Space)`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@ -26,11 +26,8 @@ export function useDashboard() {
|
|||||||
accounts: [],
|
accounts: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("HERE1");
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
console.log("HERE2");
|
|
||||||
const app = useContext(AppContext);
|
const app = useContext(AppContext);
|
||||||
console.log("HERE4");
|
|
||||||
|
|
||||||
const updateState = (value) => {
|
const updateState = (value) => {
|
||||||
setState((s) => ({ ...s, ...value }));
|
setState((s) => ({ ...s, ...value }));
|
||||||
@ -127,6 +124,7 @@ console.log("HERE4");
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
updateState({ errorMessage: 'failed to sync config' });
|
updateState({ errorMessage: 'failed to sync config' });
|
||||||
}
|
}
|
||||||
|
updateState({ errorMessage: 'failed to sync config' });
|
||||||
};
|
};
|
||||||
|
|
||||||
const syncAccounts = async () => {
|
const syncAccounts = async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user