Add application-name meta header

This commit is contained in:
silverpill 2022-09-16 14:57:07 +00:00
parent c91b8380a4
commit 36d3c5849c
6 changed files with 73 additions and 2 deletions

55
package-lock.json generated
View file

@ -9,6 +9,7 @@
"version": "0.13.3",
"license": "AGPL-3.0",
"dependencies": {
"@vueuse/head": "^0.7.11",
"ethereum-blockies-base64": "^1.0.2",
"ethers": "^5.5.4",
"luxon": "^1.26.0",
@ -2679,6 +2680,17 @@
"integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==",
"dev": true
},
"node_modules/@vueuse/head": {
"version": "0.7.11",
"resolved": "https://registry.npmjs.org/@vueuse/head/-/head-0.7.11.tgz",
"integrity": "sha512-qW2VbJnQ7c1nHqt1wWQYtPf6pMKghcBsCGQd76zFSzKZXncjOYV1I5dZcmAdj3E30JP0WKWCItVbV/cgSAPipA==",
"dependencies": {
"@zhead/schema-vue": "^0.7.1"
},
"peerDependencies": {
"vue": ">=2.7 || >=3"
}
},
"node_modules/@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -2837,6 +2849,28 @@
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
"dev": true
},
"node_modules/@zhead/schema": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-0.7.1.tgz",
"integrity": "sha512-3FjTUj8YBN45PCW4YSosV9LjBu6HnKetk0aYtaZ7HffgpSlAIl/eCaem8T34KJZ7/lRsvoGPcDDkaAzyvGqi0g==",
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@zhead/schema-vue": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/@zhead/schema-vue/-/schema-vue-0.7.1.tgz",
"integrity": "sha512-puEmNJOjfC5IRJqc5p0GEemWP1B25YYRMZ2RM10UrJXGjR+cGOZ+PYQHoBIl9Nf5kJVzhokg1H99HE6Wnyx+qA==",
"dependencies": {
"@zhead/schema": "0.7.1"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
},
"peerDependencies": {
"vue": ">=2.7 || >=3"
}
},
"node_modules/abab": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
@ -17844,6 +17878,14 @@
"integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==",
"dev": true
},
"@vueuse/head": {
"version": "0.7.11",
"resolved": "https://registry.npmjs.org/@vueuse/head/-/head-0.7.11.tgz",
"integrity": "sha512-qW2VbJnQ7c1nHqt1wWQYtPf6pMKghcBsCGQd76zFSzKZXncjOYV1I5dZcmAdj3E30JP0WKWCItVbV/cgSAPipA==",
"requires": {
"@zhead/schema-vue": "^0.7.1"
}
},
"@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -18002,6 +18044,19 @@
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
"dev": true
},
"@zhead/schema": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-0.7.1.tgz",
"integrity": "sha512-3FjTUj8YBN45PCW4YSosV9LjBu6HnKetk0aYtaZ7HffgpSlAIl/eCaem8T34KJZ7/lRsvoGPcDDkaAzyvGqi0g=="
},
"@zhead/schema-vue": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/@zhead/schema-vue/-/schema-vue-0.7.1.tgz",
"integrity": "sha512-puEmNJOjfC5IRJqc5p0GEemWP1B25YYRMZ2RM10UrJXGjR+cGOZ+PYQHoBIl9Nf5kJVzhokg1H99HE6Wnyx+qA==",
"requires": {
"@zhead/schema": "0.7.1"
}
},
"abab": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",

View file

@ -16,6 +16,7 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"@vueuse/head": "^0.7.11",
"ethereum-blockies-base64": "^1.0.2",
"ethers": "^5.5.4",
"luxon": "^1.26.0",

View file

@ -4,12 +4,21 @@
<script setup lang="ts">
import { useRoute } from "vue-router"
import { useHead } from "@vueuse/head"
import { useInstanceInfo } from "@/store/instance"
import { APP_VERSION } from "@/constants"
const route = useRoute()
const { loadInstanceInfo } = useInstanceInfo()
useHead({
meta: [{
name: "application-name",
content: `mitra-web v${APP_VERSION}`,
}],
})
loadInstanceInfo()
</script>

View file

@ -1,3 +1,4 @@
export const BACKEND_URL = process.env.VUE_APP_BACKEND_URL
export const ENV = process.env.NODE_ENV
export const BACKEND_URL = process.env.VUE_APP_BACKEND_URL
export const APP_VERSION = process.env.VUE_APP_VERSION

View file

@ -1,12 +1,15 @@
import { createApp } from "vue"
import VueClickAway from "vue3-click-away"
import { createHead } from "@vueuse/head"
import App from "./App.vue"
import router from "./router"
const app = createApp(App)
const head = createHead()
app.use(VueClickAway)
app.use(head)
app.use(router).mount("#app")

View file

@ -1,3 +1,5 @@
process.env.VUE_APP_VERSION = process.env.npm_package_version
module.exports = {
chainWebpack: (config) => {
// Enable reactivity transform