Compare commits

...

6 commits

Author SHA1 Message Date
Francis Cao
b84942b6da make SharesTable mobile friendly
Some checks are pending
Node.js CI / build (push) Waiting to run
2026-01-28 10:48:13 -08:00
Francis Cao
3d75246802 dependabot - bump tar t. 7.5.7 2026-01-28 09:49:30 -08:00
Francis Cao
376c570d26
Merge pull request #3987 from umami-software/dependabot/npm_and_yarn/next-15.5.10
Bump next from 15.5.9 to 15.5.10
2026-01-28 09:32:24 -08:00
Francis Cao
558cb3b041 fix detest test failure 2026-01-28 09:26:07 -08:00
Francis Cao
9e7285cf2b
Merge branch 'dev' into dependabot/npm_and_yarn/next-15.5.10 2026-01-28 09:18:46 -08:00
dependabot[bot]
dd3649bbf7
Bump next from 15.5.9 to 15.5.10
Bumps [next](https://github.com/vercel/next.js) from 15.5.9 to 15.5.10.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.9...v15.5.10)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.10
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-27 21:38:25 +00:00
5 changed files with 174 additions and 464 deletions

View file

@ -102,7 +102,7 @@
"kafkajs": "^2.1.0", "kafkajs": "^2.1.0",
"lucide-react": "^0.543.0", "lucide-react": "^0.543.0",
"maxmind": "^5.0.0", "maxmind": "^5.0.0",
"next": "^15.5.9", "next": "^15.5.10",
"node-fetch": "^3.2.8", "node-fetch": "^3.2.8",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"papaparse": "^5.5.3", "papaparse": "^5.5.3",
@ -164,7 +164,7 @@
"stylelint-config-css-modules": "^4.5.1", "stylelint-config-css-modules": "^4.5.1",
"stylelint-config-prettier": "^9.0.3", "stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^14.0.0", "stylelint-config-recommended": "^14.0.0",
"tar": "^7.5.4", "tar": "^7.5.7",
"ts-jest": "^29.4.6", "ts-jest": "^29.4.6",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"tsup": "^8.5.0", "tsup": "^8.5.0",

617
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,14 @@
import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen'; import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen';
import { DateDistance } from '@/components/common/DateDistance'; import { DateDistance } from '@/components/common/DateDistance';
import { ExternalLink } from '@/components/common/ExternalLink'; import { ExternalLink } from '@/components/common/ExternalLink';
import { useConfig, useMessages } from '@/components/hooks'; import { useConfig, useMessages, useMobile } from '@/components/hooks';
import { ShareDeleteButton } from './ShareDeleteButton'; import { ShareDeleteButton } from './ShareDeleteButton';
import { ShareEditButton } from './ShareEditButton'; import { ShareEditButton } from './ShareEditButton';
export function SharesTable(props: DataTableProps) { export function SharesTable(props: DataTableProps) {
const { formatMessage, labels } = useMessages(); const { formatMessage, labels } = useMessages();
const { cloudMode } = useConfig(); const { cloudMode } = useConfig();
const { isMobile } = useMobile();
const getUrl = (slug: string) => { const getUrl = (slug: string) => {
return `${cloudMode ? process.env.cloudUrl : window?.location.origin}${process.env.basePath || ''}/share/${slug}`; 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)}> <DataColumn id="name" label={formatMessage(labels.name)}>
{({ name }: any) => name} {({ name }: any) => name}
</DataColumn> </DataColumn>
<DataColumn id="slug" label={formatMessage(labels.shareUrl)}> <DataColumn id="slug" label={formatMessage(labels.shareUrl)} width="2fr">
{({ slug }: any) => { {({ slug }: any) => {
const url = getUrl(slug); const url = getUrl(slug);
return ( return (
@ -28,9 +29,11 @@ export function SharesTable(props: DataTableProps) {
); );
}} }}
</DataColumn> </DataColumn>
<DataColumn id="created" label={formatMessage(labels.created)} width="200px"> {!isMobile && (
{(row: any) => <DateDistance date={new Date(row.createdAt)} />} <DataColumn id="created" label={formatMessage(labels.created)}>
</DataColumn> {(row: any) => <DateDistance date={new Date(row.createdAt)} />}
</DataColumn>
)}
<DataColumn id="action" align="end" width="100px"> <DataColumn id="action" align="end" width="100px">
{({ id, slug }: any) => { {({ id, slug }: any) => {
return ( return (

View file

@ -11,7 +11,7 @@ export interface WebsiteShareFormProps {
export function WebsiteShareForm({ websiteId }: WebsiteShareFormProps) { export function WebsiteShareForm({ websiteId }: WebsiteShareFormProps) {
const { formatMessage, labels, messages } = useMessages(); const { formatMessage, labels, messages } = useMessages();
const { data, isLoading } = useWebsiteSharesQuery({ websiteId }); const { data } = useWebsiteSharesQuery({ websiteId });
const shares = data?.data || []; const shares = data?.data || [];
const hasShares = shares.length > 0; const hasShares = shares.length > 0;

View file

@ -18,5 +18,5 @@ test('getIpAddress: Standard header', () => {
}); });
test('getIpAddress: No header', () => { test('getIpAddress: No header', () => {
expect(getIpAddress(new Headers())).toEqual(null); expect(getIpAddress(new Headers())).toEqual(undefined);
}); });