mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-24 15:07:17 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user