mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Updated page titles.
This commit is contained in:
parent
39f630400f
commit
a7e6c32460
@ -57,7 +57,13 @@ if (process.env.TRACKER_SCRIPT_NAME) {
|
||||
}
|
||||
}
|
||||
|
||||
const redirects = [];
|
||||
const redirects = [
|
||||
{
|
||||
source: '/settings',
|
||||
destination: process.env.CLOUD_MODE ? '/settings/profile' : '/settings/websites',
|
||||
permanent: true,
|
||||
},
|
||||
];
|
||||
|
||||
if (process.env.CLOUD_MODE) {
|
||||
redirects.push({
|
||||
|
@ -9,8 +9,10 @@ export default function RealtimeDetailsPage() {
|
||||
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;
|
||||
const { data: website } = useQuery(['websites', websiteId], () =>
|
||||
get(`/websites/${websiteId}`, { enabled: !!websiteId }),
|
||||
);
|
||||
const title = `${formatMessage(labels.realtime)}${website?.name ? ` - ${website.name}` : ''}`;
|
||||
|
||||
if (!websiteId) {
|
||||
return null;
|
||||
|
@ -1,12 +0,0 @@
|
||||
export default () => null;
|
||||
|
||||
export async function getServerSideProps() {
|
||||
const dest = process.env.CLOUD_MODE ? 'profile' : 'websites';
|
||||
|
||||
return {
|
||||
redirect: {
|
||||
destination: `/settings/${dest}`,
|
||||
permanent: true,
|
||||
},
|
||||
};
|
||||
}
|
@ -6,7 +6,7 @@ import useMessages from 'hooks/useMessages';
|
||||
export default function ProfilePage() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.profile)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.profile)}`}>
|
||||
<SettingsLayout>
|
||||
<ProfileSettings />
|
||||
</SettingsLayout>
|
||||
|
@ -14,7 +14,7 @@ export default function TeamDetailPage({ disabled }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.teams)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.teams)}`}>
|
||||
<SettingsLayout>
|
||||
<TeamSettings teamId={id} />
|
||||
</SettingsLayout>
|
||||
|
@ -10,7 +10,7 @@ export default function TeamsPage({ disabled }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.teams)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.teams)}`}>
|
||||
<SettingsLayout>
|
||||
<TeamsList />
|
||||
</SettingsLayout>
|
||||
|
@ -14,7 +14,7 @@ export default function TeamDetailPage({ disabled }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.users)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.users)}`}>
|
||||
<SettingsLayout>
|
||||
<UserSettings userId={id} />
|
||||
</SettingsLayout>
|
||||
|
@ -10,7 +10,7 @@ export default function UsersPage({ disabled }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.users)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.users)}`}>
|
||||
<SettingsLayout>
|
||||
<UsersList />
|
||||
</SettingsLayout>
|
||||
|
@ -14,7 +14,7 @@ export default function WebsiteSettingsPage({ disabled }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.websites)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.websites)}`}>
|
||||
<SettingsLayout>
|
||||
<WebsiteSettings websiteId={id} />
|
||||
</SettingsLayout>
|
||||
|
@ -10,7 +10,7 @@ export default function WebsitesPage({ disabled }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.websites)}>
|
||||
<AppLayout title={`${formatMessage(labels.settings)} - ${formatMessage(labels.websites)}`}>
|
||||
<SettingsLayout>
|
||||
<WebsitesList />
|
||||
</SettingsLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user