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
+15
View File
@@ -0,0 +1,15 @@
import { client } from './client'
export function requestShareDownload(
shareId: string,
fileId: string,
key: string,
purpose?: 'download' | 'prepare' | 'clipboard',
) {
const password = localStorage.getItem(`share_pwd_${shareId}`)
const postDownload = client.api.shares[':shareId'].files[':fileId']['download-url'].$post
const input = { param: { shareId, fileId }, json: { key, purpose } }
return password
? postDownload(input, { headers: { 'x-share-password': password } })
: postDownload(input)
}