Skip to content

Commit 8b26578

Browse files
committed
docs: examples use Lucide icons instead of flowbite, like the core does AdminForth/2005
1 parent c35dc4e commit 8b26578

12 files changed

Lines changed: 51 additions & 51 deletions

‎documentation/docs/tutorial/001-gettingStarted.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export const admin = new AdminForth({
487487
//diff-add
488488
label: 'Core',
489489
//diff-add
490-
icon: 'flowbite:brain-solid',
490+
icon: 'lucide:brain',
491491
//diff-add
492492
open: true,
493493
//diff-add
@@ -499,7 +499,7 @@ export const admin = new AdminForth({
499499
//diff-add
500500
label: 'Apartments',
501501
//diff-add
502-
icon: 'flowbite:home-solid',
502+
icon: 'lucide:house',
503503
//diff-add
504504
resourceId: 'aparts',
505505
//diff-add
@@ -518,12 +518,12 @@ export const admin = new AdminForth({
518518
},
519519
{
520520
label: 'Users',
521-
icon: 'flowbite:user-solid',
521+
icon: 'lucide:user',
522522
resourceId: 'adminuser'
523523
},
524524
{
525525
label: "Apartments",
526-
icon: "flowbite:user-solid",
526+
icon: "lucide:user",
527527
//diff-remove
528528
resourceId: "apartments",
529529
//diff-add

‎documentation/docs/tutorial/01-helloWorld.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export const admin = new AdminForth({
189189
{ type: 'heading', label: 'SYSTEM' },
190190
{
191191
label: 'Users',
192-
icon: 'flowbite:user-solid',
192+
icon: 'lucide:user',
193193
resourceId: 'adminuser'
194194
}
195195
],

‎documentation/docs/tutorial/03-Customization/06-customPages.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,29 +284,29 @@ menu: [
284284
//diff-add
285285
homepage: true,
286286
//diff-add
287-
icon: 'flowbite:chart-pie-solid',
287+
icon: 'lucide:chart-pie',
288288
//diff-add
289289
component: '@@/Dashboard.vue',
290290
//diff-add
291291
},
292292
{
293293
label: 'Core',
294-
icon: 'flowbite:brain-solid',
294+
icon: 'lucide:brain',
295295
open: true,
296296
children: [
297297
{
298298
//diff-remove
299299
homepage: true,
300300
label: 'Apartments',
301-
icon: 'flowbite:home-solid',
301+
icon: 'lucide:house',
302302
resourceId: 'aparts',
303303
},
304304
]
305305
},
306306
```
307307
308308
309-
> ☝️ To find icon go to https://icon-sets.iconify.design/flowbite/?query=chart, click on icon you like and copy name:
309+
> ☝️ To find icon go to https://icon-sets.iconify.design/lucide/?query=chart, click on icon you like and copy name:
310310
![Iconify icon select](image-icon-select.png)
311311
312312
You might notice that in mounted hook page fetches custom endpoint '/api/dashboard-stats'.
@@ -601,7 +601,7 @@ export const admin = new AdminForth({
601601
//diff-add
602602
slug: "users-settings",
603603
//diff-add
604-
icon:"flowbite:user-solid"
604+
icon:"lucide:user"
605605
//diff-add
606606
},
607607
//diff-add
@@ -611,7 +611,7 @@ export const admin = new AdminForth({
611611
//diff-add
612612
component: "@@/MySecrets.vue",
613613
//diff-add
614-
icon: "flowbite:lock-solid"
614+
icon: "lucide:lock"
615615
//diff-add
616616
}
617617
//diff-add

‎documentation/docs/tutorial/03-Customization/07-alert.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ menu: [
132132
//diff-add
133133
label: 'Alerts',
134134
//diff-add
135-
icon: 'flowbite:bell-active-alt-solid',
135+
icon: 'lucide:bell-ring',
136136
//diff-add
137137
component: '@@/Alerts.vue',
138138
//diff-add

‎documentation/docs/tutorial/03-Customization/09-Actions.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Here's how to add a custom action:
1717
actions: [
1818
{
1919
name: 'Auto submit', // Display name of the action
20-
icon: 'flowbite:play-solid', // Icon to display (using Flowbite icons)
20+
icon: 'lucide:play', // Icon to display (using Lucide icons)
2121

2222
// Control who can see/use this action
2323
allowed: ({ adminUser, standardAllowedActions }) => {
@@ -49,7 +49,7 @@ Here's how to add a custom action:
4949
### Action Configuration Options
5050

5151
- `name`: Display name of the action
52-
- `icon`: Icon to show (using Flowbite icon set)
52+
- `icon`: Icon to show (using Lucide icon set)
5353
- `allowed`: Function to control access to the action
5454
- `action`: Handler function that executes when action is triggered for a **single** record
5555
- `bulkHandler`: Handler function that executes when the action is triggered for **multiple** records at once (see [Dedicated bulk handler](#dedicated-bulk-handler))
@@ -125,7 +125,7 @@ For operations that only apply to multiple selected records, use `options.bulkAc
125125
bulkActions: [
126126
{
127127
label: 'Send Invitation',
128-
icon: 'flowbite:envelope-solid',
128+
icon: 'lucide:mail',
129129
confirm: 'Are you sure you want to send invitation emails?',
130130
allowed: async ({ adminUser }) => adminUser.dbUser.role === 'superadmin',
131131
action: async ({ selectedIds }) => {
@@ -203,7 +203,7 @@ Instead of defining an `action` handler, you can specify a `url` that the user w
203203
```ts title="./resources/apartments.ts"
204204
{
205205
name: 'View details',
206-
icon: 'flowbite:eye-solid',
206+
icon: 'lucide:eye',
207207
url: '/resource/aparts', // URL to redirect to
208208
showIn: {
209209
list: true,
@@ -226,7 +226,7 @@ To open the URL in a new tab, append `target=_blank` as a query parameter. If th
226226
```ts
227227
{
228228
name: 'View on Google',
229-
icon: 'flowbite:external-link-solid',
229+
icon: 'lucide:external-link',
230230
url: 'https://google.com/search?q=apartment&target=_blank',
231231
showIn: {
232232
list: true,
@@ -240,7 +240,7 @@ Example to generate dynamic URL:
240240
```ts
241241
{
242242
name: 'View on Google',
243-
icon: 'flowbite:external-link-solid',
243+
icon: 'lucide:external-link',
244244
url: async ({record, recordId, adminUser, resource }) => `https://google.com/search?q=Apartment ${record.title}`,
245245
showIn: {
246246
list: true,
@@ -262,7 +262,7 @@ However, rearely you might also like to decide whether to redirect only after pe
262262
```ts
263263
{
264264
name: 'View on Google',
265-
icon: 'flowbite:external-link-solid',
265+
icon: 'lucide:external-link',
266266
action: async ({ recordId }) => {
267267
if (await testSomething(recordId)) {
268268
return { ok: true, redirectUrl: 'https://google.com/search?q=apartment' };
@@ -290,7 +290,7 @@ Below we wrap a "Mark as listed" action.
290290
actions: [
291291
{
292292
name: 'Mark as listed',
293-
icon: 'flowbite:eye-solid',
293+
icon: 'lucide:eye',
294294
// UI wrapper for the built-in action button
295295
//diff-add
296296
customComponent: {
@@ -386,7 +386,7 @@ Backend handler: read the payload via `extra`.
386386
actions: [
387387
{
388388
name: 'Toggle listed',
389-
icon: 'flowbite:eye-solid',
389+
icon: 'lucide:eye',
390390
showIn: { list: false, listThreeDotsMenu: false, showButton: true, showThreeDotsMenu: true },
391391
// The payload from emit('callAction', { asListed: true|false }) arrives here as `extra`
392392
customComponent: {
@@ -417,7 +417,7 @@ actions: [
417417
//diff-add
418418
id: 'testToggle listedAction',
419419
name: 'Toggle listed',
420-
icon: 'flowbite:eye-solid',
420+
icon: 'lucide:eye',
421421
...
422422
}
423423
]

‎documentation/docs/tutorial/03-Customization/10-menuConfiguration.md‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Adminforth uses [Iconify](https://iconify.design/) icons everywhere, including t
1111

1212
You can set an icon for each menu item using the `icon` field.
1313

14-
You can use any icon from the [Iconify Gallery](https://icon-sets.iconify.design/) in the format `<setname>:<icon>`. For example, `flowbite:brain-solid`.
14+
You can use any icon from the [Iconify Gallery](https://icon-sets.iconify.design/) in the format `<setname>:<icon>`. For example, `lucide:brain`. AdminForth itself uses [Lucide](https://icon-sets.iconify.design/lucide/) icons, so they match the rest of the admin panel.
1515

1616
![Icons for AdminForth](image-14.png)
1717

@@ -30,24 +30,24 @@ E.g. create group "Blog" with Items who link to resource "posts" and "categories
3030
menu: [
3131
{
3232
label: 'Blog',
33-
icon: 'flowbite:brain-solid',
33+
icon: 'lucide:brain',
3434
open: true,
3535
children: [
3636
{
3737
label: 'Posts',
38-
icon: 'flowbite:book-open-outline',
38+
icon: 'lucide:book-open',
3939
resourceId: 'posts',
4040
},
4141
{
4242
label: 'Categories',
43-
icon: 'flowbite:folder-duplicate-outline',
43+
icon: 'lucide:folders',
4444
resourceId: 'categories',
4545
},
4646
],
4747
},
4848
{
4949
label: 'Users',
50-
icon: 'flowbite:folder-duplicate-outline',
50+
icon: 'lucide:folders',
5151
resourceId: 'adminuser',
5252
},
5353
],
@@ -72,7 +72,7 @@ async modifyResourceConfig(adminforth, resourceConfig) {
7272
itemId: 'dashboard',
7373
type: 'page',
7474
label: 'Dashboard',
75-
icon: 'flowbite:chart-pie-solid',
75+
icon: 'lucide:chart-pie',
7676
path: '/dashboard',
7777
component: this.componentPath('Dashboard.vue'),
7878
},
@@ -143,7 +143,7 @@ async modifyResourceConfig(adminforth, resourceConfig) {
143143
itemId: 'dashboardsMenu',
144144
type: 'group',
145145
label: 'Dashboards',
146-
icon: 'flowbite:chart-pie-solid',
146+
icon: 'lucide:chart-pie',
147147
children: dashboards.map((dashboard) => ({
148148
itemId: `dashboard-${dashboard.id}`,
149149
type: 'page',
@@ -155,7 +155,7 @@ async modifyResourceConfig(adminforth, resourceConfig) {
155155
},
156156
];
157157
}, {
158-
icons: ['flowbite:chart-pie-solid'],
158+
icons: ['lucide:chart-pie'],
159159
});
160160
}
161161
```
@@ -198,7 +198,7 @@ To do it use `visible` field in the menu item configuration:
198198
menu: [
199199
{
200200
label: 'Categories',
201-
icon: 'flowbite:folder-duplicate-outline',
201+
icon: 'lucide:folders',
202202
resourceId: 'categories',
203203
//diff-add
204204
visible: adminUser => adminUser.dbUser.role === 'admin'
@@ -222,7 +222,7 @@ You can put one or several gaps between menu items:
222222
menu: [
223223
{
224224
label: 'Posts',
225-
icon: 'flowbite:book-open-outline',
225+
icon: 'lucide:book-open',
226226
resourceId: 'posts',
227227
},
228228
{
@@ -233,7 +233,7 @@ You can put one or several gaps between menu items:
233233
},
234234
{
235235
label: 'Categories',
236-
icon: 'flowbite:folder-duplicate-outline',
236+
icon: 'lucide:folders',
237237
resourceId: 'categories',
238238
},
239239
],
@@ -251,15 +251,15 @@ To split menu items with a line you can use a divider:
251251
menu: [
252252
{
253253
label: 'Posts',
254-
icon: 'flowbite:book-open-outline',
254+
icon: 'lucide:book-open',
255255
resourceId: 'posts',
256256
},
257257
{
258258
type: 'divider',
259259
},
260260
{
261261
label: 'Categories',
262-
icon: 'flowbite:folder-duplicate-outline',
262+
icon: 'lucide:folders',
263263
resourceId: 'categories',
264264
},
265265
]
@@ -283,12 +283,12 @@ You can add a heading to the menu:
283283
},
284284
{
285285
label: 'Posts',
286-
icon: 'flowbite:book-open-outline',
286+
icon: 'lucide:book-open',
287287
resourceId: 'posts',
288288
},
289289
{
290290
label: 'Categories',
291-
icon: 'flowbite:folder-duplicate-outline',
291+
icon: 'lucide:folders',
292292
resourceId: 'categories',
293293
},
294294
],
@@ -308,7 +308,7 @@ You can add a badge near the menu item title (e.g. to get count of unread messag
308308
menu: [
309309
{
310310
label: 'Posts',
311-
icon: 'flowbite:book-open-outline',
311+
icon: 'lucide:book-open',
312312
resourceId: 'posts',
313313
badge: async (adminUser: AdminUser) => {
314314
return 10
@@ -336,7 +336,7 @@ Most times you need to refresh the badge from some backend API or hook. To do th
336336
menu: [
337337
{
338338
label: 'Posts',
339-
icon: 'flowbite:book-open-outline',
339+
icon: 'lucide:book-open',
340340
resourceId: 'posts',
341341
//diff-add
342342
itemId: 'postsMenuItem',
@@ -422,7 +422,7 @@ You can use the url property to override default navigation. This is useful for
422422
menu: [
423423
{
424424
label: 'Posts',
425-
icon: 'flowbite:book-open-outline',
425+
icon: 'lucide:book-open',
426426
resourceId: 'posts',
427427
//diff-add
428428
url: '/resource/aparts?filter__country__in=["DE"]',
@@ -450,7 +450,7 @@ async modifyResourceConfig(adminforth, resourceConfig) {
450450
itemId: 'dashboard',
451451
type: 'page',
452452
label: 'Dashboard',
453-
icon: 'flowbite:chart-pie-solid',
453+
icon: 'lucide:chart-pie',
454454
path: '/dashboard',
455455
component: this.componentPath('Dashboard.vue'),
456456
},
@@ -521,7 +521,7 @@ async modifyResourceConfig(adminforth, resourceConfig) {
521521
itemId: 'dashboardsMenu',
522522
type: 'group',
523523
label: 'Dashboards',
524-
icon: 'flowbite:chart-pie-solid',
524+
icon: 'lucide:chart-pie',
525525
children: dashboards.map((dashboard) => ({
526526
itemId: `dashboard-${dashboard.id}`,
527527
type: 'page',
@@ -533,7 +533,7 @@ async modifyResourceConfig(adminforth, resourceConfig) {
533533
},
534534
];
535535
}, {
536-
icons: ['flowbite:chart-pie-solid'],
536+
icons: ['lucide:chart-pie'],
537537
});
538538
}
539539
```

‎documentation/docs/tutorial/03-Customization/16-websocket.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Create a component `PropertyCost.vue`:
5757
<template #tooltip>
5858
<div class="text-sm">Your total property cost</div>
5959
</template>
60-
<IconDollarOutline class="text-2xl opacity-50" />
60+
<IconDollarSign class="text-2xl opacity-50" />
6161
<div class="text-2xl text-gray-900 dark:text-white"> {{totalCost}}</div>
6262
</Tooltip>
6363
</div>
@@ -67,7 +67,7 @@ Create a component `PropertyCost.vue`:
6767
import { onMounted, onUnmounted, Ref } from 'vue';
6868
import { ref } from 'vue';
6969
import websocket from '@/websocket';
70-
import { IconDollarOutline } from '@iconify-prerendered/vue-flowbite';
70+
import { IconDollarSign } from '@iconify-prerendered/vue-lucide';
7171
import { Tooltip } from '@/afcl';
7272
7373
import type { AdminUser } from '@/types/Common';

‎documentation/docs/tutorial/09-Plugins/02-TwoFactorsAuth.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ options: {
328328
actions: [
329329
{
330330
name: 'Auto submit',
331-
icon: 'flowbite:play-solid',
331+
icon: 'lucide:play',
332332
allowed: () => true,
333333
action: async ({ recordId, adminUser, adminforth, response, extra }) => {
334334
//diff-add

0 commit comments

Comments
 (0)