adminforth 1.3.15 → 1.3.17
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adminforth",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"description": "OpenSource Vue3 powered forth-generation admin panel",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@clickhouse/client": "^1.4.0",
|
|
21
21
|
"better-sqlite3": "^10.0.0",
|
|
22
22
|
"dayjs": "^1.11.11",
|
|
23
|
-
"express": "^4.
|
|
23
|
+
"express": "^4.21.0",
|
|
24
24
|
"filewatcher": "^3.0.1",
|
|
25
25
|
"fs-extra": "^11.2.0",
|
|
26
26
|
"fuse.js": "^7.0.0",
|
package/spa/src/App.vue
CHANGED
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div class="flex items-center">
|
|
20
20
|
<div class="flex items-center ms-3 ">
|
|
21
|
+
<span @click="toggleTheme" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-lightHtml dark:text-darkSidebarTextHover dark:hover:bg-darkHtml dark:hover:text-darkSidebarTextActive" role="menuitem">
|
|
22
|
+
<IconMoonSolid class="w-5 h-5 text-blue-300" v-if="theme !== 'dark'" />
|
|
23
|
+
<IconSunSolid class="w-5 h-5 text-yellow-300" v-else />
|
|
24
|
+
</span>
|
|
21
25
|
<div>
|
|
26
|
+
|
|
22
27
|
<button type="button" class="flex text-sm bg- rounded-full focus:ring-4 focus:ring-lightSidebarDevider dark:focus:ring-darkSidebarDevider dark:bg-" aria-expanded="false" data-dropdown-toggle="dropdown-user">
|
|
23
28
|
<span class="sr-only">Open user menu</span>
|
|
24
29
|
<svg class="w-8 h-8 text-lightNavbarIcons dark:text-darkNavbarIcons" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
@@ -36,14 +41,9 @@
|
|
|
36
41
|
</p>
|
|
37
42
|
</div>
|
|
38
43
|
<ul class="py-1" role="none">
|
|
39
|
-
<li>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<IconMoonSolid class="w-5 h-5 text-blue-300" v-if="theme !== 'dark'" />
|
|
43
|
-
<IconSunSolid class="w-5 h-5 text-yellow-300" v-else />
|
|
44
|
-
mode
|
|
45
|
-
</span>
|
|
46
|
-
</li>
|
|
44
|
+
<!-- <li>
|
|
45
|
+
|
|
46
|
+
</li> -->
|
|
47
47
|
<li>
|
|
48
48
|
<button @click="logout" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-html dark:text-darkSidebarTextHover dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextActive w-full" role="menuitem">Sign out</button>
|
|
49
49
|
</li>
|
|
@@ -244,6 +244,10 @@ const setCurrentValue = (key, value) => {
|
|
|
244
244
|
} else {
|
|
245
245
|
currentValues.value[key] = value;
|
|
246
246
|
}
|
|
247
|
+
if (['text', 'richtext', 'string'].includes(col.type) && col.enforceLowerCase) {
|
|
248
|
+
currentValues.value[key] = currentValues.value[key].toLowerCase();
|
|
249
|
+
}
|
|
250
|
+
|
|
247
251
|
currentValues.value = { ...currentValues.value };
|
|
248
252
|
console.log('3️⃣ setCurrentValue', key, value);
|
|
249
253
|
emit('update:record', currentValues.value);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<span v-else class="bg-red-100 text-red-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-red-400 border border-red-400">No</span>
|
|
16
16
|
</span>
|
|
17
17
|
<span v-else-if="column.enum">
|
|
18
|
-
{{ checkEmptyValues(column.enum.find(e => e.value === record[column.name])?.label,route.meta.type) }}
|
|
18
|
+
{{ checkEmptyValues(column.enum.find(e => e.value === record[column.name])?.label || record[column.name], route.meta.type) }}
|
|
19
19
|
</span>
|
|
20
20
|
<span v-else-if="column.type === 'datetime'" class="whitespace-nowrap">
|
|
21
21
|
{{ checkEmptyValues(formatDate(record[column.name]),route.meta.type) }}
|
|
@@ -571,6 +571,10 @@ export type AdminForthResourceColumn = {
|
|
|
571
571
|
*/
|
|
572
572
|
isUnique?: boolean,
|
|
573
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Will automatically convert any capital letters to lowercase in input during editing
|
|
576
|
+
*/
|
|
577
|
+
enforceLowerCase?: boolean,
|
|
574
578
|
|
|
575
579
|
/**
|
|
576
580
|
* Runtime validation Regexp rules for this field.
|