From 67ec5b06702f3537cbeee0edd59c4f3ee16fd2f6 Mon Sep 17 00:00:00 2001 From: Qing Date: Thu, 15 Feb 2024 22:30:06 +0800 Subject: [PATCH] frontend: show plugin running states --- web_app/src/components/Plugins.tsx | 43 ++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/web_app/src/components/Plugins.tsx b/web_app/src/components/Plugins.tsx index 40c3225..5c70984 100644 --- a/web_app/src/components/Plugins.tsx +++ b/web_app/src/components/Plugins.tsx @@ -56,13 +56,19 @@ const pluginMap = { } const Plugins = () => { - const [file, plugins, updateInteractiveSegState, runRenderablePlugin] = - useStore((state) => [ - state.file, - state.serverConfig.plugins, - state.updateInteractiveSegState, - state.runRenderablePlugin, - ]) + const [ + file, + plugins, + isPluginRunning, + updateInteractiveSegState, + runRenderablePlugin, + ] = useStore((state) => [ + state.file, + state.serverConfig.plugins, + state.isPluginRunning, + state.updateInteractiveSegState, + state.runRenderablePlugin, + ]) const disabled = !file if (plugins.length === 0) { @@ -162,7 +168,28 @@ const Plugins = () => { tabIndex={-1} >