mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Rewrite admin. (#1713)
* Rewrite admin. * Clean up password forms. * Fix naming issues. * CSS Naming.
This commit is contained in:
parent
f4db04c3c6
commit
e1f99a7d01
113 changed files with 2054 additions and 1872 deletions
|
|
@ -13,11 +13,9 @@ export default function DetailsPage() {
|
|||
return null;
|
||||
}
|
||||
|
||||
const [websiteId] = id;
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<WebsiteDetails websiteId={websiteId} />
|
||||
<WebsiteDetails websiteId={id} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
21
pages/websites/[id]/settings.js
Normal file
21
pages/websites/[id]/settings.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import WebsiteSettings from 'components/pages/WebsiteSettings';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
import Settings from 'components/pages/Settings';
|
||||
|
||||
export default function WebsiteSettingsPage() {
|
||||
const { loading } = useRequireLogin();
|
||||
const router = useRouter();
|
||||
const { id } = router.query;
|
||||
|
||||
if (!id || loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Settings>
|
||||
<WebsiteSettings websiteId={id} />
|
||||
</Settings>
|
||||
);
|
||||
}
|
||||
20
pages/websites/index.js
Normal file
20
pages/websites/index.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import Settings from 'components/pages/Settings';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
import React from 'react';
|
||||
import WebsitesList from 'components/pages/WebsitesList';
|
||||
|
||||
export default function WebsitesPage() {
|
||||
const { loading } = useRequireLogin();
|
||||
const { adminDisabled } = useConfig();
|
||||
|
||||
if (adminDisabled || loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Settings>
|
||||
<WebsitesList />
|
||||
</Settings>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue