mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +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) {
|
||||
await setNodeStatus(state.password);
|
||||
}
|
||||
console.log("CHECK1");
|
||||
await getNodeConfig(state.password);
|
||||
console.log("CHECK2");
|
||||
updateState({ busy: false });
|
||||
console.log("CHECK3");
|
||||
console.log(app);
|
||||
app.actions.setAdmin(state.password);
|
||||
console.log("DONE!");
|
||||
}
|
||||
catch(err) {
|
||||
console.log("ERROR!");
|
||||
console.log(err);
|
||||
updateState({ busy: false });
|
||||
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 { ExclamationCircleOutlined, SettingOutlined, CopyOutlined, UserAddOutlined, LogoutOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import { useDashboard } from './useDashboard.hook';
|
||||
@ -39,9 +39,9 @@ console.log("IN DASHBOARD here");
|
||||
onClick={() => actions.logout()}></SettingsButton>
|
||||
</div>
|
||||
{ state.errorMessage && (
|
||||
<div class="alert">
|
||||
<AlertIcon>
|
||||
<ExclamationCircleOutlined />
|
||||
</div>
|
||||
</AlertIcon>
|
||||
)}
|
||||
<div class="add">
|
||||
<AddButton type="text" size="large" icon={<UserAddOutlined />}
|
||||
@ -71,9 +71,9 @@ console.log("IN DASHBOARD here");
|
||||
</div>
|
||||
{ state.errorMessage && (
|
||||
<Tooltip placement="topRight" title={state.errorMessage}>
|
||||
<div class="alert">
|
||||
<AlertIcon class="alert">
|
||||
<ExclamationCircleOutlined />
|
||||
</div>
|
||||
</AlertIcon>
|
||||
</Tooltip>
|
||||
)}
|
||||
<div class="add">
|
||||
|
@ -76,6 +76,13 @@ export const SettingsButton = styled(Button)`
|
||||
color: #1890ff;
|
||||
`;
|
||||
|
||||
export const AlertIcon = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: ${Colors.alert};
|
||||
padding-left: 8px;
|
||||
`
|
||||
|
||||
export const SettingsLayout = styled(Space)`
|
||||
width: 100%;
|
||||
|
||||
|
@ -26,11 +26,8 @@ export function useDashboard() {
|
||||
accounts: [],
|
||||
});
|
||||
|
||||
console.log("HERE1");
|
||||
const navigate = useNavigate();
|
||||
console.log("HERE2");
|
||||
const app = useContext(AppContext);
|
||||
console.log("HERE4");
|
||||
|
||||
const updateState = (value) => {
|
||||
setState((s) => ({ ...s, ...value }));
|
||||
@ -127,6 +124,7 @@ console.log("HERE4");
|
||||
console.log(err);
|
||||
updateState({ errorMessage: 'failed to sync config' });
|
||||
}
|
||||
updateState({ errorMessage: 'failed to sync config' });
|
||||
};
|
||||
|
||||
const syncAccounts = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user