Skip to content

Commit eae9b8a

Browse files
committed
Merge branch 'next' of github.com:devforth/adminforth into next
2 parents 4a6179a + 18f4c0c commit eae9b8a

File tree

5 files changed

+21
-28
lines changed

5 files changed

+21
-28
lines changed

adminforth/documentation/docs/tutorial/03-Customization/15-afcl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,10 +1967,10 @@ import { MixedChart } from '@/afcl'
19671967
</div>
19681968
</div>
19691969

1970-
## Json Viever
1970+
## Json Viewer
19711971

19721972
```ts
1973-
import { JsonViever } from '@/afcl'
1973+
import { JsonViewer } from '@/afcl'
19741974
```
19751975

19761976
### Basic

adminforth/spa/src/components/Toast.vue

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
<template>
22

33

4-
<div class="afcl-toast flex items-center w-full p-4 rounded-lg shadow-lg dark:text-darkToastText dark:bg-darkToastBackground bg-lightToastBackground text-lightToastText"
4+
<div class="afcl-toast flex items-center w-full p-4 rounded-lg shadow-lg dark:text-darkToastText dark:bg-darkToastBackground bg-lightToastBackground text-lightToastText border-r-4"
5+
:class="toast.variant == 'info' ? 'border-lightPrimary dark:border-darkPrimary' : toast.variant == 'danger' ? 'border-red-500 dark:border-red-800' : toast.variant == 'warning' ? 'border-orange-500 dark:border-orange-700' : 'border-green-500 dark:border-green-800'"
56
role="alert"
67
>
7-
<div v-if="toast.variant == 'info'" class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-lightPrimary dark:text-darkPrimary bg-lightPrimaryOpacity rounded-lg dark:bg-blue-800 dark:text-blue-200">
8-
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20">
9-
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.147 15.085a7.159 7.159 0 0 1-6.189 3.307A6.713 6.713 0 0 1 3.1 15.444c-2.679-4.513.287-8.737.888-9.548A4.373 4.373 0 0 0 5 1.608c1.287.953 6.445 3.218 5.537 10.5 1.5-1.122 2.706-3.01 2.853-6.14 1.433 1.049 3.993 5.395 1.757 9.117Z"/>
10-
</svg>
11-
<span class="sr-only">{{ $t('Fire icon') }}</span>
8+
<div v-if="toast.variant == 'info'" class=" inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-lightPrimary dark:text-darkPrimary bg-lightPrimaryOpacity rounded-lg dark:bg-darkPrimary dark:!text-blue-100">
9+
<IconInfoCircleSolid class="w-5 h-5" aria-hidden="true" />
1210
</div>
1311
<div v-else-if="toast.variant == 'danger'" class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200">
14-
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
15-
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"/>
16-
</svg>
17-
<span class="sr-only">{{ $t('Error icon') }}</span>
12+
<IconCloseCircleSolid class="w-5 h-5" aria-hidden="true" />
1813
</div>
1914
<div v-else-if="toast.variant == 'warning'"class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200">
20-
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
21-
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/>
22-
</svg>
23-
<span class="sr-only">{{ $t('Warning icon') }}</span>
15+
<IconExclamationCircleSolid class="w-5 h-5" aria-hidden="true" />
16+
2417
</div>
2518
<div v-else class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200">
26-
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
27-
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"/>
28-
</svg>
29-
<span class="sr-only">{{ $t('Check icon') }}</span>
19+
<IconCheckCircleSolid class="w-5 h-5" aria-hidden="true" />
3020
</div>
3121

3222
<div class="ms-3 text-sm font-normal max-w-xs pr-2" v-if="toast.messageHtml" v-html="toast.messageHtml"></div>
@@ -47,6 +37,7 @@
4737
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
4838
</svg>
4939
</button>
40+
<!-- <div class="h-full ml-3 w-1 rounded-r-lg" :class="toast.variant == 'info' ? 'bg-lightPrimary dark:bg-darkPrimary' : toast.variant == 'danger' ? 'bg-red-500 dark:bg-red-800' : toast.variant == 'warning' ? 'bg-orange-500 dark:bg-orange-700' : 'bg-green-500 dark:bg-green-800'"></div> -->
5041
</div>
5142

5243

@@ -55,6 +46,8 @@
5546
<script setup lang="ts">
5647
import { onMounted } from 'vue';
5748
import { useToastStore } from '@/stores/toast';
49+
import { IconInfoCircleSolid, IconCloseCircleSolid, IconExclamationCircleSolid, IconCheckCircleSolid } from '@iconify-prerendered/vue-flowbite';
50+
5851
const toastStore = useToastStore();
5952
const emit = defineEmits(['close']);
6053
const props = defineProps<{

adminforth/spa/src/views/ListView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</button>
101101

102102
<ThreeDotsMenu
103-
v-if="!coreStore.isResourceFetching && !initInProcess"
103+
v-if="!coreStore.isResourceFetching"
104104
:threeDotsDropdownItems="(coreStore.resourceOptions?.pageInjections?.list?.threeDotsDropdownItems as [])"
105105
:bulkActions="coreStore.resource?.options?.bulkActions"
106106
:checkboxes="checkboxes"
@@ -412,7 +412,7 @@ async function init() {
412412
return {
413413
field,
414414
operator,
415-
value: JSON.parse(decodeURIComponent(route.query[k] as string))
415+
value: JSON.parse((route.query[k] as string))
416416
}
417417
});
418418
if (filters.length) {
@@ -494,7 +494,7 @@ watch(() => filtersStore.filters, async (to, from) => {
494494
const currentQ = currentQuery();
495495
filtersStore.filters.forEach(f => {
496496
if (f.value !== undefined && f.value !== null && f.value !== '') {
497-
query[`filter__${f.field}__${f.operator}`] = encodeURIComponent(JSON.stringify(f.value));
497+
query[`filter__${f.field}__${f.operator}`] = (JSON.stringify(f.value));
498498
}
499499
});
500500
// set every key in currentQ which starts with filter_ to undefined if it is not in query

live-demo/app/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

live-demo/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@adminforth/two-factors-auth": "^1.1.2",
3333
"@adminforth/upload": "^2.3.6",
3434
"@prisma/client": "^6.6.0",
35-
"adminforth": "^2.4.0-next.247",
35+
"adminforth": "^2.4.0-next.262",
3636
"better-sqlite3": "^10.0.0",
3737
"express": "^4.19.2"
3838
},

0 commit comments

Comments
 (0)