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