mirror of
https://github.com/umami-software/umami.git
synced 2026-02-03 20:27:13 +01:00
Compare commits
6 commits
c5aa8be15c
...
b84942b6da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b84942b6da | ||
|
|
3d75246802 | ||
|
|
376c570d26 | ||
|
|
558cb3b041 | ||
|
|
9e7285cf2b | ||
|
|
dd3649bbf7 |
5 changed files with 174 additions and 464 deletions
|
|
@ -102,7 +102,7 @@
|
|||
"kafkajs": "^2.1.0",
|
||||
"lucide-react": "^0.543.0",
|
||||
"maxmind": "^5.0.0",
|
||||
"next": "^15.5.9",
|
||||
"next": "^15.5.10",
|
||||
"node-fetch": "^3.2.8",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"papaparse": "^5.5.3",
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
"stylelint-config-css-modules": "^4.5.1",
|
||||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-config-recommended": "^14.0.0",
|
||||
"tar": "^7.5.4",
|
||||
"tar": "^7.5.7",
|
||||
"ts-jest": "^29.4.6",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsup": "^8.5.0",
|
||||
|
|
|
|||
617
pnpm-lock.yaml
generated
617
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,13 +1,14 @@
|
|||
import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen';
|
||||
import { DateDistance } from '@/components/common/DateDistance';
|
||||
import { ExternalLink } from '@/components/common/ExternalLink';
|
||||
import { useConfig, useMessages } from '@/components/hooks';
|
||||
import { useConfig, useMessages, useMobile } from '@/components/hooks';
|
||||
import { ShareDeleteButton } from './ShareDeleteButton';
|
||||
import { ShareEditButton } from './ShareEditButton';
|
||||
|
||||
export function SharesTable(props: DataTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { cloudMode } = useConfig();
|
||||
const { isMobile } = useMobile();
|
||||
|
||||
const getUrl = (slug: string) => {
|
||||
return `${cloudMode ? process.env.cloudUrl : window?.location.origin}${process.env.basePath || ''}/share/${slug}`;
|
||||
|
|
@ -18,7 +19,7 @@ export function SharesTable(props: DataTableProps) {
|
|||
<DataColumn id="name" label={formatMessage(labels.name)}>
|
||||
{({ name }: any) => name}
|
||||
</DataColumn>
|
||||
<DataColumn id="slug" label={formatMessage(labels.shareUrl)}>
|
||||
<DataColumn id="slug" label={formatMessage(labels.shareUrl)} width="2fr">
|
||||
{({ slug }: any) => {
|
||||
const url = getUrl(slug);
|
||||
return (
|
||||
|
|
@ -28,9 +29,11 @@ export function SharesTable(props: DataTableProps) {
|
|||
);
|
||||
}}
|
||||
</DataColumn>
|
||||
<DataColumn id="created" label={formatMessage(labels.created)} width="200px">
|
||||
{(row: any) => <DateDistance date={new Date(row.createdAt)} />}
|
||||
</DataColumn>
|
||||
{!isMobile && (
|
||||
<DataColumn id="created" label={formatMessage(labels.created)}>
|
||||
{(row: any) => <DateDistance date={new Date(row.createdAt)} />}
|
||||
</DataColumn>
|
||||
)}
|
||||
<DataColumn id="action" align="end" width="100px">
|
||||
{({ id, slug }: any) => {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface WebsiteShareFormProps {
|
|||
|
||||
export function WebsiteShareForm({ websiteId }: WebsiteShareFormProps) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { data, isLoading } = useWebsiteSharesQuery({ websiteId });
|
||||
const { data } = useWebsiteSharesQuery({ websiteId });
|
||||
|
||||
const shares = data?.data || [];
|
||||
const hasShares = shares.length > 0;
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ test('getIpAddress: Standard header', () => {
|
|||
});
|
||||
|
||||
test('getIpAddress: No header', () => {
|
||||
expect(getIpAddress(new Headers())).toEqual(null);
|
||||
expect(getIpAddress(new Headers())).toEqual(undefined);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue