@dargmuesli/nuxt-vio 3.0.0-beta.2 → 3.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.config.ts +34 -33
- package/components/vio/_/VioApp.vue +12 -3
- package/components/vio/_/VioLink.vue +2 -2
- package/components/vio/page/VioPageLegalNotice.vue +9 -7
- package/components/vio/page/VioPagePrivacyPolicy.vue +18 -11
- package/composables/useAppLayout.ts +11 -17
- package/composables/useFavicons.ts +3 -31
- package/composables/useGetServiceHref.ts +2 -28
- package/composables/useHeadDefault.ts +13 -26
- package/nuxt.config.ts +17 -12
- package/package.json +10 -11
- package/store/auth.ts +32 -0
- package/types/api.d.ts +7 -0
- package/types/fetch.d.ts +8 -0
- package/types/modules/gql.d.ts +6 -0
- package/types/modules/graphql.d.ts +6 -0
- package/utils/constants.ts +1 -0
- package/utils/networking.ts +26 -0
- package/LICENSE +0 -674
package/utils/constants.ts
CHANGED
package/utils/networking.ts
CHANGED
@@ -80,6 +80,32 @@ export const getHost = (req: IncomingMessage) => {
|
|
80
80
|
return req.headers.host
|
81
81
|
}
|
82
82
|
|
83
|
+
export const getServiceHref = ({
|
84
|
+
host,
|
85
|
+
isSsr = true,
|
86
|
+
name,
|
87
|
+
port,
|
88
|
+
stagingHost,
|
89
|
+
}: {
|
90
|
+
host: string
|
91
|
+
isSsr?: boolean
|
92
|
+
name?: string
|
93
|
+
port?: number
|
94
|
+
stagingHost?: string
|
95
|
+
}) => {
|
96
|
+
const nameSubdomain = name?.replaceAll('_', '-')
|
97
|
+
const nameSubdomainString = nameSubdomain ? `${nameSubdomain}.` : ''
|
98
|
+
const portString = port ? `:${port}` : ''
|
99
|
+
|
100
|
+
if (stagingHost) {
|
101
|
+
return `https://${nameSubdomainString}${stagingHost}`
|
102
|
+
} else if (isSsr && process.server) {
|
103
|
+
return `http://${name}${portString}`
|
104
|
+
} else {
|
105
|
+
return `https://${nameSubdomainString}${getDomainTldPort(host)}`
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
83
109
|
export const getTimezone = async (event: H3Event) =>
|
84
110
|
getCookie(event, TIMEZONE_COOKIE_NAME) ||
|
85
111
|
(
|