mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
Settings refactor.
This commit is contained in:
parent
1b81074752
commit
c98f324c22
56 changed files with 706 additions and 348 deletions
|
|
@ -33,7 +33,7 @@ export function WebsiteEditForm({ websiteId, onSave }: { websiteId: string; onSa
|
|||
};
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit} error={error} values={website} style={{ width: 420 }}>
|
||||
<Form onSubmit={handleSubmit} error={error} values={website} style={{ width: 400 }}>
|
||||
<FormField name="id" label={formatMessage(labels.websiteId)}>
|
||||
<TextField data-test="text-field-websiteId" value={website?.id} isReadOnly allowCopy />
|
||||
</FormField>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useContext } from 'react';
|
|||
import { Icon, Tabs, TabList, Tab, TabPanel, Text } from '@umami/react-zen';
|
||||
import { WebsiteContext } from '@/app/(main)/websites/[websiteId]/WebsiteProvider';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Globe, Arrow } from '@/components/icons';
|
||||
import { Globe, Eye } from '@/components/icons';
|
||||
import { SectionHeader } from '@/components/common/SectionHeader';
|
||||
import { WebsiteShareForm } from './WebsiteShareForm';
|
||||
import { WebsiteTrackingCode } from './WebsiteTrackingCode';
|
||||
|
|
@ -25,7 +25,7 @@ export function WebsiteSettings({
|
|||
<SectionHeader title={website?.name} icon={<Globe />}>
|
||||
<LinkButton href={`/websites/${websiteId}`} target={openExternal ? '_blank' : null}>
|
||||
<Icon>
|
||||
<Arrow />
|
||||
<Eye />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.view)}</Text>
|
||||
</LinkButton>
|
||||
|
|
@ -35,7 +35,7 @@ export function WebsiteSettings({
|
|||
<Tab id="details">{formatMessage(labels.details)}</Tab>
|
||||
<Tab id="tracking">{formatMessage(labels.trackingCode)}</Tab>
|
||||
<Tab id="share"> {formatMessage(labels.shareUrl)}</Tab>
|
||||
<Tab id="data">{formatMessage(labels.data)}</Tab>
|
||||
<Tab id="manage">{formatMessage(labels.manage)}</Tab>
|
||||
</TabList>
|
||||
<TabPanel id="details">
|
||||
<WebsiteEditForm websiteId={websiteId} />
|
||||
|
|
@ -44,9 +44,9 @@ export function WebsiteSettings({
|
|||
<WebsiteTrackingCode websiteId={websiteId} />
|
||||
</TabPanel>
|
||||
<TabPanel id="share">
|
||||
<WebsiteShareForm websiteId={websiteId} />
|
||||
<WebsiteShareForm websiteId={websiteId} shareId={website.shareId} />
|
||||
</TabPanel>
|
||||
<TabPanel id="data">
|
||||
<TabPanel id="manage">
|
||||
<WebsiteData websiteId={websiteId} />
|
||||
</TabPanel>
|
||||
</Tabs>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue