mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
feat: display current version
This commit is contained in:
parent
0a8312d87c
commit
1765adacda
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "metacubexd",
|
||||
"version": "1.58.0",
|
||||
"description": "Clash-Meta Dashboard",
|
||||
"description": "Clash.Meta Dashboard, The Official One, XD",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
@ -156,11 +156,11 @@ export const Header = () => {
|
||||
</div>
|
||||
|
||||
<a
|
||||
class="text-xl font-bold normal-case"
|
||||
class="whitespace-nowrap text-xl font-bold uppercase"
|
||||
href="https://github.com/metacubex/metacubexd"
|
||||
target="_blank"
|
||||
>
|
||||
metacubexd
|
||||
metacube, xd
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
@ -340,6 +340,8 @@ export default () => {
|
||||
<DNSQueryForm />
|
||||
<ConfigForm />
|
||||
<ConfigForXd />
|
||||
|
||||
{import.meta.env.version}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
0
src/types.d.ts → src/types/index.d.ts
vendored
0
src/types.d.ts → src/types/index.d.ts
vendored
7
src/vite-env.d.ts
vendored
Normal file
7
src/vite-env.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
interface ImportMetaEnv {
|
||||
readonly version: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "preserve",
|
||||
|
@ -1,11 +1,15 @@
|
||||
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
import solidPlugin from 'vite-plugin-solid'
|
||||
import pkgJSON from './package.json'
|
||||
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
build: { chunkSizeWarningLimit: 1000 },
|
||||
resolve: { alias: { '~': '/src' } },
|
||||
define: {
|
||||
'import.meta.env.version': JSON.stringify(pkgJSON.version),
|
||||
},
|
||||
plugins: [
|
||||
solidPlugin(),
|
||||
splitVendorChunkPlugin(),
|
||||
|
Loading…
Reference in New Issue
Block a user