mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Updated date range handling. Fixed share page.
This commit is contained in:
parent
3fc5f5151b
commit
696d9c978c
28 changed files with 166 additions and 280 deletions
|
|
@ -9,7 +9,7 @@ import 'styles/variables.css';
|
|||
import 'styles/locale.css';
|
||||
import 'styles/index.css';
|
||||
import '@fontsource/inter/400.css';
|
||||
import '@fontsource/inter/600.css';
|
||||
import '@fontsource/inter/700.css';
|
||||
import Script from 'next/script';
|
||||
|
||||
const client = new QueryClient({
|
||||
|
|
@ -24,11 +24,11 @@ const client = new QueryClient({
|
|||
export default function App({ Component, pageProps }) {
|
||||
const { locale, messages } = useLocale();
|
||||
const { basePath, pathname } = useRouter();
|
||||
useConfig();
|
||||
const config = useConfig();
|
||||
|
||||
const Wrapper = ({ children }) => <span className={locale}>{children}</span>;
|
||||
|
||||
if (process.env.uiDisabled) {
|
||||
if (!config || config.uiDisabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ export interface ConfigResponse {
|
|||
trackerScriptName: string;
|
||||
updatesDisabled: boolean;
|
||||
telemetryDisabled: boolean;
|
||||
adminDisabled: boolean;
|
||||
cloudMode: boolean;
|
||||
}
|
||||
|
||||
|
|
@ -17,8 +16,7 @@ export default async (req: NextApiRequest, res: NextApiResponse<ConfigResponse>)
|
|||
trackerScriptName: process.env.TRACKER_SCRIPT_NAME,
|
||||
updatesDisabled: !!process.env.DISABLE_UPDATES,
|
||||
telemetryDisabled: !!process.env.DISABLE_TELEMETRY,
|
||||
adminDisabled: !!process.env.DISABLE_ADMIN,
|
||||
cloudMode: process.env.CLOUD_MODE,
|
||||
cloudMode: !!process.env.CLOUD_MODE,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default function LoginPage({ disabled }) {
|
|||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!(process.env.DISABLE_LOGIN || process.env.CLOUD_MODE),
|
||||
disabled: !!process.env.DISABLE_LOGIN,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
export default () => null;
|
||||
|
||||
export async function getServerSideProps() {
|
||||
const destination = process.env.CLOUD_MODE ? 'https://cloud.umami.is' : '/settings/websites';
|
||||
|
||||
return {
|
||||
redirect: {
|
||||
destination,
|
||||
destination: '/settings/websites',
|
||||
permanent: true,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue