@sbc-connect/nuxt-auth 0.13.0 → 0.14.0
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/CHANGELOG.md +18 -0
- package/app/app.config.ts +1 -1
- package/app/components/Connect/Header/AccountLabel.vue +3 -1
- package/app/pages/auth/account/select.vue +13 -1
- package/app/types/auth-nuxt-hooks.d.ts +2 -0
- package/i18n/locales/en-CA.ts +2 -1
- package/nuxt.config.ts +15 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-auth
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#178](https://github.com/bcgov/connect-nuxt/pull/178) [`3c8d9bf`](https://github.com/bcgov/connect-nuxt/commit/3c8d9bfdf9147d6fd6ce0dadc4b47f043feb4f4b) Thanks [@deetz99](https://github.com/deetz99)! - Fix type augmentation resolution
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`3c8d9bf`](https://github.com/bcgov/connect-nuxt/commit/3c8d9bfdf9147d6fd6ce0dadc4b47f043feb4f4b)]:
|
|
12
|
+
- @sbc-connect/nuxt-base@0.11.0
|
|
13
|
+
- @sbc-connect/nuxt-forms@0.7.6
|
|
14
|
+
|
|
15
|
+
## 0.13.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#176](https://github.com/bcgov/connect-nuxt/pull/176) [`cc88169`](https://github.com/bcgov/connect-nuxt/commit/cc88169964e9c5aa845ac2c7bec6795f6187bf32) Thanks [@deetz99](https://github.com/deetz99)! - Create account page: Add optional body text and hide back button if user has 0 accounts
|
|
20
|
+
|
|
3
21
|
## 0.13.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/app/app.config.ts
CHANGED
|
@@ -8,12 +8,14 @@ const {
|
|
|
8
8
|
username?: string
|
|
9
9
|
theme?: 'header' | 'dropdown'
|
|
10
10
|
}>()
|
|
11
|
+
|
|
12
|
+
const { locale } = useI18n()
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
<template>
|
|
14
16
|
<div class="flex items-center gap-1">
|
|
15
17
|
<UAvatar
|
|
16
|
-
:text="username[0] ? username[0].toLocaleUpperCase(
|
|
18
|
+
:text="username[0] ? username[0].toLocaleUpperCase(locale) : 'U'"
|
|
17
19
|
size="md"
|
|
18
20
|
class="text-inverted self-start sm:self-center"
|
|
19
21
|
:ui="{ root: 'bg-blue-300 rounded-none text-lg', fallback: 'text-inverted font-bold' }"
|
|
@@ -25,6 +25,12 @@ const pageTitle = computed(() =>
|
|
|
25
25
|
? $t('connect.label.existingAccountFound')
|
|
26
26
|
: $t('connect.label.sbcAccountCreation')
|
|
27
27
|
)
|
|
28
|
+
const createAccountDesc = computed(() => {
|
|
29
|
+
const desc = useNuxtApp().$i18n.tm('connect.page.createAccount.description')
|
|
30
|
+
return Array.isArray(desc) && (desc as Array<unknown>).length > 0
|
|
31
|
+
? desc
|
|
32
|
+
: []
|
|
33
|
+
})
|
|
28
34
|
|
|
29
35
|
useHead({
|
|
30
36
|
title: pageTitle
|
|
@@ -69,9 +75,14 @@ onBeforeMount(() => {
|
|
|
69
75
|
<template>
|
|
70
76
|
<UContainer class="max-w-6xl">
|
|
71
77
|
<ConnectTransitionFade>
|
|
72
|
-
<div class="space-y-
|
|
78
|
+
<div class="space-y-4 sm:space-y-6">
|
|
73
79
|
<h1>{{ pageTitle }}</h1>
|
|
74
80
|
<ConnectAccountExistingAlert v-if="showAccountList" />
|
|
81
|
+
<div v-else-if="!showAccountList && createAccountDesc.length" class="space-y-2">
|
|
82
|
+
<p v-for="text in createAccountDesc" :key="text">
|
|
83
|
+
{{ $rt(text) }}
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
75
86
|
</div>
|
|
76
87
|
</ConnectTransitionFade>
|
|
77
88
|
|
|
@@ -124,6 +135,7 @@ onBeforeMount(() => {
|
|
|
124
135
|
data-testid="create-account-button-wrapper"
|
|
125
136
|
>
|
|
126
137
|
<UButton
|
|
138
|
+
v-if="store.userAccounts.length > 0"
|
|
127
139
|
variant="outline"
|
|
128
140
|
:label="$t('connect.label.back')"
|
|
129
141
|
:disabled="isSubmitting"
|
package/i18n/locales/en-CA.ts
CHANGED
package/nuxt.config.ts
CHANGED
|
@@ -88,5 +88,20 @@ export default defineNuxtConfig({
|
|
|
88
88
|
'keycloak-js'
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// Nuxt 4 tsconfig `references` context workaround for type augmentation
|
|
94
|
+
// Forces type augmentations into the correct context
|
|
95
|
+
// https://nuxt.com/docs/4.x/guide/modules/recipes-advanced#extend-typescript-config
|
|
96
|
+
// Can also force sharedReferences, nodeReferences - and nitro references using the 'nitro:prepare:types' hook
|
|
97
|
+
hooks: {
|
|
98
|
+
'prepare:types': ({ references }) => {
|
|
99
|
+
// force `#app` augmentations
|
|
100
|
+
references.push(
|
|
101
|
+
{ path: resolve('./app/types/auth-app-config.d.ts') },
|
|
102
|
+
{ path: resolve('./app/types/auth-nuxt-hooks.d.ts') },
|
|
103
|
+
{ path: resolve('./app/types/auth-page-meta.d.ts') }
|
|
104
|
+
)
|
|
105
|
+
}
|
|
91
106
|
}
|
|
92
107
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-auth",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"typescript": "6.0.3",
|
|
13
13
|
"vue-tsc": "3.3.1",
|
|
14
14
|
"@sbc-connect/eslint-config": "0.0.8",
|
|
15
|
-
"@sbc-connect/
|
|
16
|
-
"@sbc-connect/
|
|
15
|
+
"@sbc-connect/vitest-config": "0.2.0",
|
|
16
|
+
"@sbc-connect/playwright-config": "0.2.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@pinia/colada": "1.3.0",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"keycloak-js": "26.2.4",
|
|
23
23
|
"pinia": "3.0.4",
|
|
24
24
|
"pinia-plugin-persistedstate": "4.7.1",
|
|
25
|
-
"@sbc-connect/nuxt-
|
|
26
|
-
"@sbc-connect/nuxt-
|
|
25
|
+
"@sbc-connect/nuxt-base": "0.11.0",
|
|
26
|
+
"@sbc-connect/nuxt-forms": "0.7.6"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"preinstall": "npx only-allow pnpm",
|