fix(frontend): refresh network and image list on load

This ensures that if the only network has a name that is not "bridge", the created container still has a valid network assigned
This commit is contained in:
Jiangyi Liu 2024-07-31 20:39:29 +08:00
parent 5bfd42185b
commit 3531c17ab3

View File

@ -68,11 +68,6 @@ const UPDATE_CMD_TEMPLATE =
t("TXT_CODE_61ca492b") +
`"C:/SteamCMD/steamcmd.exe" +login anonymous +force_install_dir "{mcsm_workspace}" "+app_update 380870 validate" +quit`;
const openDialog = () => {
open.value = true;
initFormDetail();
};
const initFormDetail = () => {
if (props.instanceInfo) {
options.value = {
@ -152,6 +147,12 @@ const loadNetworkModes = async () => {
}
};
const openDialog = async () => {
open.value = true;
initFormDetail();
await awaitPromise.all([loadImages(), loadNetworkModes()]);
};
const rules: Record<string, Rule[]> = {
nickname: [{ required: true, message: t("TXT_CODE_68a504b3") }],
startCommand: [