feat: add currently_reading and read and repsonsive menu

This commit is contained in:
2026-09-30 21:55:40 +02:00
parent 1f6061b998
commit ccb8dd3d15
11 changed files with 207 additions and 43 deletions
+3 -2
View File
@@ -38,12 +38,13 @@ async function request<T>(
}
}
export async function listRows<Row>(event: H3Event, tableId: string): Promise<Row[]> {
/** All rows of a table. `filters` are Baserow row filters, e.g. `{ filter__read__boolean: true }`. */
export async function listRows<Row>(event: H3Event, tableId: string, filters: Fields = {}): Promise<Row[]> {
const path = `rows/table/${tableId}/`
const rows: Row[] = []
for (let page = 1; ; page++) {
const { count, results } = await request<RowPage<Row>>(event, path, {
query: { user_field_names: true, size: PAGE_SIZE, page }
query: { ...filters, user_field_names: true, size: PAGE_SIZE, page }
})
rows.push(...results)
if (rows.length >= count || results.length === 0) return rows