mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Added endpoint for fetching server-side variables.
This commit is contained in:
parent
68d35c0fc4
commit
50e491af06
8 changed files with 62 additions and 15 deletions
|
|
@ -5,9 +5,11 @@ import Link from 'components/common/Link';
|
|||
import styles from './Footer.module.css';
|
||||
import useStore from 'store/version';
|
||||
import { HOMEPAGE_URL, REPO_URL } from 'lib/constants';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
|
||||
export default function Footer() {
|
||||
const { current } = useStore();
|
||||
const { telemetryDisabled } = useConfig();
|
||||
|
||||
return (
|
||||
<footer className={classNames(styles.footer, 'row')}>
|
||||
|
|
@ -28,9 +30,7 @@ export default function Footer() {
|
|||
<div className={classNames(styles.version, 'col-12 col-md-4')}>
|
||||
<Link href={REPO_URL}>{`v${current}`}</Link>
|
||||
</div>
|
||||
{!process.env.telemetryDisabled && (
|
||||
<img src={`https://i.umami.is/a.png?v=${current}`} alt="" />
|
||||
)}
|
||||
{telemetryDisabled && <img src={`https://i.umami.is/a.png?v=${current}`} alt="" />}
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import ThemeButton from 'components/settings/ThemeButton';
|
|||
import HamburgerButton from 'components/common/HamburgerButton';
|
||||
import UpdateNotice from 'components/common/UpdateNotice';
|
||||
import UserButton from 'components/settings/UserButton';
|
||||
import Logo from 'assets/logo.svg';
|
||||
import styles from './Header.module.css';
|
||||
import useUser from 'hooks/useUser';
|
||||
import { HOMEPAGE_URL } from 'lib/constants';
|
||||
import Logo from 'assets/logo.svg';
|
||||
import styles from './Header.module.css';
|
||||
|
||||
export default function Header() {
|
||||
const { user } = useUser();
|
||||
|
|
@ -19,7 +19,7 @@ export default function Header() {
|
|||
|
||||
return (
|
||||
<>
|
||||
{user?.is_admin && !process.env.updatesDisabled && <UpdateNotice />}
|
||||
<UpdateNotice />
|
||||
<header className={classNames(styles.header, 'row')}>
|
||||
<div className={styles.title}>
|
||||
<Icon icon={<Logo />} size="large" className={styles.logo} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue