@fy-/fws-vue 2.2.64 → 2.2.65

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.
@@ -237,25 +237,19 @@ onMounted(async () => {
237
237
 
238
238
  <!-- OAuth providers section -->
239
239
  <div v-if="hasOauth && !showEmail" class="fws-login__oauth space-y-3">
240
- <div
241
- v-for="field of responseFields"
242
- v-show="field.type && field.type === 'oauth2' && field.button"
243
- :key="field.id"
244
- >
245
- <button
246
- type="button"
240
+ <template v-for="field of responseFields" :key="field.id">
241
+ <a
242
+ v-if="field.type && field.type === 'oauth2' && field.button"
243
+ href="javascript:void(0);"
247
244
  class="flex w-full items-center justify-start gap-3 px-4 py-2.5 rounded-lg border border-fv-neutral-200 dark:border-fv-neutral-700
248
245
  transition-all duration-200 hover:shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-fv-neutral-800
249
246
  focus:ring-fv-primary-500 dark:focus:ring-fv-primary-600"
250
- :style="`background: ${
251
- field.button['background-color']
252
- }; color: ${$getContrastingTextColor(
253
- field.button['background-color'],
254
- )}`"
255
- :aria-label="`${$t('user_flow_signin_with', { provider: field.name })}`"
247
+ :style="field.button && field.button['background-color']
248
+ ? `background: ${field.button['background-color']}; color: ${$getContrastingTextColor(field.button['background-color'])}`
249
+ : ''"
256
250
  @click="
257
251
  () => {
258
- if (field.info.Button_Extra?.trigger) {
252
+ if (field.info && field.info.Button_Extra && field.info.Button_Extra.trigger) {
259
253
  doTrigger(field);
260
254
  }
261
255
  else {
@@ -265,16 +259,17 @@ onMounted(async () => {
265
259
  "
266
260
  >
267
261
  <img
262
+ v-if="field.button && field.button.logo"
268
263
  :key="`${field.label}oauth`"
269
264
  class="h-6 w-6 flex-shrink-0"
270
- :alt="field.info.Name"
265
+ :alt="field.info && field.info.Name ? field.info.Name : ''"
271
266
  :src="field.button.logo"
272
267
  >
273
268
  <span class="text-base font-medium">
274
269
  {{ $t("user_flow_signin_with", { provider: field.name }) }}
275
270
  </span>
276
- </button>
277
- </div>
271
+ </a>
272
+ </template>
278
273
 
279
274
  <div class="relative my-6">
280
275
  <div class="absolute inset-0 flex items-center">
@@ -429,6 +424,7 @@ onMounted(async () => {
429
424
  @apply transition-all duration-300;
430
425
  }
431
426
 
427
+ .fws-login__oauth a,
432
428
  .fws-login__oauth button,
433
429
  .fws-login__form button[type="submit"] {
434
430
  @apply transition-all duration-200;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.2.64",
3
+ "version": "2.2.65",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",