remove beta text instance + edit meta with vue-meta

This commit is contained in:
Andreani Jean
2023-05-09 15:26:00 +02:00
parent e4d1c4706f
commit 1effc14fed
9 changed files with 31 additions and 19 deletions

View File

@@ -95,6 +95,7 @@ yarn build
- All the wordings of the website are on this [locale file](https://gitlab.com/geovisio/website/-/blob/main/src/locales/fr.json)
- You can change the title `"title": "Instance Panoramax IGN"` of your instance on the [locale file](https://gitlab.com/geovisio/website/-/blob/main/src/locales/fr.json)
- In the same [locale file](https://gitlab.com/geovisio/website/-/blob/main/src/locales/fr.json) you can change the meta data wordings inside the `"meta": {}` object
- You can change the instance name inside the documentation of the page /partager-des-photos for the keys `"terminal_text_logged"` and `"terminal_text_not_logged"` on the [locale file](https://gitlab.com/geovisio/website/-/blob/main/src/locales/fr.json)
### Images

View File

@@ -4,22 +4,6 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/static/favicon.ico" />
<title>Instance Panoramax IGN Version Beta</title>
<meta
name="description"
content="Panoramax, lalternative libre pour photo-cartographier les territoires"
/>
<meta name="twitter:title" content="Instance Panoramax IGN Version Beta" />
<meta name="og:title" content="Instance Panoramax IGN Version Beta" />
<meta
name="twitter:description"
content="Panoramax, lalternative libre pour photo-cartographier les territoires"
/>
<meta
name="og:description"
content="Panoramax, lalternative libre pour photo-cartographier les territoires"
/>
</head>
<body>
<div id="app"></div>

View File

@@ -27,6 +27,7 @@
"vue-axios": "^3.5.2",
"vue-eslint-parser": "^9.1.0",
"vue-i18n": "^9.2.2",
"vue-meta": "^3.0.0-alpha.10",
"vue-router": "^4.1.6",
"vue3-cookies": "^1.0.6",
"vue3-smooth-scroll": "^0.8.1"

View File

@@ -1,8 +1,25 @@
<script setup lang="ts">
import { RouterView } from 'vue-router'
import { useMeta } from 'vue-meta'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
useMeta({
title: t('general.title'),
og: {
title: t('general.meta.title'),
description: t('general.meta.description')
},
twitter: {
title: t('general.meta.title'),
description: t('general.meta.description')
}
})
</script>
<template>
<metainfo>
<template v-slot:title="{ content }">{{ content }}</template>
</metainfo>
<RouterView />
</template>
<style scoped></style>

View File

@@ -1,7 +1,6 @@
<template>
<p class="instance-beta">
{{ $t('general.header.title') }}
<span class="beta">{{ $t('general.beta_version') }}</span>
</p>
</template>

View File

@@ -25,6 +25,5 @@ describe('Template', () => {
}
})
expect(wrapper.html()).contains('general.header.title')
expect(wrapper.html()).contains('general.beta_version')
})
})

View File

@@ -1,5 +1,10 @@
{
"general": {
"title": "Instance Panoramax IGN",
"meta": {
"title": "Instance Panoramax IGN",
"description": "Panoramax, lalternative libre pour photo-cartographier les territoires"
},
"header": {
"help_text": "Aide",
"contribute_text": "Partager des photos",
@@ -10,7 +15,6 @@
"account_text": "Mon compte",
"login_text": "Connexion"
},
"beta_version": "Version Beta",
"feature_not_available": "Fonctionnalité en cours de développement"
},
"pages": {

View File

@@ -5,6 +5,7 @@ import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'
import { globalCookiesConfig } from 'vue3-cookies'
import { createMetaManager } from 'vue-meta'
import fr from './locales/fr.json'
import './assets/main.css'
import 'bootstrap/dist/css/bootstrap.css'
@@ -36,4 +37,5 @@ app.use(i18n)
app.use(router)
app.use(VueAxios, axios)
app.provide('axios', app.config.globalProperties.axios)
app.use(createMetaManager())
app.mount('#app')

View File

@@ -5618,6 +5618,11 @@ vue-i18n@^9.2.2:
"@intlify/vue-devtools" "9.2.2"
"@vue/devtools-api" "^6.2.1"
vue-meta@^3.0.0-alpha.10:
version "3.0.0-alpha.10"
resolved "https://registry.yarnpkg.com/vue-meta/-/vue-meta-3.0.0-alpha.10.tgz#8aa7dee8ef43edda2633d52d2d4ca0ae03352222"
integrity sha512-rYeIGkhm1gKBcReEkPHiV6LV2Y6BZTMGTkGw1mQIZTxfFcVJL0srLZsL1zAmLeTGxMrlDYylMQEVSYRkDnwz3A==
vue-router@^4.1.6:
version "4.1.6"
resolved "https://registry.npmjs.org/vue-router/-/vue-router-4.1.6.tgz"