Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Export preference components. Updates for cloud.

Mike Cao0ae5c28da718
diff --git a/package.components.json b/package.components.json
index 8dda25887..ba951df99 100644
--- a/package.components.json
+++ b/package.components.json
@@ -1,6 +1,6 @@
{
"name": "@umami/components",
- "version": "0.123.0",
+ "version": "0.125.0",
"description": "Umami React components.",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
diff --git a/src/app/(main)/websites/[websiteId]/WebsiteMenu.tsx b/src/app/(main)/websites/[websiteId]/WebsiteMenu.tsx
index 6aa67df1b..03c72008b 100644
--- a/src/app/(main)/websites/[websiteId]/WebsiteMenu.tsx
+++ b/src/app/(main)/websites/[websiteId]/WebsiteMenu.tsx
@@ -25,7 +25,7 @@ export function WebsiteMenu({ websiteId }: { websiteId: string }) {
if (id === 'compare') {
router.push(updateParams({ compare: 'prev' }));
} else if (id === 'edit') {
- router.push(renderUrl(`/settings/websites/${websiteId}`));
+ router.push(renderUrl(`/websites/${websiteId}`));
}
};
diff --git a/src/app/(main)/websites/[websiteId]/settings/WebsiteData.tsx b/src/app/(main)/websites/[websiteId]/settings/WebsiteData.tsx
index c9c42558b..1c1863859 100644
--- a/src/app/(main)/websites/[websiteId]/settings/WebsiteData.tsx
+++ b/src/app/(main)/websites/[websiteId]/settings/WebsiteData.tsx
@@ -39,7 +39,7 @@ export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?:
const handleSave = () => {
touch('websites');
onSave?.();
- router.push(renderUrl(`/settings/websites`));
+ router.push(renderUrl(`/websites`));
};
const handleReset = async () => {
diff --git a/src/components/common/ActionForm.tsx b/src/components/common/ActionForm.tsx
index 3d3d8dc6f..d97064757 100644
--- a/src/components/common/ActionForm.tsx
+++ b/src/components/common/ActionForm.tsx
@@ -2,12 +2,12 @@ import { Row, Column, Text } from '@umami/react-zen';
export function ActionForm({ label, description, children }) {
return (
- <Row padding="6" border borderRadius="3" justifyContent="space-between" shadow="2">
- <Column gap>
+ <Row alignItems="center" justifyContent="space-between" gap>
+ <Column gap="2">
<Text weight="bold">{label}</Text>
- <Text>{description}</Text>
+ <Text color="muted">{description}</Text>
</Column>
- <Row gap="3" alignItems="center">
+ <Row alignItems="center" gap>
{children}
</Row>
</Row>
diff --git a/src/components/hooks/queries/useUserTeamsQuery.ts b/src/components/hooks/queries/useUserTeamsQuery.ts
index 6e9971e40..82f65496b 100644
--- a/src/components/hooks/queries/useUserTeamsQuery.ts
+++ b/src/components/hooks/queries/useUserTeamsQuery.ts
@@ -8,7 +8,7 @@ export function useUserTeamsQuery(userId: string) {
return useQuery({
queryKey: ['teams', { userId, modified }],
queryFn: () => {
- return get(`/users/${userId}/teams`, { userId });
+ return get(`/users/${userId}/teams`);
},
enabled: !!userId,
});
diff --git a/src/components/input/SettingsButton.tsx b/src/components/input/SettingsButton.tsx
index e717e1357..3536d1d54 100644
--- a/src/components/input/SettingsButton.tsx
+++ b/src/components/input/SettingsButton.tsx
@@ -24,7 +24,7 @@ export function SettingsButton() {
const handleAction = (id: Key) => {
if (id === 'settings') {
if (cloudMode) {
- window.location.href = `${cloudUrl}/dashboard`;
+ window.location.href = `${cloudUrl}/settings`;
return;
}
}
diff --git a/src/index.ts b/src/index.ts
index ab6f0946c..5dd342a68 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,3 +1,8 @@
+export * from '@/app/(main)/settings/preferences/LanguageSetting';
+export * from '@/app/(main)/settings/preferences/PreferenceSettings';
+export * from '@/app/(main)/settings/preferences/PreferencesPage';
+export * from '@/app/(main)/settings/preferences/ThemeSetting';
+
export * from '@/app/(main)/teams/[teamId]/TeamMemberEditButton';
export * from '@/app/(main)/teams/[teamId]/TeamMemberEditForm';
export * from '@/app/(main)/teams/[teamId]/TeamMemberRemoveButton';