From 4847039ae34aa0547952472a38596b52cdbb92b5 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Mon, 17 Aug 2026 21:58:03 -0700 Subject: [PATCH] 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. --- src/gui/src/UI/Dashboard/UIShareModal.js | 2 +- src/gui/src/UI/UIWindowShare.js | 2 +- src/gui/src/i18n/translations/en.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/src/UI/Dashboard/UIShareModal.js b/src/gui/src/UI/Dashboard/UIShareModal.js index 3dbc248f1..f10cb26b3 100644 --- a/src/gui/src/UI/Dashboard/UIShareModal.js +++ b/src/gui/src/UI/Dashboard/UIShareModal.js @@ -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) { diff --git a/src/gui/src/UI/UIWindowShare.js b/src/gui/src/UI/UIWindowShare.js index 6dccb20ce..8fa6e7640 100644 --- a/src/gui/src/UI/UIWindowShare.js +++ b/src/gui/src/UI/UIWindowShare.js @@ -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) { diff --git a/src/gui/src/i18n/translations/en.js b/src/gui/src/i18n/translations/en.js index 89e8fc9b3..211966b39 100644 --- a/src/gui/src/i18n/translations/en.js +++ b/src/gui/src/i18n/translations/en.js @@ -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',