@live-change/user-frontend 0.9.183 → 0.9.185

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.
@@ -40,6 +40,7 @@
40
40
  "authenticationCanceled": "Authentication canceled by user",
41
41
  "authenticationError": "Error during authentication",
42
42
  "goBack": "Go back",
43
+ "goToConnected": "Go to connected accounts",
43
44
  "tryAgain": "Try again",
44
45
  "confirmEmail": "Confirm email",
45
46
  "confirmPhone": "Confirm phone",
@@ -238,9 +239,11 @@
238
239
  "emailTakenLink": "connected accounts page",
239
240
  "invalidGrant": "Invalid grant. Please try again. You may used this link before, or google authentication failed.",
240
241
  "connectedToAnotherUser": "This account is already connected to another user. Please sign in with your email address or google account.",
242
+ "alreadyConnected": "This Google account is already added to your account. You can check connected accounts in settings.",
241
243
  "emailAlreadyInUse": "Email is already in use",
242
244
  "invalidGrantToast": "Invalid grant",
243
245
  "connectedToAnotherUserToast": "Connected to another user",
246
+ "alreadyConnectedToast": "Account already added",
244
247
  "errorToast": "Error during google authentication"
245
248
  },
246
249
  "linkedinAuth": {
@@ -40,6 +40,7 @@
40
40
  "authenticationCanceled": "Uwierzytelnianie anulowane przez użytkownika",
41
41
  "authenticationError": "Błąd podczas uwierzytelniania",
42
42
  "goBack": "Wróć",
43
+ "goToConnected": "Przejdź do połączonych kont",
43
44
  "tryAgain": "Spróbuj ponownie",
44
45
  "confirmEmail": "Potwierdź email",
45
46
  "confirmPhone": "Potwierdź telefon",
@@ -238,9 +239,11 @@
238
239
  "emailTakenLink": "strony połączonych kont",
239
240
  "invalidGrant": "Nieprawidłowy grant. Spróbuj ponownie. Możesz użyć tego linku wcześniej lub uwierzytelnianie Google nie powiodło się.",
240
241
  "connectedToAnotherUser": "To konto jest już połączone z innym użytkownikiem. Zaloguj się swoim adresem email lub kontem Google.",
242
+ "alreadyConnected": "To konto Google jest już dodane do Twojego konta. Możesz sprawdzić połączone konta w ustawieniach.",
241
243
  "emailAlreadyInUse": "Email jest już w użyciu",
242
244
  "invalidGrantToast": "Nieprawidłowy grant",
243
245
  "connectedToAnotherUserToast": "Połączone z innym użytkownikiem",
246
+ "alreadyConnectedToast": "Konto już dodane",
244
247
  "errorToast": "Błąd podczas uwierzytelniania Google"
245
248
  },
246
249
  "linkedinAuth": {
@@ -31,8 +31,6 @@
31
31
  import { useI18n } from 'vue-i18n'
32
32
  const { locale: i18nLocale, t } = useI18n()
33
33
 
34
- console.log("T", t)
35
-
36
34
  import { useApi } from '@live-change/vue3-ssr'
37
35
  const api = useApi()
38
36
  const {
@@ -44,8 +42,6 @@
44
42
  to: contact
45
43
  }
46
44
 
47
- console.log("CLIENT", api.client.value)
48
-
49
45
  import { useRouter } from 'vue-router'
50
46
  const router = useRouter()
51
47
 
@@ -43,6 +43,16 @@
43
43
  {{ t('googleAuth.connectedToAnotherUser') }}
44
44
  </div>
45
45
  </div>
46
+ <div v-else-if="state === 'alreadyConnected'" class="text-center">
47
+ <div>
48
+ {{ t('googleAuth.alreadyConnected') }}
49
+ <div class="flex flex-row mt-4 justify-center">
50
+ <router-link :to="{ name: 'user:connected' }">
51
+ <Button :label="t('auth.goToConnected')" icon="pi pi-arrow-left" class="w-full p-button-secondary mb-1" />
52
+ </router-link>
53
+ </div>
54
+ </div>
55
+ </div>
46
56
  <div v-else>
47
57
  {{ t('googleAuth.unknownState', { state }) }}
48
58
  </div>
@@ -123,11 +133,16 @@
123
133
  state.value = 'invalidGrant'
124
134
  return
125
135
  }
