mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
add DISABLE_UI, DISABLE_ADMIN
This commit is contained in:
parent
736f06442c
commit
99c975c329
13 changed files with 94 additions and 20 deletions
|
|
@ -1,3 +1,11 @@
|
|||
import Index from './index';
|
||||
|
||||
export default Index;
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
pageDisabled: !!process.env.DISABLE_UI,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import Layout from 'components/layout/Layout';
|
|||
import Settings from 'components/pages/Settings';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
|
||||
export default function SettingsPage() {
|
||||
export default function SettingsPage({ pageDisabled }) {
|
||||
const { loading } = useRequireLogin();
|
||||
|
||||
if (process.env.isCloudMode || loading) {
|
||||
if (pageDisabled || loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -16,3 +16,11 @@ export default function SettingsPage() {
|
|||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
pageDisabled: !!process.env.DISABLE_UI || !!process.env.isAdminDisabled,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
import Index from './index';
|
||||
|
||||
export default Index;
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
pageDisabled: !!process.env.DISABLE_UI,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue