|
1 | 1 | import React from 'react';
|
2 | 2 | import NeoPage from '../page/Page';
|
3 |
| -import { Container } from '@mui/material'; |
4 | 3 | import NeoDrawer from './drawer/DashboardDrawer';
|
5 | 4 | import NeoDashboardHeader from './header/DashboardHeader';
|
| 5 | +import NeoDashboardTitle from './header/DashboardTitle'; |
| 6 | +import { NeoDashboardHeaderPageList } from './header/DashboardHeaderPageList'; |
6 | 7 | import { createDriver, Neo4jProvider } from 'use-neo4j';
|
7 | 8 | import { applicationGetConnection, applicationGetStandaloneSettings } from '../application/ApplicationSelectors';
|
8 | 9 | import { connect } from 'react-redux';
|
9 | 10 | import NeoDashboardConnectionUpdateHandler from '../component/misc/DashboardConnectionUpdateHandler';
|
10 | 11 | import { forceRefreshPage } from '../page/PageActions';
|
11 | 12 | import { getPageNumber } from '../settings/SettingsSelectors';
|
12 | 13 | import { createNotificationThunk } from '../page/PageThunks';
|
| 14 | +import { TabPanel } from '@neo4j-ndl/react'; |
13 | 15 |
|
14 | 16 | const Dashboard = ({ pagenumber, connection, applicationSettings, onConnectionUpdate, onDownloadDashboardAsImage }) => {
|
15 | 17 | const [drawerOpen, setDrawerOpen] = React.useState(false);
|
@@ -57,16 +59,80 @@ const Dashboard = ({ pagenumber, connection, applicationSettings, onConnectionUp
|
57 | 59 |
|
58 | 60 | {/* Main Content */}
|
59 | 61 | <main className='n-flex-1 n-relative n-z-0 n-overflow-y-auto n-scroll-smooth n-w-full'>
|
60 |
| - <div className='n-absolute n-inset-0'> |
61 |
| - {/* The main content of the page */} |
62 |
| - {applicationSettings.standalonePassword ? ( |
63 |
| - <div style={{ textAlign: 'center', color: 'red', paddingTop: 60, marginBottom: -50 }}> |
64 |
| - Warning: NeoDash is running with a plaintext password in config.json. |
65 |
| - </div> |
66 |
| - ) : ( |
67 |
| - <></> |
68 |
| - )} |
69 |
| - <NeoPage></NeoPage> |
| 62 | + <div className='n-absolute n-inset-0 page-spacing'> |
| 63 | + <div className='page-spacing-overflow'> |
| 64 | + {/* The main content of the page */} |
| 65 | + {applicationSettings.standalonePassword ? ( |
| 66 | + <div style={{ textAlign: 'center', color: 'red', paddingTop: 60, marginBottom: -50 }}> |
| 67 | + Warning: NeoDash is running with a plaintext password in config.json. |
| 68 | + </div> |
| 69 | + ) : ( |
| 70 | + <></> |
| 71 | + )} |
| 72 | + <NeoDashboardTitle /> |
| 73 | + <NeoDashboardHeaderPageList /> |
| 74 | + {/* <div className='n-flex n-flex-row n-w-full'> |
| 75 | + <Tabs fill='underline' onChange={function Xa() {}} value={0}> |
| 76 | + <Tab tabId={0}> |
| 77 | + Main Page{' '} |
| 78 | + <IconButton |
| 79 | + id='tab-0-menu' |
| 80 | + className='n-relative n-top-1 visible-on-tab-hover' |
| 81 | + style={{ height: '1.1rem' }} |
| 82 | + onClick={handleMenuClick} |
| 83 | + size='small' |
| 84 | + clean |
| 85 | + > |
| 86 | + <EllipsisHorizontalIconOutline /> |
| 87 | + </IconButton> |
| 88 | + <Menu anchorEl={anchorEl} open={menuOpen} onClose={handleMenuClose}> |
| 89 | + <MenuItems> |
| 90 | + <MenuItem icon={<PencilIconOutline />} onClick={function Xa() {}} title='Edit name' /> |
| 91 | + <MenuItem |
| 92 | + className='n-text-palette-danger-text' |
| 93 | + icon={<TrashIconOutline />} |
| 94 | + onClick={function Xa() {}} |
| 95 | + title='Delete' |
| 96 | + /> |
| 97 | + </MenuItems> |
| 98 | + </Menu> |
| 99 | + </Tab> |
| 100 | + <Tab tabId={1}> |
| 101 | + Second page{' '} |
| 102 | + <IconButton |
| 103 | + id='tab-1-menu' |
| 104 | + className='n-relative n-top-1 visible-on-tab-hover' |
| 105 | + style={{ height: '1.1rem' }} |
| 106 | + onClick={handleMenuClick} |
| 107 | + size='small' |
| 108 | + clean |
| 109 | + > |
| 110 | + <EllipsisHorizontalIconOutline /> |
| 111 | + </IconButton> |
| 112 | + <Menu anchorEl={anchorEl} open={menuOpen} onClose={handleMenuClose}> |
| 113 | + <MenuItems> |
| 114 | + <MenuItem icon={<PencilIconOutline />} onClick={function Xa() {}} title='Edit name' /> |
| 115 | + <MenuItem |
| 116 | + className='n-text-palette-danger-text' |
| 117 | + icon={<TrashIconOutline className='n-text-palette-danger-text' />} |
| 118 | + onClick={function Xa() {}} |
| 119 | + title='Delete' |
| 120 | + /> |
| 121 | + </MenuItems> |
| 122 | + </Menu> |
| 123 | + </Tab> |
| 124 | + </Tabs> |
| 125 | + <IconButton className='n-relative -n-top-1' size='large' clean> |
| 126 | + <PlusIconOutline /> |
| 127 | + </IconButton> |
| 128 | + </div> */} |
| 129 | + <TabPanel className='n-flex-1 n-min-h-0 n-flex n-flex-col' tabId={0} value={0}> |
| 130 | + <NeoPage></NeoPage> |
| 131 | + </TabPanel> |
| 132 | + <TabPanel className='n-flex-1 n-min-h-0 n-flex n-flex-col' tabId={1} value={0}> |
| 133 | + <div>John Cena</div> |
| 134 | + </TabPanel> |
| 135 | + </div> |
70 | 136 | </div>
|
71 | 137 | </main>
|
72 | 138 | </div>
|
|
0 commit comments