Skip to content

Commit 2dd079e

Browse files
committed
fix version info issue
1 parent a5b23d5 commit 2dd079e

File tree

7 files changed

+71
-74
lines changed

7 files changed

+71
-74
lines changed

frontend/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
"pinia": "^2.0.17",
2121
"pinia-plugin-persistedstate": "^1.6.3",
2222
"reconnecting-websocket": "^4.4.0",
23-
"vite-plugin-build-id": "^0.1.1",
23+
"vite-plugin-build-id": "^0.2.1",
2424
"vue": "^3.2.37",
25-
"vue-chartjs": "^4.1.1",
2625
"vue-router": "4",
2726
"vue3-ace-editor": "^2.2.2",
2827
"vue3-apexcharts": "^1.4.1",
2928
"vue3-gettext": "^2.3.0",
30-
"vuex": "^4.0.2",
3129
"xterm": "^4.19.0",
3230
"xterm-addon-attach": "^0.6.0",
3331
"xterm-addon-fit": "^0.5.0"

frontend/src/version.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"1.5.0","build_id":23,"total_build":93}

frontend/src/views/domain/DomainList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="tsx">
22
import StdTable from '@/components/StdDataDisplay/StdTable.vue'
33
4-
import {badge, customRender, datetime} from '@/components/StdDataDisplay/StdTableTransformer'
4+
import {customRender, datetime} from '@/components/StdDataDisplay/StdTableTransformer'
55
import {useGettext} from 'vue3-gettext'
66
77
const {$gettext, interpolate} = useGettext()

frontend/src/views/other/About.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<script setup lang="ts">
22
import gettext from '@/gettext'
33
import logo from '@/assets/img/logo.png'
4+
import version from '@/version.json'
45
56
const {$gettext} = gettext
67
78
const this_year = new Date().getFullYear()
8-
const version = import.meta.env.VITE_APP_VERSION // import.meta.env.VITE_APP_VERSION
9-
const build_id = import.meta.env.VITE_APP_TOTAL_BUILD ?? $gettext('Development Mode')
10-
console.log(import.meta)
119
</script>
1210

1311
<template>
@@ -17,7 +15,7 @@ console.log(import.meta)
1715
</div>
1816
<h2>Nginx UI</h2>
1917
<p>Yet another WebUI for Nginx</p>
20-
<p>Version: {{ version }} ({{ build_id }})</p>
18+
<p>Version: {{ version.version }} ({{ version.build_id || $gettext('Development Mode') }})</p>
2119
<h3 v-translate>Project Team</h3>
2220
<p><a href="https://jackyu.cn/">@0xJacky</a> <a href="https://blog.kugeek.com/">@Hintay</a></p>
2321
<h3 v-translate>Build with</h3>

frontend/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"1.5.0","build_id":17,"total_build":87}
1+
{"version":"1.5.0","build_id":23,"total_build":93}

frontend/vite.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {fileURLToPath, URL} from 'url'
77
import vueJsx from '@vitejs/plugin-vue-jsx'
88
import vitePluginBuildId from 'vite-plugin-build-id'
99

10-
1110
// https://vitejs.dev/config/
1211
export default defineConfig({
1312
resolve: {
@@ -52,9 +51,6 @@ export default defineConfig({
5251
},
5352
}),
5453
],
55-
define: {
56-
'APP_VERSION': JSON.stringify(process.env.npm_package_version)
57-
},
5854
css: {
5955
preprocessorOptions: {
6056
less: {

frontend/yarn.lock

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,32 @@
4848
integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==
4949

5050
"@babel/core@^7.18.6":
51-
version "7.18.9"
52-
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.9.tgz#805461f967c77ff46c74ca0460ccf4fe933ddd59"
53-
integrity sha512-1LIb1eL8APMy91/IMW+31ckrfBM4yCoLaVzoDhZUKSM4cu1L1nIidyxkCgzPAgrC5WEz36IPEr/eSeSF9pIn+g==
51+
version "7.18.10"
52+
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8"
53+
integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==
5454
dependencies:
5555
"@ampproject/remapping" "^2.1.0"
5656
"@babel/code-frame" "^7.18.6"
57-
"@babel/generator" "^7.18.9"
57+
"@babel/generator" "^7.18.10"
5858
"@babel/helper-compilation-targets" "^7.18.9"
5959
"@babel/helper-module-transforms" "^7.18.9"
6060
"@babel/helpers" "^7.18.9"
61-
"@babel/parser" "^7.18.9"
62-
"@babel/template" "^7.18.6"
63-
"@babel/traverse" "^7.18.9"
64-
"@babel/types" "^7.18.9"
61+
"@babel/parser" "^7.18.10"
62+
"@babel/template" "^7.18.10"
63+
"@babel/traverse" "^7.18.10"
64+
"@babel/types" "^7.18.10"
6565
convert-source-map "^1.7.0"
6666
debug "^4.1.0"
6767
gensync "^1.0.0-beta.2"
6868
json5 "^2.2.1"
6969
semver "^6.3.0"
7070

71-
"@babel/generator@^7.18.9":
72-
version "7.18.9"
73-
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5"
74-
integrity sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug==
71+
"@babel/generator@^7.18.10":
72+
version "7.18.10"
73+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a"
74+
integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA==
7575
dependencies:
76-
"@babel/types" "^7.18.9"
76+
"@babel/types" "^7.18.10"
7777
"@jridgewell/gen-mapping" "^0.3.2"
7878
jsesc "^2.5.1"
7979

@@ -94,7 +94,7 @@
9494
browserslist "^4.20.2"
9595
semver "^6.3.0"
9696

97-
"@babel/helper-create-class-features-plugin@^7.18.6":
97+
"@babel/helper-create-class-features-plugin@^7.18.9":
9898
version "7.18.9"
9999
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce"
100100
integrity sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw==
@@ -162,7 +162,7 @@
162162
dependencies:
163163
"@babel/types" "^7.18.6"
164164

165-
"@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.18.6":
165+
"@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9":
166166
version "7.18.9"
167167
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f"
168168
integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==
@@ -192,6 +192,11 @@
192192
dependencies:
193193
"@babel/types" "^7.18.6"
194194

195+
"@babel/helper-string-parser@^7.18.10":
196+
version "7.18.10"
197+
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56"
198+
integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==
199+
195200
"@babel/helper-validator-identifier@^7.18.6":
196201
version "7.18.6"
197202
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076"
@@ -220,10 +225,10 @@
220225
chalk "^2.0.0"
221226
js-tokens "^4.0.0"
222227

223-
"@babel/parser@^7.16.4", "@babel/parser@^7.18.6", "@babel/parser@^7.18.9":
224-
version "7.18.9"
225-
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539"
226-
integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==
228+
"@babel/parser@^7.16.4", "@babel/parser@^7.18.10":
229+
version "7.18.10"
230+
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1"
231+
integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg==
227232

228233
"@babel/plugin-syntax-import-meta@^7.10.4":
229234
version "7.10.4"
@@ -247,12 +252,12 @@
247252
"@babel/helper-plugin-utils" "^7.18.6"
248253

249254
"@babel/plugin-transform-typescript@^7.18.8":
250-
version "7.18.8"
251-
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0"
252-
integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA==
255+
version "7.18.10"
256+
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.10.tgz#b23401b32f1f079396bcaed01667a54ebe4f9f85"
257+
integrity sha512-j2HQCJuMbi88QftIb5zlRu3c7PU+sXNnscqsrjqegoGiCgXR569pEdben9vly5QHKL2ilYkfnSwu64zsZo/VYQ==
253258
dependencies:
254-
"@babel/helper-create-class-features-plugin" "^7.18.6"
255-
"@babel/helper-plugin-utils" "^7.18.6"
259+
"@babel/helper-create-class-features-plugin" "^7.18.9"
260+
"@babel/helper-plugin-utils" "^7.18.9"
256261
"@babel/plugin-syntax-typescript" "^7.18.6"
257262

258263
"@babel/runtime@^7.10.5":
@@ -262,36 +267,37 @@
262267
dependencies:
263268
regenerator-runtime "^0.13.4"
264269

265-
"@babel/template@^7.0.0", "@babel/template@^7.18.6":
266-
version "7.18.6"
267-
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31"
268-
integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==
270+
"@babel/template@^7.0.0", "@babel/template@^7.18.10", "@babel/template@^7.18.6":
271+
version "7.18.10"
272+
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
273+
integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==
269274
dependencies:
270275
"@babel/code-frame" "^7.18.6"
271-
"@babel/parser" "^7.18.6"
272-
"@babel/types" "^7.18.6"
276+
"@babel/parser" "^7.18.10"
277+
"@babel/types" "^7.18.10"
273278

274-
"@babel/traverse@^7.0.0", "@babel/traverse@^7.18.9":
275-
version "7.18.9"
276-
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98"
277-
integrity sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg==
279+
"@babel/traverse@^7.0.0", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9":
280+
version "7.18.10"
281+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08"
282+
integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g==
278283
dependencies:
279284
"@babel/code-frame" "^7.18.6"
280-
"@babel/generator" "^7.18.9"
285+
"@babel/generator" "^7.18.10"
281286
"@babel/helper-environment-visitor" "^7.18.9"
282287
"@babel/helper-function-name" "^7.18.9"
283288
"@babel/helper-hoist-variables" "^7.18.6"
284289
"@babel/helper-split-export-declaration" "^7.18.6"
285-
"@babel/parser" "^7.18.9"
286-
"@babel/types" "^7.18.9"
290+
"@babel/parser" "^7.18.10"
291+
"@babel/types" "^7.18.10"
287292
debug "^4.1.0"
288293
globals "^11.1.0"
289294

290-
"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9":
291-
version "7.18.9"
292-
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f"
293-
integrity sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg==
295+
"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9":
296+
version "7.18.10"
297+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6"
298+
integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==
294299
dependencies:
300+
"@babel/helper-string-parser" "^7.18.10"
295301
"@babel/helper-validator-identifier" "^7.18.6"
296302
to-fast-properties "^2.0.0"
297303

@@ -534,7 +540,7 @@
534540
"@vue/compiler-dom" "3.2.37"
535541
"@vue/shared" "3.2.37"
536542

537-
"@vue/devtools-api@^6.0.0-beta.11", "@vue/devtools-api@^6.1.4", "@vue/devtools-api@^6.2.1":
543+
"@vue/devtools-api@^6.1.4", "@vue/devtools-api@^6.2.1":
538544
version "6.2.1"
539545
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz#6f2948ff002ec46df01420dfeff91de16c5b4092"
540546
integrity sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==
@@ -1178,9 +1184,9 @@ ejs@^3.1.6:
11781184
jake "^10.8.5"
11791185

11801186
electron-to-chromium@^1.4.202:
1181-
version "1.4.206"
1182-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.206.tgz#580ff85b54d7ec0c05f20b1e37ea0becdd7b0ee4"
1183-
integrity sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA==
1187+
version "1.4.208"
1188+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.208.tgz#ecb5b47c8cc212a43172ffc5ce50178a638a5d74"
1189+
integrity sha512-diMr4t69FigAGUk2KovP0bygEtN/9AkqEVkzjEp0cu+zFFbZMVvwACpTTfuj1mAmFR5kNoSW8wGKDFWIvmThiQ==
11841190

11851191
entities@^2.0.0:
11861192
version "2.2.0"
@@ -2517,15 +2523,25 @@ uuid@^8.3.2:
25172523
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
25182524
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
25192525

2520-
vite-plugin-build-id@^0.1.1:
2521-
version "0.1.1"
2522-
resolved "https://registry.yarnpkg.com/vite-plugin-build-id/-/vite-plugin-build-id-0.1.1.tgz#dbd95512f2e53949d06e426216b4893b624a828a"
2523-
integrity sha512-dnrAlSxq9yzhCM+31nMOUh8pYnhuNk76BZuT31d5GtTD7ilr+SrJoqK5NOQTAZe1+Zkp3kq8xFlgOoVpS4RCCg==
2526+
vite-plugin-build-id@/Users/Jacky/Documents/Projects/vite-plugin-build-id, "vite-plugin-build-id@file:../../../Documents/Projects/vite-plugin-build-id":
2527+
version "0.2.1"
25242528
dependencies:
25252529
"@types/node" "^18.6.3"
25262530
rimraf "^3.0.2"
25272531
typescript "^4.7.4"
25282532
vite "^3.0.4"
2533+
vite-plugin-build-id "file:../../../Documents/Projects/vite-plugin-build-id"
2534+
2535+
vite-plugin-build-id@^0.2.1:
2536+
version "0.2.1"
2537+
resolved "https://registry.yarnpkg.com/vite-plugin-build-id/-/vite-plugin-build-id-0.2.1.tgz#04bc95d4019b07165fdea3055377d52da4bd6c15"
2538+
integrity sha512-NJWZi2bvjeZBLYPdjrh5Qi9KGm/abN/RBpvD+qTju5VWtA2hEoG4m0/6ul9k+pl7k/cQwFY+0UvvUhi6g2zDPA==
2539+
dependencies:
2540+
"@types/node" "^18.6.3"
2541+
rimraf "^3.0.2"
2542+
typescript "^4.7.4"
2543+
vite "^3.0.4"
2544+
vite-plugin-build-id "file:../../../Documents/Projects/vite-plugin-build-id"
25292545

25302546
vite-plugin-html@^3.2.0:
25312547
version "3.2.0"
@@ -2557,11 +2573,6 @@ vite@^3.0.0, vite@^3.0.4:
25572573
optionalDependencies:
25582574
fsevents "~2.3.2"
25592575

2560-
vue-chartjs@^4.1.1:
2561-
version "4.1.1"
2562-
resolved "https://registry.yarnpkg.com/vue-chartjs/-/vue-chartjs-4.1.1.tgz#b1ffc2845e09d14cb5255305b11bd3e8df8058ab"
2563-
integrity sha512-rKIQ3jPrjhwxjKdNJppnYxRuBSrx4QeM3nNHsfIxEqjX6QS4Jq6e6vnZBxh2MDpURDC2uvuI2N0eIt1cWXbBVA==
2564-
25652576
vue-demi@*:
25662577
version "0.13.6"
25672578
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.13.6.tgz#f9433cbd75e68a970dec066647f4ba6c08ced48f"
@@ -2628,13 +2639,6 @@ vue@^3.2.26, vue@^3.2.37:
26282639
"@vue/server-renderer" "3.2.37"
26292640
"@vue/shared" "3.2.37"
26302641

2631-
vuex@^4.0.2:
2632-
version "4.0.2"
2633-
resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.2.tgz#f896dbd5bf2a0e963f00c67e9b610de749ccacc9"
2634-
integrity sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==
2635-
dependencies:
2636-
"@vue/devtools-api" "^6.0.0-beta.11"
2637-
26382642
warning@^4.0.0:
26392643
version "4.0.3"
26402644
resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"

0 commit comments

Comments
 (0)