@nuxt-customer-portal/core 0.8.9 → 0.10.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 +20 -0
- package/app/composables/useOrganization.ts +1 -1
- package/app/composables/useUserStore.ts +1 -1
- package/i18n/locales/en.json +4 -2
- package/i18n/locales/nl.json +4 -2
- package/package.json +1 -1
- package/portal.manifest.mjs +1 -1
- package/server/middleware/auth.ts +2 -2
- package/server/utils/public-api-route.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @nuxt-customer-portal/core
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f115496: Remove the redundant My Organizations and Settings links from the main navigation. Label the remaining account settings link Account Settings in both the mobile user menu and desktop avatar menu, with English and Dutch translations.
|
|
8
|
+
|
|
9
|
+
## 0.9.1
|
|
10
|
+
|
|
11
|
+
## 0.9.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Avoid generated API route type-inference limits when updating organizations.
|
|
16
|
+
|
|
17
|
+
- 936f0a2: Add an authenticated store media library with Studio-style image editing, batch review, independent thumbnails, retained originals, and scoped API-key access using existing storage providers. Product images remain unchanged.
|
|
18
|
+
|
|
19
|
+
Support configurable store media variants with automatic generation, independent custom crops, and preset changes applied when each image is next saved. Existing thumbnails migrate as custom sources and product image policies remain unchanged.
|
|
20
|
+
|
|
21
|
+
- 6696fd0: Add an opt-in unified sidebar with nested module navigation and keyboard-accessible collapsed flyouts. Include module subpages in global search, preserve standalone destinations, and place sidebar collapse controls in the footer. Enable the unified layout for SaaS Portal.
|
|
22
|
+
|
|
3
23
|
## 0.8.9
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -39,7 +39,7 @@ export const useOrganization = () => {
|
|
|
39
39
|
organizationId: string,
|
|
40
40
|
data: { name: string; slug: string; officialCompanyName: string; logo: string; avatarLogo?: string }
|
|
41
41
|
) => {
|
|
42
|
-
return await $fetch<Organization>(`/api/admin/organizations/${organizationId}`, {
|
|
42
|
+
return await $fetch<Organization, string>(`/api/admin/organizations/${organizationId}`, {
|
|
43
43
|
method: 'PATCH',
|
|
44
44
|
body: data
|
|
45
45
|
})
|
|
@@ -197,7 +197,7 @@ export const useUserStore = defineStore('user', () => {
|
|
|
197
197
|
|
|
198
198
|
// console.log('Fetching user permissions from API for user:', currentUser.value.id)
|
|
199
199
|
try {
|
|
200
|
-
const data = await $fetch<PermissionsResponse>('/api/auth/permissions')
|
|
200
|
+
const data = await $fetch<PermissionsResponse, string>('/api/auth/permissions')
|
|
201
201
|
if (data) {
|
|
202
202
|
permissions.value = data.permissions
|
|
203
203
|
role.value = data.role
|
package/i18n/locales/en.json
CHANGED
|
@@ -47,9 +47,11 @@
|
|
|
47
47
|
"module": "Module",
|
|
48
48
|
"dashboard": "Dashboard",
|
|
49
49
|
"settings": {
|
|
50
|
-
"title": "Settings"
|
|
50
|
+
"title": "Account Settings"
|
|
51
51
|
},
|
|
52
|
-
"logout": "Log Out"
|
|
52
|
+
"logout": "Log Out",
|
|
53
|
+
"searchDescription": "Find a page in your workspace.",
|
|
54
|
+
"searchPages": "Search pages…"
|
|
53
55
|
},
|
|
54
56
|
"dashboard": {
|
|
55
57
|
"title": "Dashboard",
|
package/i18n/locales/nl.json
CHANGED
|
@@ -47,9 +47,11 @@
|
|
|
47
47
|
"module": "Module",
|
|
48
48
|
"dashboard": "Dashboard",
|
|
49
49
|
"settings": {
|
|
50
|
-
"title": "
|
|
50
|
+
"title": "Accountinstellingen"
|
|
51
51
|
},
|
|
52
|
-
"logout": "Uitloggen"
|
|
52
|
+
"logout": "Uitloggen",
|
|
53
|
+
"searchDescription": "Vind een pagina in uw werkruimte.",
|
|
54
|
+
"searchPages": "Zoek pagina’s…"
|
|
53
55
|
},
|
|
54
56
|
"dashboard": {
|
|
55
57
|
"title": "Dashboard",
|
package/package.json
CHANGED
package/portal.manifest.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEventHandler, type H3Event, createError } from 'h3'
|
|
2
2
|
import { auth } from '../utils/auth'
|
|
3
|
-
import { isPublicStoreRoute } from '../utils/public-api-route'
|
|
3
|
+
import { isMediaLibraryRoute, isPublicStoreRoute } from '../utils/public-api-route'
|
|
4
4
|
import { isPublicInvitationRoute } from '../utils/public-invitation-route'
|
|
5
5
|
|
|
6
6
|
async function isAuthenticated(event: H3Event): Promise<boolean> {
|
|
@@ -21,7 +21,7 @@ export default defineEventHandler(async (event) => {
|
|
|
21
21
|
}
|
|
22
22
|
// Products routes implement their own catalog-key, signature, or public-entry checks.
|
|
23
23
|
const pathname = new URL(url, 'http://localhost').pathname
|
|
24
|
-
if (isPublicStoreRoute(event.method, pathname)) {
|
|
24
|
+
if (isPublicStoreRoute(event.method, pathname) || isMediaLibraryRoute(event.method, pathname)) {
|
|
25
25
|
return
|
|
26
26
|
}
|
|
27
27
|
if (isPublicInvitationRoute(event.method, pathname)) {
|
|
@@ -19,3 +19,11 @@ export function isPublicStoreRoute(method: string, pathname: string) {
|
|
|
19
19
|
(method === 'DELETE' && pathname === '/api/store/planning/hold')
|
|
20
20
|
)
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
// Media endpoints authenticate administrator sessions or scoped API keys themselves.
|
|
24
|
+
export function isMediaLibraryRoute(method: string, pathname: string) {
|
|
25
|
+
if (!['GET', 'POST', 'PUT', 'DELETE'].includes(method)) {
|
|
26
|
+
return false
|
|
27
|
+
}
|
|
28
|
+
return pathname === '/api/products/media' || pathname.startsWith('/api/products/media/')
|
|
29
|
+
}
|