adminforth 1.3.39 → 1.3.40
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/package.json
CHANGED
package/spa/src/App.vue
CHANGED
|
@@ -313,16 +313,21 @@ function handleCustomLayout() {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
function humanizeSnake(str: string): string {
|
|
317
|
+
if (!str) {
|
|
318
|
+
return '';
|
|
319
|
+
}
|
|
320
|
+
return str.split('_').map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
321
|
+
}
|
|
316
322
|
|
|
317
|
-
|
|
318
|
-
watch(route, () => {
|
|
323
|
+
watch([route, () => coreStore.resourceById], async () => {
|
|
319
324
|
handleCustomLayout()
|
|
320
|
-
|
|
325
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
326
|
+
const resourceTitle = coreStore.resourceById[route.params?.resourceId as string]?.label || humanizeSnake(Object.values(route.params)[0] as string);
|
|
327
|
+
title.value = `${coreStore.config?.title || coreStore.config?.brandName || 'Adminforth'} | ${ resourceTitle || route.meta.title || ' '}`;
|
|
321
328
|
useHead({
|
|
322
329
|
title: title.value,
|
|
323
330
|
})
|
|
324
|
-
|
|
325
|
-
|
|
326
331
|
});
|
|
327
332
|
|
|
328
333
|
watch (()=>coreStore.menu, () => {
|
|
@@ -381,17 +381,19 @@ async function onClick(e,row) {
|
|
|
381
381
|
if (window.getSelection().toString()) return;
|
|
382
382
|
else {
|
|
383
383
|
if (e.ctrlKey || e.metaKey) {
|
|
384
|
+
|
|
384
385
|
if (row._clickUrl) {
|
|
385
386
|
window.open(row._clickUrl, '_blank');
|
|
386
387
|
} else {
|
|
387
|
-
|
|
388
|
+
window.open(
|
|
388
389
|
router.resolve({
|
|
389
390
|
name: 'resource-show',
|
|
390
391
|
params: {
|
|
391
392
|
resourceId: props.resource.resourceId,
|
|
392
393
|
primaryKey: row._primaryKeyValue,
|
|
393
394
|
},
|
|
394
|
-
})
|
|
395
|
+
}).fullPath,
|
|
396
|
+
'_blank'
|
|
395
397
|
);
|
|
396
398
|
}
|
|
397
399
|
} else {
|
package/spa/src/index.scss
CHANGED
|
@@ -1442,7 +1442,7 @@ export class Sorts {
|
|
|
1442
1442
|
export interface IOperationalResource {
|
|
1443
1443
|
get: (filter: IAdminForthFilter | IAdminForthFilter[]) => Promise<any | null>;
|
|
1444
1444
|
|
|
1445
|
-
list: (filter: IAdminForthFilter | IAdminForthFilter[], limit
|
|
1445
|
+
list: (filter: IAdminForthFilter | IAdminForthFilter[], limit?: number, offset?: number, sort?: IAdminForthSort | IAdminForthSort[]) => Promise<any[]>;
|
|
1446
1446
|
|
|
1447
1447
|
count: (filter: IAdminForthFilter | IAdminForthFilter[] | undefined) => Promise<number>;
|
|
1448
1448
|
|