mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
add page titles
This commit is contained in:
parent
b39ef68372
commit
3039ad9315
@ -6,7 +6,7 @@ export default function Custom404() {
|
|||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.pageNotFound)}>
|
||||||
<Row>
|
<Row>
|
||||||
<Column>
|
<Column>
|
||||||
<Flexbox alignItems="center" justifyContent="center" flex={1} style={{ minHeight: 600 }}>
|
<Flexbox alignItems="center" justifyContent="center" flex={1} style={{ minHeight: 600 }}>
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import Dashboard from 'components/pages/dashboard/Dashboard';
|
import Dashboard from 'components/pages/dashboard/Dashboard';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function DashboardPage() {
|
export default function DashboardPage() {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.dashboard)}>
|
||||||
<Dashboard />
|
<Dashboard />
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
@ -1,17 +1,23 @@
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import RealtimeDashboard from 'components/pages/realtime/RealtimeDashboard';
|
import RealtimeDashboard from 'components/pages/realtime/RealtimeDashboard';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
import useApi from 'hooks/useApi';
|
||||||
|
|
||||||
export default function RealtimeDetailsPage() {
|
export default function RealtimeDetailsPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { id: websiteId } = router.query;
|
const { id: websiteId } = router.query;
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
|
const { get, useQuery } = useApi();
|
||||||
|
const { data: website } = useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`));
|
||||||
|
const title = formatMessage(labels.realtime) + ' | ' + website?.name;
|
||||||
|
|
||||||
if (!websiteId) {
|
if (!websiteId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={title}>
|
||||||
<RealtimeDashboard key={websiteId} websiteId={websiteId} />
|
<RealtimeDashboard key={websiteId} websiteId={websiteId} />
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import RealtimeHome from 'components/pages/realtime/RealtimeHome';
|
import RealtimeHome from 'components/pages/realtime/RealtimeHome';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function RealtimePage() {
|
export default function RealtimePage() {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.realtime)}>
|
||||||
<RealtimeHome />
|
<RealtimeHome />
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
import ProfileSettings from 'components/pages/settings/profile/ProfileSettings';
|
import ProfileSettings from 'components/pages/settings/profile/ProfileSettings';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function ProfilePage() {
|
export default function ProfilePage() {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.profile)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<ProfileSettings />
|
<ProfileSettings />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -2,17 +2,19 @@ import AppLayout from 'components/layout/AppLayout';
|
|||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
import TeamSettings from 'components/pages/settings/teams/TeamSettings';
|
import TeamSettings from 'components/pages/settings/teams/TeamSettings';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function TeamDetailPage({ disabled }) {
|
export default function TeamDetailPage({ disabled }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { id } = router.query;
|
const { id } = router.query;
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
if (!id || disabled) {
|
if (!id || disabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.teams)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<TeamSettings teamId={id} />
|
<TeamSettings teamId={id} />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
import TeamsList from 'components/pages/settings/teams/TeamsList';
|
import TeamsList from 'components/pages/settings/teams/TeamsList';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function TeamsPage({ disabled }) {
|
export default function TeamsPage({ disabled }) {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.teams)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<TeamsList />
|
<TeamsList />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -2,17 +2,19 @@ import AppLayout from 'components/layout/AppLayout';
|
|||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
import UserSettings from 'components/pages/settings/users/UserSettings';
|
import UserSettings from 'components/pages/settings/users/UserSettings';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function TeamDetailPage({ disabled }) {
|
export default function TeamDetailPage({ disabled }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { id } = router.query;
|
const { id } = router.query;
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
if (!id || disabled) {
|
if (!id || disabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.users)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<UserSettings userId={id} />
|
<UserSettings userId={id} />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
import UsersList from 'components/pages/settings/users/UsersList';
|
import UsersList from 'components/pages/settings/users/UsersList';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function UsersPage({ disabled }) {
|
export default function UsersPage({ disabled }) {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.users)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<UsersList />
|
<UsersList />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -2,17 +2,19 @@ import AppLayout from 'components/layout/AppLayout';
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import WebsiteSettings from 'components/pages/settings/websites/WebsiteSettings';
|
import WebsiteSettings from 'components/pages/settings/websites/WebsiteSettings';
|
||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function WebsiteSettingsPage({ disabled }) {
|
export default function WebsiteSettingsPage({ disabled }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { id } = router.query;
|
const { id } = router.query;
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
if (!id || disabled) {
|
if (!id || disabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.websites)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<WebsiteSettings websiteId={id} />
|
<WebsiteSettings websiteId={id} />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import SettingsLayout from 'components/layout/SettingsLayout';
|
import SettingsLayout from 'components/layout/SettingsLayout';
|
||||||
import WebsitesList from 'components/pages/settings/websites/WebsitesList';
|
import WebsitesList from 'components/pages/settings/websites/WebsitesList';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function WebsitesPage({ disabled }) {
|
export default function WebsitesPage({ disabled }) {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.websites)}>
|
||||||
<SettingsLayout>
|
<SettingsLayout>
|
||||||
<WebsitesList />
|
<WebsitesList />
|
||||||
</SettingsLayout>
|
</SettingsLayout>
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import AppLayout from 'components/layout/AppLayout';
|
import AppLayout from 'components/layout/AppLayout';
|
||||||
import WebsiteDetails from 'components/pages/websites/WebsiteDetails';
|
import WebsiteDetails from 'components/pages/websites/WebsiteDetails';
|
||||||
|
import useMessages from 'hooks/useMessages';
|
||||||
|
|
||||||
export default function DetailsPage() {
|
export default function DetailsPage() {
|
||||||
|
const { formatMessage, labels } = useMessages();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { id } = router.query;
|
const { id } = router.query;
|
||||||
|
|
||||||
@ -11,7 +13,7 @@ export default function DetailsPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLayout>
|
<AppLayout title={formatMessage(labels.websites)}>
|
||||||
<WebsiteDetails websiteId={id} />
|
<WebsiteDetails websiteId={id} />
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user