feat(myshares): new version of myshares sections, supporting grants Users + Tokens

This commit is contained in:
Edouard Vanbelle
2026-05-29 02:16:15 +02:00
parent 8800353900
commit 63722c868e
43 changed files with 2676 additions and 243 deletions
+14
View File
@@ -154,6 +154,20 @@ const fileSharing = {
}
},
/**
* Fetch a single share by its UUID and return the full ShareItem.
* Used to resolve a token's URL on demand (lazy fetch on copy-link click).
* @param {string} shareId
* @returns {Promise<import('../../core/types.js').ShareItem>}
*/
async getShareById(shareId) {
const res = await fetch(`/api/shares/${shareId}`, {
headers: this._headers(false)
});
if (!res.ok) throw new Error(`getShareById ${shareId}: HTTP ${res.status}`);
return res.json();
},
/**
* Copy a shared link to clipboard
* @param {string} url