Skip to content

Commit 1a91807

Browse files
committed
Merge branch 'next' of github.com:devforth/adminforth into feature/AdminForth/1194/i-added-logger-to-root-level-a
2 parents f7688df + 2e0f5d8 commit 1a91807

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7139
-4621
lines changed

adminforth/commands/createApp/templates/package.json.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"devDependencies": {
4141
"typescript": "5.4.5",
4242
"tsx": "4.11.2",
43-
"@types/express": "latest",
43+
"@types/express": "^4.17.21",
4444
"@types/node": "latest",
4545
"@prisma/client": "latest",
4646
"prisma": "^7.0.0"

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cd myadmin # or any other name you provided
4040
CLI options:
4141

4242
* **`--app-name`** - name for your project. Used in `package.json`, `index.ts` branding, etc. Default value: **`adminforth-app`**.
43-
* **`--db`** - database connection string. Currently PostgreSQL, MongoDB, SQLite, MySQL, Clickhouse are supported. Default value: **`sqlite://.db.sqlite`**
43+
* **`--db`** - database connection string. Currently PostgreSQL, MongoDB, SQLite, MySQL, Clickhouse and Qdrant (read only) are supported. Default value: **`sqlite://.db.sqlite`**
4444

4545
> ☝️ Database Connection String format:
4646
>
@@ -51,6 +51,7 @@ CLI options:
5151
> - MongoDB — `mongodb://localhost:27017/dbname`
5252
> - Clickhouse — `clickhouse://localhost:8123/dbname`
5353
> - MySQL — `mysql://user:password@localhost:3306/dbname`
54+
> - Qdrant - `qdrant://localhost:6333`
5455
5556
### Understand the generated Project Structure
5657

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Here's how to add a custom action:
3535
listThreeDotsMenu: true, // Show in three dots menu in list view
3636
showButton: true, // Show as a button
3737
showThreeDotsMenu: true, // Show in three-dots menu
38+
bulkButton: true
3839
}
3940
}
4041
]

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,43 @@ If you want to make table header or pagination, you can add `makeHeaderSticky`,
12371237
></Table>
12381238
```
12391239

1240+
### Don't block pagination on loading
1241+
1242+
Sometimes you might want to allow user switch between pages, even if old request wasn't finished. For these porpuses you can use `blockPaginationOnLoading` and `abortSignal` in data callback:
1243+
```ts
1244+
<Table
1245+
:columns="[
1246+
{ label: 'Name', fieldName: 'name' },
1247+
{ label: 'Age', fieldName: 'age' },
1248+
{ label: 'Country', fieldName: 'country' },
1249+
]"
1250+
:data="loadPageData"
1251+
//diff-add
1252+
:blockPaginationOnLoading="false"
1253+
:pageSize="3">
1254+
</Table>
1255+
1256+
1257+
...
1258+
1259+
async function loadPageData(data, abortSignal) {
1260+
const { offset, limit } = data;
1261+
// in real app do await callAdminForthApi or await fetch to get date, use offset and limit value to slice data
1262+
await new Promise(resolve => setTimeout(resolve, offset === 500)) // simulate network delay
1263+
if (abortSignal.abort) return; // since result won't be displayed, we stop computing
1264+
1265+
return {
1266+
data: [
1267+
{ name: 'John', age: offset, country: 'US' },
1268+
{ name: 'Rick', age: offset+1, country: 'CA' },
1269+
{ name: 'Alice', age: offset+2, country: 'BR' },
1270+
],
1271+
total: 30 // should return total amount of records in database
1272+
}
1273+
}
1274+
1275+
```
1276+
12401277
## ProgressBar
12411278

12421279
<div class="split-screen" >
@@ -2380,6 +2417,8 @@ import { Modal, Button } from '@/afcl';
23802417
askForCloseConfirmation?: boolean // Show extra popup to confirm close ( to avoid close by accident)
23812418
closeConfirmationText?: string // Text that will be shown on close confirmation popup
23822419
removeFromDomOnClose?: boolean // Remove modal from DOM on close ( default is false )
2420+
backgroundCustomClasses?: string // allows to add custom classes to the gray background of modal (e.g. you can have bg-pink-500/60)
2421+
modalCustomClasses?: string // allows to add custom classes to modal popup
23832422
```
23842423

23852424
## Date picker

0 commit comments

Comments
 (0)