Browse Source

feat(gui-v2): set meta title in layout

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
pull/2716/head
Braks 2 years ago committed by Pranav C
parent
commit
743f1047b2
  1. 12
      packages/nc-gui-v2/layouts/default.vue
  2. 22
      packages/nc-gui-v2/nuxt.config.ts
  3. 2
      packages/nc-gui-v2/pages/signin.vue

12
packages/nc-gui-v2/layouts/default.vue

@ -1,3 +1,15 @@
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
import { useHead, useRoute } from '#imports'
const route = useRoute()
const { t } = useI18n()
useHead({
title: `${t(route.meta.title as string)} | NocoDB`,
})
</script>
<script lang="ts">
export default {
name: 'Default',

22
packages/nc-gui-v2/nuxt.config.ts

@ -22,11 +22,25 @@ export default defineNuxtConfig({
meta: {
title: 'NocoDB',
description: 'NocoDB GUI V2',
titleTemplate: (titleChunk: string) => {
// If undefined or blank then we don't need the hyphen
return titleChunk ? `${titleChunk} - NocoDB` : 'NocoDB'
link: [
{
rel: 'icon',
type: 'image/x-icon',
href: './favicon-32.png',
},
],
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || '',
},
],
},
vite: {

2
packages/nc-gui-v2/pages/signin.vue

@ -13,10 +13,10 @@ const { t } = useI18n()
definePageMeta({
requiresAuth: false,
title: 'title.headLogin',
})
useHead({
title: t('title.headLogin'),
meta: [
{
hid: t('msg.info.loginMsg'),

Loading…
Cancel
Save