adminforth 2.55.2 → 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.
@@ -1 +1 @@
1
- {{!-- Add only sensitive local environment variables here, non-sensitive local variables should go to .env.local --}}
1
+ # Add only sensitive local environment variables here; non-sensitive local variables should go to .env.local
@@ -1,5 +1,5 @@
1
- {{!-- Add only non-sensitive local environment variables here so all team members can use them with minimal setup --}}
2
- {{!-- For sensitive local environment variables, use .env and explain team members how to set them (ideally also provide .env.example ) --}}
1
+ # Add only non-sensitive local environment variables here so all team members can use them with minimal setup
2
+ # For sensitive local environment variables, use .env and explain to team members how to set them, ideally with a .env.example
3
3
 
4
4
  ADMINFORTH_SECRET=123
5
5
  NODE_ENV=development
@@ -1,5 +1,5 @@
1
- {{!-- Add only non-sensitive production environment variables here so deployed applications can use them --}}
2
- {{!-- Deliver sensitive production environment variables via natural process environments from your deployment platform --}}
1
+ # Add only non-sensitive production environment variables here so deployed applications can use them
2
+ # Deliver sensitive production environment variables via your deployment platform's process environment
3
3
 
4
4
  NODE_ENV=production
5
5
  DATABASE_URL={{dbUrlProd}}
@@ -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.2",
3
+ "version": "2.55.4-next.1",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",