{(() => {
const slashIdx = targetPluginItem?.id.indexOf('/') ?? -1;
const author =
slashIdx >= 0
? targetPluginItem!.id.substring(0, slashIdx)
: '';
const name =
slashIdx >= 0
? targetPluginItem!.id.substring(slashIdx + 1)
: (targetPluginItem?.id ?? '');
return pluginOpType === PluginOperationType.DELETE
? t('plugins.confirmDeletePlugin', { author, name })
: t('plugins.confirmUpdatePlugin', { author, name });
})()}
{pluginOpType === PluginOperationType.DELETE && (
)}
)}
{asyncTask.status === AsyncTaskStatus.RUNNING && (
{pluginOpType === PluginOperationType.DELETE
? t('plugins.deleting')
: t('plugins.updating')}
)}
{asyncTask.status === AsyncTaskStatus.ERROR && (