Updates for cloud mode.
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled

This commit is contained in:
Mike Cao 2025-09-04 20:27:42 -07:00
parent dc1736458b
commit f40e1b44f3
51 changed files with 251 additions and 173 deletions

View file

@ -2,6 +2,10 @@ import { Metadata } from 'next';
import { SettingsLayout } from './SettingsLayout';
export default function ({ children }) {
if (process.env.cloudUrl) {
return null;
}
return <SettingsLayout>{children}</SettingsLayout>;
}

View file

@ -15,7 +15,7 @@ export function DateRangeSetting() {
return (
<Row gap="3">
<DateFilter value={value} onChange={handleChange} />
<DateFilter value={value} onChange={handleChange} placement="bottom start" />
<Button onPress={handleReset}>{formatMessage(labels.reset)}</Button>
</Row>
);

View file

@ -26,7 +26,7 @@ export function LanguageSetting() {
};
return (
<Row gap="3">
<Row gap>
<Select
value={locale}
onChange={val => saveLocale(val as string)}

View file

@ -22,7 +22,7 @@ export function TimezoneSetting() {
};
return (
<Row gap="3">
<Row gap>
<Select
value={timezone}
onChange={(value: any) => saveTimezone(value)}

View file

@ -1,12 +1,12 @@
import { Row, Column, Label } from '@umami/react-zen';
import { useLoginQuery, useMessages } from '@/components/hooks';
import { useConfig, useLoginQuery, useMessages } from '@/components/hooks';
import { ROLES } from '@/lib/constants';
import { PasswordChangeButton } from './PasswordChangeButton';
export function ProfileSettings() {
const { user } = useLoginQuery();
const { formatMessage, labels } = useMessages();
const cloudMode = !!process.env.cloudMode;
const { cloudMode } = useConfig();
if (!user) {
return null;