feat(share): record and display share activity (#549)

* feat(share): record and display share activity

* style(share): remove activity entry borders

* docs(share): explain share link activity
This commit is contained in:
Yiling-J
2026-11-25 12:23:11 +08:00
committed by GitHub
parent 9c8eb16259
commit e32445684f
51 changed files with 3208 additions and 227 deletions
@@ -238,6 +238,8 @@ describe('MobileFileHeader', () => {
rootFolderId: 'rf-1',
projectId: 'proj-1',
isExpired: false,
views: 0,
lastViewedAt: null,
createdAt: '2026-11-24T00:00:00.000Z',
updatedAt: '2026-11-24T00:00:00.000Z',
},
@@ -1,4 +1,5 @@
import { client } from '@/ui/api/client'
import { requestShareDownload } from '@/ui/api/share-download'
import { Badge } from '@/ui/components/ui/badge'
import { Button } from '@/ui/components/ui/button'
import {
@@ -113,10 +114,7 @@ export function MobileFileHeader({
try {
const res =
isPublic && shareId
? await client.api.shares[':shareId'].files[':fileId']['download-url'].$post({
param: { shareId, fileId: activeFileId },
json: { key },
})
? await requestShareDownload(shareId, activeFileId, key)
: await client.api.files['download-url'].$post({
json: { key, assetId: activeFileId },
})