@dargmuesli/nuxt-vio 3.0.0-beta.5 → 3.0.0-beta.6
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/components/vio/form/input/VioFormInput.vue +2 -2
- package/components/vio/loader/indicator/VioLoaderIndicator.vue +1 -1
- package/components/vio/loader/indicator/VioLoaderIndicatorPing.vue +1 -1
- package/locales/de.json +1 -1
- package/locales/en.json +1 -1
- package/nuxt.config.ts +1 -1
- package/package.json +1 -1
- package/types/api.d.ts +3 -1
- package/utils/networking.ts +18 -6
@@ -53,7 +53,7 @@
|
|
53
53
|
<VioFormInputIconWrapper v-if="validationProperty.$pending">
|
54
54
|
<IconHourglass
|
55
55
|
class="text-blue-600"
|
56
|
-
:title="t('
|
56
|
+
:title="t('globalStatusLoading')"
|
57
57
|
/>
|
58
58
|
</VioFormInputIconWrapper>
|
59
59
|
<VioFormInputIconWrapper
|
@@ -91,7 +91,7 @@
|
|
91
91
|
<div class="md:w-2/3">
|
92
92
|
<slot name="stateInfo" />
|
93
93
|
<VioFormInputStateInfo v-if="value?.$pending">
|
94
|
-
{{ t('
|
94
|
+
{{ t('globalStatusLoading') }}
|
95
95
|
</VioFormInputStateInfo>
|
96
96
|
</div>
|
97
97
|
<div class="md:w-1/3" />
|
package/locales/de.json
CHANGED
package/locales/en.json
CHANGED
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
package/types/api.d.ts
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
import type { CombinedError } from '@urql/core'
|
2
2
|
|
3
3
|
export type ApiData = ComputedRef<{
|
4
4
|
data?: Object
|
5
5
|
errors: BackendError[]
|
6
6
|
isFetching: boolean
|
7
7
|
}>
|
8
|
+
|
9
|
+
export type BackendError = CombinedError | { errcode: string; message: string }
|
package/utils/networking.ts
CHANGED
@@ -106,10 +106,22 @@ export const getServiceHref = ({
|
|
106
106
|
}
|
107
107
|
}
|
108
108
|
|
109
|
-
export const getTimezone = async (event: H3Event) =>
|
110
|
-
getCookie(event, TIMEZONE_COOKIE_NAME)
|
111
|
-
|
112
|
-
|
109
|
+
export const getTimezone = async (event: H3Event) => {
|
110
|
+
const timezoneCookie = getCookie(event, TIMEZONE_COOKIE_NAME)
|
111
|
+
|
112
|
+
if (timezoneCookie) {
|
113
|
+
return timezoneCookie
|
114
|
+
}
|
115
|
+
|
116
|
+
if (event.node.req.headers['x-real-ip']) {
|
117
|
+
const ipApiResult = await ofetch(
|
113
118
|
`http://ip-api.com/json/${event.node.req.headers['x-real-ip']}`,
|
114
|
-
)
|
115
|
-
|
119
|
+
).catch(() => {})
|
120
|
+
|
121
|
+
if (ipApiResult) {
|
122
|
+
return ipApiResult.timezone
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
return undefined
|
127
|
+
}
|