mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-13 00:12:02 +08:00
feat: add version for frontend && backend (#230)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cloudflare_temp_email",
|
||||
"version": "0.0.0",
|
||||
"version": "0.4.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
),
|
||||
|
||||
@@ -71,5 +71,8 @@ export default defineConfig({
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.PACKAGE_VERSION': JSON.stringify(process.env.npm_package_version),
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user