feat: add version for frontend && backend (#230)

This commit is contained in:
Dream Hunter
2024-05-12 18:31:43 +08:00
committed by GitHub
parent 62bec9ef90
commit 9de2d23be1
7 changed files with 10 additions and 5 deletions

View File

@@ -69,6 +69,8 @@ const { t } = useI18n({
}
});
const version = import.meta.env.PACKAGE_VERSION ? `v${import.meta.env.PACKAGE_VERSION}` : "";
const menuOptions = computed(() => [
{
label: () => h(NButton,
@@ -171,7 +173,7 @@ const menuOptions = computed(() => [
href: "https://github.com/dreamhunter2333/cloudflare_temp_email",
},
{
default: () => import.meta.env.VITE_VERSION || "Github",
default: () => version || "Github",
icon: () => h(NIcon, { component: GithubAlt })
}
),