fix(MyShares): show tooltip when mouse over an item + fix the path

This commit is contained in:
Edouard Vanbelle
2026-05-30 10:41:16 +02:00
parent 3bcb3a5b3f
commit ae82f4b664
3 changed files with 15 additions and 7 deletions
+9
View File
@@ -167,6 +167,8 @@ class MySharesList {
_buildResourceLaneHeader(item) {
const row = document.createElement('div');
row.className = 'ms-resource-row';
if (item.resource.path) row.dataset.path = item.resource.path;
if (item.resource.owner_id) row.dataset.ownerId = item.resource.owner_id;
row.appendChild(buildResourceIcon(item.resource, item.resource_type));
@@ -229,6 +231,13 @@ class MySharesList {
if (_expiryState(grant.expires_at ?? null) === 'expired') {
row.classList.add('ms-grant-row--expired');
}
// In sharedWith mode each grant row represents a (resource → subject)
// pair, so stamp the resource hierarchy info for the hover tooltip.
// In items mode the row represents a subject — no resource attrs.
if (viewMode === 'sharedWith') {
if (item.resource.path) row.dataset.path = item.resource.path;
if (item.resource.owner_id) row.dataset.ownerId = item.resource.owner_id;
}
row.appendChild(this._buildIdentity(grant, item, viewMode));
row.appendChild(this._buildRolePill(grant.role));