diff --git a/apps/admin/src/sections/dashboard/components/system-version-card.tsx b/apps/admin/src/sections/dashboard/components/system-version-card.tsx index 4a8cfe2..0b1e527 100644 --- a/apps/admin/src/sections/dashboard/components/system-version-card.tsx +++ b/apps/admin/src/sections/dashboard/components/system-version-card.tsx @@ -80,6 +80,7 @@ export default function SystemVersionCard() { staleTime: 0, retry: 1, }); + console.log(webVersionInfo); const updateServerMutation = useMutation({ mutationFn: async (serviceName: string) => { @@ -188,52 +189,52 @@ export default function SystemVersionCard() {
V{packageJson.version} - {hasWebNewVersion && webVersionInfo && ( - - - + + + + + {t("confirmUpdate", "Confirm Update")} + + + {webVersionInfo + ? t( + "updateWebDescription", + "Are you sure you want to update the web version from V{{current}} to V{{latest}}?", + { + current: packageJson.version, + latest: webVersionInfo.latest_version, + } + ) + : t( + "updateDescription", + "Are you sure you want to update?" + )} + + + + {t("cancel", "Cancel")} + - - - - - {t("confirmUpdate", "Confirm Update")} - - - {t( - "updateWebDescription", - "Are you sure you want to update the web version from V{{current}} to V{{latest}}?", - { - current: packageJson.version, - latest: webVersionInfo.latest_version, - } - )} - - - - - {t("cancel", "Cancel")} - - - - - - )} + + +
@@ -251,62 +252,63 @@ export default function SystemVersionCard() { serverVersionInfo?.current_version || "1.0.0"} - {hasServerNewVersion && serverVersionInfo && moduleConfig && ( - - + + + + + + + + {t("confirmUpdate", "Confirm Update")} + + + {serverVersionInfo && moduleConfig + ? t( + "updateServerDescription", + "Are you sure you want to update the server version from V{{current}} to V{{latest}}?", + { + current: + moduleConfig.service_version || + serverVersionInfo.current_version, + latest: serverVersionInfo.latest_version, + } + ) + : t( + "updateDescription", + "Are you sure you want to update?" + )} + + + + {t("cancel", "Cancel")} - - - - - {t("confirmUpdate", "Confirm Update")} - - - {t( - "updateServerDescription", - "Are you sure you want to update the server version from V{{current}} to V{{latest}}?", - { - current: - moduleConfig.service_version || - serverVersionInfo.current_version, - latest: serverVersionInfo.latest_version, - } - )} - - - - - {t("cancel", "Cancel")} - - - - - - )} + + +