forked from Alex/Pterodactyl-Panel
ui(admin): update server image when switching eggs
This commit is contained in:
parent
81ff03c2a3
commit
6e4e0bc0a4
@ -27,11 +27,13 @@ function ServerStartupLineContainer ({ egg, server }: { egg: Egg | null; server:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (server.eggId === egg.id) {
|
if (server.eggId === egg.id) {
|
||||||
|
setFieldValue('image', server.container.image);
|
||||||
setFieldValue('startup', server.container.startup || '');
|
setFieldValue('startup', server.container.startup || '');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whenever the egg is changed, set the server's startup command to the egg's default.
|
// Whenever the egg is changed, set the server's startup command to the egg's default.
|
||||||
|
setFieldValue('image', egg.dockerImages.length > 0 ? egg.dockerImages[0] : '');
|
||||||
setFieldValue('startup', '');
|
setFieldValue('startup', '');
|
||||||
}, [ egg ]);
|
}, [ egg ]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user