MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / handleDeleteScript

Function handleDeleteScript

src/pages/components/ScriptMenuList/index.tsx:488–493  ·  view source on GitHub ↗
(uuid: string)

Source from the content-addressed store, hash-verified

486 }, [grouppedMenus]);
487
488 const handleDeleteScript = (uuid: string) => {
489 // 本地先行移除列表项(乐观更新);若删除失败会显示错误讯息。
490 scriptClient.deletes([uuid]).catch((e) => {
491 Message.error(`${t("delete_failed")}: ${e}`);
492 });
493 };
494
495 const onEnableChange = (item: ScriptMenuEntry, checked: boolean) => {
496 scriptClient.enable(item.uuid, checked).catch((err) => {

Callers 1

index.tsxFile · 0.85

Calls 2

deletesMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected