diff --git a/src/assets/icons/version.svg b/src/assets/icons/version.svg
deleted file mode 100644
index fba69678..00000000
--- a/src/assets/icons/version.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/layout/components/NavBar.vue b/src/layout/components/NavBar.vue
index 000a36c3..8a006237 100644
--- a/src/layout/components/NavBar.vue
+++ b/src/layout/components/NavBar.vue
@@ -30,6 +30,20 @@ limitations under the License. -->
+
+
+
+
+
+
+
+
+
@@ -39,6 +53,7 @@ import { useRoute } from "vue-router";
import { useI18n } from "vue-i18n";
import timeFormat from "@/utils/timeFormat";
import { useAppStoreWithOut } from "@/store/modules/app";
+import { ElMessage } from "element-plus";
const { t } = useI18n();
const appStore = useAppStoreWithOut();
@@ -47,6 +62,7 @@ const pageName = ref("");
const timeRange = ref(0);
const theme = ref("light");
+getVersion();
const setConfig = (value: string) => {
pageName.value = value || "";
theme.value = route.path.includes("/infrastructure/") ? "dark" : "light";
@@ -76,6 +92,12 @@ watch(
setConfig(String(title));
}
);
+async function getVersion() {
+ const res = await appStore.fetchVersion();
+ if (res.errors) {
+ ElMessage.error(res.errors);
+ }
+}