Generate a new random slave token on opening modal

This commit is contained in:
Daniel authored and GitHub committed 2022-10-16 18:49:48 +00:00
1 parent e82914c4e1
commit 7bb33554f4
1 file changed
+7
@@ -51,6 +51,13 @@ function GenerateSlaveTokenButton(props) {
setSlaveId(slaveId);
}
// Generate a new random
useEffect(() => {
if (visible) {
generateToken().catch(notifyErrorHandler("Error generating token"));
}
}, [visible]);
// Only install plugins that aren't filesystem paths. Npm modules have max 1 forward slash in their name.
const pluginString = pluginList.map(p => `"${p.requirePath}"`).filter(x => x.split("/") <= 1).join(" ");
return <>