adminforth 2.55.3 → 2.55.4-next.1

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.
@@ -3,7 +3,6 @@ import { callAdminForthApi } from '@/utils';
3
3
  import { type AdminForthResourceFrontend } from '../types/Common';
4
4
  import { useAdminforth } from '@/adminforth';
5
5
  import { showErrorTost } from '@/composables/useFrontendApi'
6
- import { useI18n } from 'vue-i18n';
7
6
 
8
7
  let getResourceDataLastAbortController: AbortController | null = null;
9
8
  export async function getList(resource: AdminForthResourceFrontend, isPageLoaded: boolean, page: number | null , pageSize: number, sort: any, checkboxes:{ value: any[] }, filters: any = [] ) {
@@ -55,15 +54,14 @@ export async function getList(resource: AdminForthResourceFrontend, isPageLoaded
55
54
 
56
55
 
57
56
  export async function startBulkAction(actionId: string, resource: AdminForthResourceFrontend, checkboxes: { value: any[] },
58
- bulkActionLoadingStates: {value: Record<string, boolean>}, getListInner: () => Promise<any>) {
57
+ bulkActionLoadingStates: {value: Record<string, boolean>}, getListInner: () => Promise<any>, t: (key: string, vars?: Record<string, any>) => string) {
59
58
  const action = resource?.options?.bulkActions?.find(a => a.id === actionId);
60
59
  const { confirm, alert } = useAdminforth();
61
- const { t } = useI18n();
62
60
 
63
61
  if (action?.confirm) {
64
62
  const confirmed = await confirm({
65
63
  title: action.confirm,
66
- message: t(`Deleting ${checkboxes.value.length} ${checkboxes.value.length === 1 ? 'item' : 'items'}. This process is irreversible.`),
64
+ message: `${t('Deleting')} ${checkboxes.value.length} ${checkboxes.value.length === 1 ? t('item') : t('items')}. ${t('This process is irreversible.')}`,
67
65
  });
68
66
  if (!confirmed) {
69
67
  return;
@@ -248,6 +248,7 @@ const filtersShow = ref(false);
248
248
  const { list, alert } = useAdminforth();
249
249
  const coreStore = useCoreStore();
250
250
  const filtersStore = useFiltersStore();
251
+ const { t } = useI18n();
251
252
 
252
253
  const route = useRoute();
253
254
 
@@ -331,7 +332,7 @@ async function refreshExistingList(pk?: any) {
331
332
  }
332
333
 
333
334
  async function startBulkActionInner(actionId: string) {
334
- await startBulkAction(actionId, coreStore.resource!, checkboxes, bulkActionLoadingStates, getListInner);
335
+ await startBulkAction(actionId, coreStore.resource!, checkboxes, bulkActionLoadingStates, getListInner, t);
335
336
  }
336
337
 
337
338
  async function startCustomBulkActionInner(actionId: string | number) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.55.3",
3
+ "version": "2.55.4-next.1",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",