update copy

This commit is contained in:
Philipinho
2025-04-21 20:33:49 +01:00
parent a207ca7855
commit b5b48378ab
2 changed files with 11 additions and 10 deletions

View File

@ -377,7 +377,8 @@
"Allow search engines to index page": "Allow search engines to index page",
"Open page": "Open page",
"Page": "Page",
"Revoke public link": "Revoke public link",
"Are you sure you want to revoke this public link?": "Are you sure you want to revoke this public link?",
"Delete public share link": "Delete public share link",
"Delete share": "Delete share",
"Are you sure you want to delete this shared link?": "Are you sure you want to delete this shared link?",
"Publicly shared pages from spaces you are a member of will appear here": "Publicly shared pages from spaces you are a member of will appear here"
}

View File

@ -46,22 +46,22 @@ export default function ShareActionMenu({ share }: Props) {
clipboard.copy(shareLink);
notifications.show({ message: t("Link copied") });
};
const onRevoke = async () => {
const onDelete = async () => {
deleteShareMutation.mutateAsync(share.key);
};
const openRevokeModal = () =>
const openDeleteModal = () =>
modals.openConfirmModal({
title: t("Revoke public link"),
title: t("Delete public share link"),
children: (
<Text size="sm">
{t("Are you sure you want to revoke this public link?")}
{t("Are you sure you want to delete this shared link?")}
</Text>
),
centered: true,
labels: { confirm: t("Revoke"), cancel: t("Don't") },
labels: { confirm: t("Delete"), cancel: t("Don't") },
confirmProps: { color: "red" },
onConfirm: onRevoke,
onConfirm: onDelete,
});
return (
@ -93,11 +93,11 @@ export default function ShareActionMenu({ share }: Props) {
</Menu.Item>
<Menu.Item
c="red"
onClick={openRevokeModal}
onClick={openDeleteModal}
leftSection={<IconTrash size={16} />}
disabled={share.space?.userRole === "reader"}
>
{t("Revoke")}
{t("Delete share")}
</Menu.Item>
</Menu.Dropdown>
</Menu>