qarpeo 0.1.6 → 0.1.7
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/dist/module.mjs +1 -1
- package/dist/runtime/server/utils/cms.mjs +10 -5
- package/package.json +1 -1
package/dist/module.mjs
CHANGED
|
@@ -3123,6 +3123,7 @@ export async function getCMSNavigationTree(event, collectionId, options) {
|
|
|
3123
3123
|
const isSubFeature = Boolean(
|
|
3124
3124
|
subFeatureKey && (segments.length >= 4 || segments.length === 3 && meta._isIndex && meta._nav?.title && meta._nav.title !== "Features")
|
|
3125
3125
|
);
|
|
3126
|
+
const itemOrder = meta._isIndex ? 0 : typeof meta.navigation?.order === "number" ? meta.navigation.order : typeof meta.order === "number" ? meta.order : r.order ? isSubFeature ? r.order % 100 : r.order % 1e3 : 500;
|
|
3126
3127
|
let targetParent = section;
|
|
3127
3128
|
if (isSubFeature && subFeatureKey) {
|
|
3128
3129
|
const subFeaturePath = `/${segments[0]}/${segments[1]}/${subFeatureKey}`;
|
|
@@ -3163,7 +3164,7 @@ export async function getCMSNavigationTree(event, collectionId, options) {
|
|
|
3163
3164
|
title: itemTitle,
|
|
3164
3165
|
path: entryPath,
|
|
3165
3166
|
icon: meta.navigation?.icon || meta._nav?.icon,
|
|
3166
|
-
_groupOrder:
|
|
3167
|
+
_groupOrder: itemOrder
|
|
3167
3168
|
});
|
|
3168
3169
|
continue;
|
|
3169
3170
|
}
|
|
@@ -3187,7 +3188,8 @@ export async function getCMSNavigationTree(event, collectionId, options) {
|
|
|
3187
3188
|
gi.children.push({
|
|
3188
3189
|
title: itemTitle,
|
|
3189
3190
|
path: entryPath,
|
|
3190
|
-
icon: meta.navigation?.icon || meta._nav?.icon
|
|
3191
|
+
icon: meta.navigation?.icon || meta._nav?.icon,
|
|
3192
|
+
_groupOrder: itemOrder
|
|
3191
3193
|
});
|
|
3192
3194
|
continue;
|
|
3193
3195
|
}
|
|
@@ -3205,7 +3207,8 @@ export async function getCMSNavigationTree(event, collectionId, options) {
|
|
|
3205
3207
|
targetParent.children.push({
|
|
3206
3208
|
title: itemTitle,
|
|
3207
3209
|
path: entryPath,
|
|
3208
|
-
icon: meta.navigation?.icon || meta._nav?.icon
|
|
3210
|
+
icon: meta.navigation?.icon || meta._nav?.icon,
|
|
3211
|
+
_groupOrder: itemOrder
|
|
3209
3212
|
});
|
|
3210
3213
|
} else {
|
|
3211
3214
|
const subGroupKey = segments.slice(0, segments.length - 1).join("/");
|
|
@@ -3229,7 +3232,8 @@ export async function getCMSNavigationTree(event, collectionId, options) {
|
|
|
3229
3232
|
subGroup.children.push({
|
|
3230
3233
|
title: itemTitle,
|
|
3231
3234
|
path: entryPath,
|
|
3232
|
-
icon: meta.navigation?.icon || meta._nav?.icon
|
|
3235
|
+
icon: meta.navigation?.icon || meta._nav?.icon,
|
|
3236
|
+
_groupOrder: itemOrder
|
|
3233
3237
|
});
|
|
3234
3238
|
}
|
|
3235
3239
|
}
|
|
@@ -3238,7 +3242,8 @@ export async function getCMSNavigationTree(event, collectionId, options) {
|
|
|
3238
3242
|
targetParent.children.unshift({
|
|
3239
3243
|
title: itemTitle,
|
|
3240
3244
|
path: entryPath,
|
|
3241
|
-
icon: meta.navigation?.icon || meta._nav?.icon
|
|
3245
|
+
icon: meta.navigation?.icon || meta._nav?.icon,
|
|
3246
|
+
_groupOrder: itemOrder
|
|
3242
3247
|
});
|
|
3243
3248
|
}
|
|
3244
3249
|
}
|