mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Refactored website components. New layout.
This commit is contained in:
parent
6e41ba2e2c
commit
06f76dda13
35 changed files with 1159 additions and 987 deletions
|
|
@ -1,11 +1,10 @@
|
|||
'use client';
|
||||
import { Grid, Loading, Column } from '@umami/react-zen';
|
||||
import { Grid, Loading, Column, Row } from '@umami/react-zen';
|
||||
import Script from 'next/script';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { UpdateNotice } from './UpdateNotice';
|
||||
import { SideNav } from '@/app/(main)/SideNav';
|
||||
import { MenuBar } from '@/app/(main)/MenuBar';
|
||||
import { Page } from '@/components/common/Page';
|
||||
import { useLoginQuery, useConfig } from '@/components/hooks';
|
||||
|
||||
export function App({ children }) {
|
||||
|
|
@ -31,25 +30,26 @@ export function App({ children }) {
|
|||
}
|
||||
|
||||
return (
|
||||
<Grid height="100vh" width="100%" columns="auto 1fr" rows="auto 1fr">
|
||||
<SideNav gridColumn="1 / 2" gridRow="1 / 3" />
|
||||
<MenuBar gridColumn="2 / 3" gridRow="1 / 2" />
|
||||
<Grid height="100vh" width="100%" columns="auto 1fr" rows="auto 1fr" backgroundColor="2">
|
||||
<Column gridColumn="1 / 2" gridRow="1 / 3" backgroundColor>
|
||||
<SideNav />
|
||||
</Column>
|
||||
<Row gridColumn="2 / 3" gridRow="1 / 2">
|
||||
<MenuBar />
|
||||
</Row>
|
||||
<Column
|
||||
gridColumn="2 / 3"
|
||||
gridRow="2 / 3"
|
||||
alignItems="center"
|
||||
overflow="auto"
|
||||
backgroundColor="2"
|
||||
position="relative"
|
||||
>
|
||||
<Page>
|
||||
{children}
|
||||
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
|
||||
<Script src={`${process.env.basePath || ''}/telemetry.js`} />
|
||||
)}
|
||||
</Page>
|
||||
{children}
|
||||
</Column>
|
||||
<UpdateNotice user={user} config={config} />
|
||||
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
|
||||
<Script src={`${process.env.basePath || ''}/telemetry.js`} />
|
||||
)}
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue