chore: remove resource public id (#1912)

* chore: remove resource public id

* chore: update
This commit is contained in:
boojack
2023-07-08 11:29:50 +08:00
committed by GitHub
parent 2157651d17
commit 7e391bd53d
17 changed files with 82 additions and 93 deletions

View File

@ -37,21 +37,6 @@ const ResourceItemDropdown = ({ resource }: Props) => {
toast.success(t("message.succeed-copy-resource-link"));
};
const handleResetResourceLinkBtnClick = (resource: Resource) => {
showCommonDialog({
title: t("resource.reset-resource-link"),
content: t("resource.reset-link-prompt"),
style: "warning",
dialogName: "reset-resource-link-dialog",
onConfirm: async () => {
await resourceStore.patchResource({
id: resource.id,
resetPublicId: true,
});
},
});
};
const handleRenameBtnClick = (resource: Resource) => {
showChangeResourceFilenameDialog(resource.id, resource.filename);
};
@ -91,12 +76,6 @@ const ResourceItemDropdown = ({ resource }: Props) => {
>
{t("resource.copy-link")}
</button>
<button
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick={() => handleResetResourceLinkBtnClick(resource)}
>
{t("resource.reset-link")}
</button>
<button
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick={() => handleRenameBtnClick(resource)}