adminforth 1.3.38 → 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, () => {
|
|
@@ -164,14 +164,17 @@
|
|
|
164
164
|
<div class="tooltip-arrow" data-popper-arrow></div>
|
|
165
165
|
</div>
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
|
|
168
|
+
<template v-if="coreStore.resourceOptions?.pageInjections?.list?.customActionIcons">
|
|
169
|
+
<component
|
|
170
|
+
v-for="c in coreStore.resourceOptions?.pageInjections?.list?.customActionIcons"
|
|
171
|
+
:is="getCustomComponent(c)"
|
|
172
|
+
:meta="c.meta"
|
|
173
|
+
:resource="coreStore.resource"
|
|
174
|
+
:adminUser="coreStore.adminUser"
|
|
175
|
+
:record="row"
|
|
176
|
+
/>
|
|
177
|
+
</template>
|
|
175
178
|
</div>
|
|
176
179
|
</td>
|
|
177
180
|
</tr>
|
|
@@ -378,17 +381,19 @@ async function onClick(e,row) {
|
|
|
378
381
|
if (window.getSelection().toString()) return;
|
|
379
382
|
else {
|
|
380
383
|
if (e.ctrlKey || e.metaKey) {
|
|
384
|
+
|
|
381
385
|
if (row._clickUrl) {
|
|
382
386
|
window.open(row._clickUrl, '_blank');
|
|
383
387
|
} else {
|
|
384
|
-
|
|
388
|
+
window.open(
|
|
385
389
|
router.resolve({
|
|
386
390
|
name: 'resource-show',
|
|
387
391
|
params: {
|
|
388
392
|
resourceId: props.resource.resourceId,
|
|
389
393
|
primaryKey: row._primaryKeyValue,
|
|
390
394
|
},
|
|
391
|
-
})
|
|
395
|
+
}).fullPath,
|
|
396
|
+
'_blank'
|
|
392
397
|
);
|
|
393
398
|
}
|
|
394
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
|
|