fix(share): say 'Updated access' when changing a grant's mode

Changing someone's access level reported 'Shared with X', the same
message as a fresh grant, which reads as if a new share happened.
Both share dialogs now confirm mode changes with a dedicated
'Updated access for X' message. The UIWindowShare call also drops the
html_encode() around the recipient - i18n() already encodes
interpolations, so the wrapper double-encoded.
This commit is contained in:
Nariman Jelveh
2026-08-17 21:58:03 -07:00
parent b9f4458231
commit 4847039ae3
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ export default function UIShareModal ({ path: item_path, name, owner, fsentry, $
$(this).prop('disabled', true);
try {
await puter.fs.share({ path: item_path, recipient: holder, mode });
show_success(i18n('share_shared_with', { recipient: holder }));
show_success(i18n('share_access_updated', { recipient: holder }));
invalidate_shared_roots();
await refresh();
} catch (err) {
+1 -1
View File
@@ -202,7 +202,7 @@ async function UIWindowShare (options) {
$(this).prop('disabled', true);
try {
await puter.fs.share({ path: item_path, recipient: holder, mode });
show_success(i18n('share_shared_with', { recipient: html_encode(holder) }));
show_success(i18n('share_access_updated', { recipient: holder }));
invalidate_shared_roots();
await refresh();
} catch (e) {
+1
View File
@@ -391,6 +391,7 @@ const en = {
share_done: 'Done',
share_failed: 'Could not share this item.',
share_shared_with: 'Shared with {{recipient}}',
share_access_updated: 'Updated access for {{recipient}}',
share_access_removed: 'Removed {{recipient}}',
share_confirm_remove: 'Remove {{recipient}}s access to this item?',
share_remove: 'Remove',