mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-04 16:06:41 +00:00
fix: ask before removing someone's access to a shared file
This commit is contained in:
@@ -449,6 +449,7 @@
|
|||||||
"share_no_matches": "Keine Treffer",
|
"share_no_matches": "Keine Treffer",
|
||||||
"share_no_users": "Keine anderen Benutzer gefunden",
|
"share_no_users": "Keine anderen Benutzer gefunden",
|
||||||
"share_remove": "Zugriff entfernen",
|
"share_remove": "Zugriff entfernen",
|
||||||
|
"share_remove_confirm": "Zugriff entfernen?",
|
||||||
"share_role_custom": "Benutzerdefiniert",
|
"share_role_custom": "Benutzerdefiniert",
|
||||||
"share_search_placeholder": "Nach Name oder E-Mail suchen",
|
"share_search_placeholder": "Nach Name oder E-Mail suchen",
|
||||||
"share_unavailable": "Teilen ist auf diesem Gerät nicht verfügbar",
|
"share_unavailable": "Teilen ist auf diesem Gerät nicht verfügbar",
|
||||||
|
|||||||
@@ -462,6 +462,7 @@
|
|||||||
"share_no_matches": "No matches",
|
"share_no_matches": "No matches",
|
||||||
"share_no_users": "No other users found",
|
"share_no_users": "No other users found",
|
||||||
"share_remove": "Remove access",
|
"share_remove": "Remove access",
|
||||||
|
"share_remove_confirm": "Remove access?",
|
||||||
"share_role_custom": "Custom",
|
"share_role_custom": "Custom",
|
||||||
"share_search_placeholder": "Search by name or email",
|
"share_search_placeholder": "Search by name or email",
|
||||||
"share_unavailable": "Sharing is not available on this device",
|
"share_unavailable": "Sharing is not available on this device",
|
||||||
|
|||||||
@@ -214,8 +214,21 @@ export default function ShareSheet({ node, onClose, onChanged }: ShareSheetProps
|
|||||||
<ActivityIndicator size="small" color={c.textMuted} />
|
<ActivityIndicator size="small" color={c.textMuted} />
|
||||||
) : (
|
) : (
|
||||||
<Pressable
|
<Pressable
|
||||||
onPress={() => void applyShare(principalId, null)}
|
// Revoking access is immediate on the server: ask first.
|
||||||
|
onPress={() => Alert.alert(
|
||||||
|
t('files.share_remove_confirm', 'Remove access?'),
|
||||||
|
undefined,
|
||||||
|
[
|
||||||
|
{ text: t('common.cancel', 'Cancel'), style: 'cancel' },
|
||||||
|
{
|
||||||
|
text: t('files.share_remove', 'Remove access'),
|
||||||
|
style: 'destructive',
|
||||||
|
onPress: () => { void applyShare(principalId, null); },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
)}
|
||||||
hitSlop={8}
|
hitSlop={8}
|
||||||
|
accessibilityRole="button"
|
||||||
accessibilityLabel={t('files.share_remove', 'Remove access')}
|
accessibilityLabel={t('files.share_remove', 'Remove access')}
|
||||||
>
|
>
|
||||||
<Trash2 size={18} color={c.error} />
|
<Trash2 size={18} color={c.error} />
|
||||||
|
|||||||
Reference in New Issue
Block a user