-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/umami-software/umami into fe…
…at/um-290-update-clickhouse-client
- Loading branch information
Showing
325 changed files
with
2,859 additions
and
3,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
/// <reference types="next/navigation-types/compat/navigation" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
'use client'; | ||
import { Icon, Text } from 'react-basics'; | ||
import Link from 'next/link'; | ||
import classNames from 'classnames'; | ||
import Icons from 'components/icons'; | ||
import ThemeButton from 'components/input/ThemeButton'; | ||
import LanguageButton from 'components/input/LanguageButton'; | ||
import ProfileButton from 'components/input/ProfileButton'; | ||
import useMessages from 'components/hooks/useMessages'; | ||
import HamburgerButton from 'components/common/HamburgerButton'; | ||
import { usePathname } from 'next/navigation'; | ||
import styles from './NavBar.module.css'; | ||
|
||
export function NavBar() { | ||
const pathname = usePathname(); | ||
const { formatMessage, labels } = useMessages(); | ||
|
||
const links = [ | ||
{ label: formatMessage(labels.dashboard), url: '/dashboard' }, | ||
{ label: formatMessage(labels.websites), url: '/websites' }, | ||
{ label: formatMessage(labels.reports), url: '/reports' }, | ||
{ label: formatMessage(labels.settings), url: '/settings' }, | ||
].filter(n => n); | ||
|
||
return ( | ||
<div className={styles.navbar}> | ||
<div className={styles.logo}> | ||
<Icon size="lg"> | ||
<Icons.Logo /> | ||
</Icon> | ||
<Text>umami</Text> | ||
</div> | ||
<div className={styles.links}> | ||
{links.map(({ url, label }) => { | ||
return ( | ||
<Link | ||
key={url} | ||
href={url} | ||
className={classNames({ [styles.selected]: pathname.startsWith(url) })} | ||
> | ||
<Text>{label}</Text> | ||
</Link> | ||
); | ||
})} | ||
</div> | ||
<div className={styles.actions}> | ||
<ThemeButton /> | ||
<LanguageButton /> | ||
<ProfileButton /> | ||
</div> | ||
<div className={styles.mobile}> | ||
<HamburgerButton /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default NavBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use client'; | ||
import Script from 'next/script'; | ||
import { usePathname } from 'next/navigation'; | ||
import UpdateNotice from 'components/common/UpdateNotice'; | ||
import { useRequireLogin, useConfig } from 'components/hooks'; | ||
|
||
export function Shell({ children }) { | ||
const { user } = useRequireLogin(); | ||
const config = useConfig(); | ||
const pathname = usePathname(); | ||
|
||
if (!user || !config) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<> | ||
{children} | ||
<UpdateNotice user={user} config={config} /> | ||
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && ( | ||
<Script src={`telemetry.js`} /> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default Shell; |
5 changes: 3 additions & 2 deletions
5
src/components/pages/console/TestConsole.js → src/app/(app)/console/TestConsole.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import TestConsole from '../TestConsole'; | ||
import { Metadata } from 'next'; | ||
|
||
async function getEnabled() { | ||
return !!process.env.ENABLE_TEST_CONSOLE; | ||
} | ||
|
||
export default async function ConsolePage() { | ||
const enabled = await getEnabled(); | ||
|
||
if (!enabled) { | ||
return null; | ||
} | ||
|
||
return <TestConsole />; | ||
} | ||
|
||
export const metadata: Metadata = { | ||
title: 'Test Console | umami', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.