mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
WIP Frontend development.
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import React from 'react';
|
||||
import {Route} from 'react-router-dom';
|
||||
import Sidebar from 'components/Sidebar/Sidebar';
|
||||
import DashboardContent from 'components/Dashboard/DashboardContent';
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
<div className="dashboard" id="dashboard">
|
||||
<Route pathname="/dashboard/">
|
||||
<Sidebar />
|
||||
<DashboardContent />
|
||||
</Route>
|
||||
<Sidebar />
|
||||
<DashboardContent />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
10
client/src/components/Dashboard/DashboardActionsBar.js
Normal file
10
client/src/components/Dashboard/DashboardActionsBar.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
|
||||
|
||||
export default function DashboardActionsBar() {
|
||||
return (
|
||||
<div class="dashboard__actions-bar">
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,11 +1,25 @@
|
||||
import React from 'react';
|
||||
import { Route, Switch } from 'react-router-dom';
|
||||
import dashboardRoutes from 'routes/dashboard'
|
||||
import DashboardTopbar from 'components/Dashboard/DashboardTopbar';
|
||||
|
||||
export default function() {
|
||||
return (
|
||||
<div className="dashboard-content" id="dashboard">
|
||||
<h2>dashboard</h2>
|
||||
<DashboardTopbar pageTitle={"asdad"}/>
|
||||
|
||||
<Route pathname="/dashboard/">
|
||||
<Switch>
|
||||
{ dashboardRoutes.map((route, index) => (
|
||||
<Route
|
||||
key={index}
|
||||
path={route.path}
|
||||
exact={route.exact}
|
||||
component={route.component}
|
||||
/>
|
||||
))}
|
||||
</Switch>
|
||||
</Route>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
9
client/src/components/Dashboard/DashboardPageContent.js
Normal file
9
client/src/components/Dashboard/DashboardPageContent.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function DashboardPageContent({ children }) {
|
||||
return (
|
||||
<div class="dashboard__page-content">
|
||||
{ children }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
46
client/src/components/Dashboard/DashboardTopbar.js
Normal file
46
client/src/components/Dashboard/DashboardTopbar.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
Navbar,
|
||||
NavbarGroup,
|
||||
Button,
|
||||
Classes,
|
||||
MenuDivider,
|
||||
MenuItem,
|
||||
Menu,
|
||||
Popover,
|
||||
} from '@blueprintjs/core';
|
||||
|
||||
export default function DashboardTopbar({ pageTitle }) {
|
||||
const userAvatarDropMenu = (
|
||||
<Menu>
|
||||
<MenuItem icon="graph" text="Graph" />
|
||||
<MenuItem icon="map" text="Map" />
|
||||
<MenuItem icon="th" text="Table" shouldDismissPopover={false} />
|
||||
<MenuItem icon="zoom-to-fit" text="Nucleus" disabled={true} />
|
||||
<MenuDivider />
|
||||
<MenuItem icon="cog" text="Logout" />
|
||||
</Menu>
|
||||
);
|
||||
return (
|
||||
<div class="dashboard__topbar">
|
||||
<h1 class="dashboard__title">{ pageTitle }</h1>
|
||||
|
||||
<div class="dashboard__topbar-actions">
|
||||
<Navbar class="dashboard__topbar-navbar">
|
||||
<NavbarGroup>
|
||||
<Button className={Classes.MINIMAL} icon="home" text="Home" />
|
||||
<Button className={Classes.MINIMAL} icon="document" text="Files" />
|
||||
</NavbarGroup>
|
||||
</Navbar>
|
||||
|
||||
<div class="dashboard__user">
|
||||
<Popover content={userAvatarDropMenu}>
|
||||
<Button>
|
||||
<div className="user-avatar"></div>
|
||||
</Button>
|
||||
</Popover>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user