mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
add cloud_mode
This commit is contained in:
parent
9147415761
commit
db1ae3f2c7
13 changed files with 103 additions and 25 deletions
|
|
@ -1,3 +1,11 @@
|
|||
import Index from './index';
|
||||
|
||||
export default Index;
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
settingsDisabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,26 @@ 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({ settingsDisabled }) {
|
||||
const { loading } = useRequireLogin();
|
||||
|
||||
if (loading) {
|
||||
if (settingsDisabled || loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<Layout settingsDisabled={settingsDisabled}>
|
||||
TEST TEST TEST
|
||||
{settingsDisabled}
|
||||
<Settings />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
settingsDisabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
import Index from './index';
|
||||
|
||||
export default Index;
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
settingsDisabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue