@dargmuesli/nuxt-vio 5.0.2 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
  <div :data-is-loading="isLoading" data-testid="is-loading">
3
3
  <NuxtLayout>
4
4
  <!-- `NuxtLayout` can't have mulitple child nodes (https://github.com/nuxt/nuxt/issues/21759) -->
5
- <NuxtPage :site-description="siteDescriptionProp" />
5
+ <NuxtPage />
6
6
  </NuxtLayout>
7
7
  </div>
8
8
  </template>
@@ -11,18 +11,17 @@
11
11
  export interface Props {
12
12
  ogImageAlt: string
13
13
  ogImageComponent?: string
14
- siteDescription: string
15
14
  }
16
15
  const props = withDefaults(defineProps<Props>(), {
17
16
  ogImageComponent: undefined,
18
17
  })
19
18
  const ogImageAltProp = toRef(() => props.ogImageAlt)
20
19
  const ogImageComponentProp = toRef(() => props.ogImageComponent)
21
- const siteDescriptionProp = toRef(() => props.siteDescription)
22
20
 
23
21
  const { $dayjs } = useNuxtApp()
24
22
  const { locale } = useI18n()
25
23
  const cookieControl = useCookieControl()
24
+ const siteConfig = useSiteConfig()
26
25
 
27
26
  const { loadingIds, indicateLoadingDone } = useLoadingDoneIndicator('app')
28
27
 
@@ -61,9 +60,6 @@ watch(
61
60
  )
62
61
 
63
62
  // initialization
64
- updateSiteConfig({
65
- description: siteDescriptionProp.value,
66
- })
67
63
  defineOgImage({
68
64
  alt: ogImageAltProp.value,
69
65
  component: ogImageComponentProp.value,
@@ -73,7 +69,7 @@ useFavicons()
73
69
  usePolyfills()
74
70
  useSchemaOrg([
75
71
  defineWebSite({
76
- description: siteDescriptionProp,
72
+ description: siteConfig.description,
77
73
  }),
78
74
  ])
79
75
  init()
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <h1>{{ `${statusCode} - ${statusReason}` }}</h1>
3
+ <h1>{{ `${statusCode ? `${statusCode} - ` : ''}${statusReason}` }}</h1>
4
4
  <div>
5
5
  {{ description }}
6
6
  </div>
@@ -15,12 +15,13 @@
15
15
  import { status } from '@http-util/status-i18n'
16
16
 
17
17
  export interface Props {
18
- statusCode: number
18
+ statusCode?: number
19
19
  statusMessage?: string
20
20
  description: string
21
21
  stack?: string
22
22
  }
23
23
  const props = withDefaults(defineProps<Props>(), {
24
+ statusCode: undefined,
24
25
  statusMessage: undefined,
25
26
  stack: undefined,
26
27
  })
@@ -8,14 +8,13 @@ export const useHeadDefault = ({
8
8
  extension?: UseSeoMetaInput
9
9
  title: string | ComputedRef<string>
10
10
  }) => {
11
- const attrs = useAttrs()
12
11
  const siteConfig = useSiteConfig()
13
12
 
14
13
  const defaults: UseSeoMetaInput = {
15
- description: attrs['site-description'] as string, // TODO: remove (https://github.com/harlan-zw/nuxt-site-config/pull/7)
14
+ description: siteConfig.description,
16
15
  msapplicationConfig: `/assets/static/favicon/browserconfig.xml?v=${CACHE_VERSION}`,
17
16
  title,
18
- twitterDescription: attrs['site-description'] as string,
17
+ twitterDescription: siteConfig.description,
19
18
  twitterTitle: ref(
20
19
  TITLE_TEMPLATE({
21
20
  siteName: siteConfig.name,
package/locales/de.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "globalPlaceholderUrl": "https://websei.te",
3
+ "globalSeoSiteDescription": "Vio ist {'@'}dargmueslis Nuxt layer.",
3
4
  "globalStatusError": "Fehler",
4
5
  "globalStatusLoading": "Lade...",
5
6
  "globalValidationFailed": "Bitte überprüfe deine Eingaben 🙈",
package/locales/en.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "globalPlaceholderUrl": "https://websi.te",
3
+ "globalSeoSiteDescription": "Vio is {'@'}dargmuesli's Nuxt layer.",
3
4
  "globalStatusError": "Error",
4
5
  "globalStatusLoading": "Loading...",
5
6
  "globalValidationFailed": "Please check your input 🙈",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-vio",
3
- "version": "5.0.2",
3
+ "version": "6.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dargmuesli/vio.git"
@@ -75,9 +75,9 @@
75
75
  "@nuxtjs/html-validator": "1.5.2",
76
76
  "@nuxtjs/i18n": "8.0.0-rc.4",
77
77
  "@nuxtjs/tailwindcss": "6.8.0",
78
- "@nuxtseo/module": "2.0.0-beta.29",
78
+ "@nuxtseo/module": "2.0.0-beta.30",
79
79
  "@pinia/nuxt": "0.4.11",
80
- "@playwright/test": "1.37.1",
80
+ "@playwright/test": "1.38.0",
81
81
  "@tailwindcss/forms": "0.5.6",
82
82
  "@tailwindcss/typography": "0.5.10",
83
83
  "@types/cookie": "0.5.2",
@@ -92,33 +92,33 @@
92
92
  "cookie": "0.5.0",
93
93
  "cross-env": "7.0.3",
94
94
  "dayjs": "2.0.0-alpha.4",
95
+ "eslint": "8.49.0",
95
96
  "eslint-config-prettier": "9.0.0",
96
97
  "eslint-plugin-compat": "4.2.0",
97
98
  "eslint-plugin-nuxt": "4.0.0",
98
99
  "eslint-plugin-prettier": "5.0.0",
99
100
  "eslint-plugin-yml": "1.9.0",
100
- "eslint": "8.49.0",
101
101
  "is-https": "4.0.0",
102
102
  "jiti": "1.20.0",
103
103
  "jose": "4.14.6",
104
104
  "lint-staged": "14.0.1",
105
105
  "lodash-es": "4.17.21",
106
- "nuxt": "3.7.2",
106
+ "nuxt": "3.7.3",
107
107
  "pinia": "2.1.6",
108
- "prettier-plugin-tailwindcss": "0.5.4",
109
108
  "prettier": "3.0.3",
109
+ "prettier-plugin-tailwindcss": "0.5.4",
110
110
  "serve": "14.2.1",
111
+ "stylelint": "15.10.3",
111
112
  "stylelint-config-recommended-vue": "1.5.0",
112
113
  "stylelint-config-standard": "34.0.0",
113
114
  "stylelint-no-unsupported-browser-features": "7.0.0",
114
- "stylelint": "15.10.3",
115
115
  "sweetalert2": "11.7.27",
116
116
  "tailwindcss": "3.3.3",
117
+ "vue": "3.3.4",
117
118
  "vue-gtag": "2.0.1",
118
- "vue-tsc": "1.8.11",
119
- "vue": "3.3.4"
119
+ "vue-tsc": "1.8.11"
120
120
  },
121
121
  "peerDependencies": {
122
- "playwright-core": "1.37.1"
122
+ "playwright-core": "1.38.0"
123
123
  }
124
124
  }
@@ -0,0 +1,7 @@
1
+ export default defineNuxtPlugin((nuxtApp) => {
2
+ const { t } = nuxtApp.vueApp.$nuxt.$i18n
3
+
4
+ updateSiteConfig({
5
+ description: t('globalSeoSiteDescription'),
6
+ })
7
+ })