mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 15:04:52 +09:00
Generate a new random slave token on opening modal
This commit is contained in:
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 <>
|
||||
|
||||
Reference in new issue
Block a user