126
- if(err === 'connectedToAnotherUser') {
136
+ if(err === 'connectedToAnotherUser' || err === 'alreadyConnectedElsewhere') {
127
137
  toast.add({ severity: 'error', summary: t('common.error'), detail: t('googleAuth.connectedToAnotherUserToast'), life: 3000 })
128
138
  state.value = 'connectedToAnotherUser'
129
139
  return
130
140
  }
141
+ if(err === 'alreadyConnected') {
142
+ toast.add({ severity: 'error', summary: t('common.error'), detail: t('googleAuth.alreadyConnectedToast'), life: 3000 })
143
+ state.value = 'alreadyConnected'
144
+ return
145
+ }
131
146
  console.error("Google auth error", err)
132
147
  toast.add({ severity: 'error', summary: t('common.error'), detail: t('googleAuth.errorToast'), life: 3000 })
133
148
  state.value = 'error'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.9.183",
3
+ "version": "0.9.185",
4
4
  "scripts": {
5
5
  "memDev": "tsx --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "tsx server/start.js localDev --enableSessions --initScript ./init.js --dbAccess",
@@ -36,29 +36,29 @@
36
36
  },
37
37
  "type": "module",
38
38
  "dependencies": {
39
- "@live-change/cli": "^0.9.183",
40
- "@live-change/dao": "^0.9.183",
41
- "@live-change/dao-vue3": "^0.9.183",
42
- "@live-change/dao-websocket": "^0.9.183",
43
- "@live-change/email-service": "^0.9.183",
44
- "@live-change/framework": "^0.9.183",
45
- "@live-change/identicon-service": "^0.9.183",
46
- "@live-change/image-frontend": "^0.9.183",
47
- "@live-change/message-authentication-service": "^0.9.183",
48
- "@live-change/notification-service": "^0.9.183",
49
- "@live-change/password-authentication-service": "^0.9.183",
50
- "@live-change/pattern": "^0.9.183",
51
- "@live-change/secret-code-service": "^0.9.183",
52
- "@live-change/secret-link-service": "^0.9.183",
53
- "@live-change/security-frontend": "^0.9.183",
54
- "@live-change/security-service": "^0.9.183",
55
- "@live-change/session-service": "^0.9.183",
56
- "@live-change/timer-service": "^0.9.183",
57
- "@live-change/upload-service": "^0.9.183",
58
- "@live-change/user-identification-service": "^0.9.183",
59
- "@live-change/user-service": "^0.9.183",
60
- "@live-change/vue3-components": "^0.9.183",
61
- "@live-change/vue3-ssr": "^0.9.183",
39
+ "@live-change/cli": "^0.9.185",
40
+ "@live-change/dao": "^0.9.185",
41
+ "@live-change/dao-vue3": "^0.9.185",
42
+ "@live-change/dao-websocket": "^0.9.185",
43
+ "@live-change/email-service": "^0.9.185",
44
+ "@live-change/framework": "^0.9.185",
45
+ "@live-change/identicon-service": "^0.9.185",
46
+ "@live-change/image-frontend": "^0.9.185",
47
+ "@live-change/message-authentication-service": "^0.9.185",
48
+ "@live-change/notification-service": "^0.9.185",
49
+ "@live-change/password-authentication-service": "^0.9.185",
50
+ "@live-change/pattern": "^0.9.185",
51
+ "@live-change/secret-code-service": "^0.9.185",
52
+ "@live-change/secret-link-service": "^0.9.185",
53
+ "@live-change/security-frontend": "^0.9.185",
54
+ "@live-change/security-service": "^0.9.185",
55
+ "@live-change/session-service": "^0.9.185",
56
+ "@live-change/timer-service": "^0.9.185",
57
+ "@live-change/upload-service": "^0.9.185",
58
+ "@live-change/user-identification-service": "^0.9.185",
59
+ "@live-change/user-service": "^0.9.185",
60
+ "@live-change/vue3-components": "^0.9.185",
61
+ "@live-change/vue3-ssr": "^0.9.185",
62
62
  "@vueuse/core": "^12.3.0",
63
63
  "codeceptjs-assert": "^0.0.5",
64
64
  "codeceptjs-video-helper": "0.1.3",
@@ -79,7 +79,7 @@
79
79
  "wtfnode": "^0.9.1"
80
80
  },
81
81
  "devDependencies": {
82
- "@live-change/codeceptjs-helper": "^0.9.183",
82
+ "@live-change/codeceptjs-helper": "^0.9.185",
83
83
  "codeceptjs": "^3.6.10",
84
84
  "generate-password": "1.7.1",
85
85
  "playwright": "1.49.1",
@@ -90,5 +90,5 @@
90
90
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
91
91
  "license": "BSD-3-Clause",
92
92
  "description": "",
93
- "gitHead": "a61bc04560d627571a9c511b29b22357800e4927"
93
+ "gitHead": "f8f4caa3498f2dc1229e17adc1a3024dbb772b25"
94
94
  }