@actuate-media/cms-admin 0.49.1 → 0.49.3
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/CHANGELOG.md +21 -0
- package/dist/actuate-admin.css +1 -1
- package/dist/components/FolderTree.js +19 -19
- package/dist/components/FolderTree.js.map +1 -1
- package/dist/views/MediaBrowser.d.ts.map +1 -1
- package/dist/views/MediaBrowser.js +16 -16
- package/dist/views/MediaBrowser.js.map +1 -1
- package/dist/views/Pages/PagesListView.d.ts.map +1 -1
- package/dist/views/Pages/PagesListView.js +3 -3
- package/dist/views/Pages/PagesListView.js.map +1 -1
- package/dist/views/Posts/PostsListView.d.ts.map +1 -1
- package/dist/views/Posts/PostsListView.js +3 -3
- package/dist/views/Posts/PostsListView.js.map +1 -1
- package/dist/views/Redirects.d.ts.map +1 -1
- package/dist/views/Redirects.js +7 -7
- package/dist/views/Redirects.js.map +1 -1
- package/dist/views/ScriptTagEditor.js +4 -4
- package/dist/views/ScriptTagEditor.js.map +1 -1
- package/dist/views/ScriptTags.d.ts.map +1 -1
- package/dist/views/ScriptTags.js +5 -5
- package/dist/views/ScriptTags.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FolderTree.tsx +32 -32
- package/src/views/MediaBrowser.tsx +128 -120
- package/src/views/Pages/PagesListView.tsx +123 -115
- package/src/views/Posts/PostsListView.tsx +114 -110
- package/src/views/Redirects.tsx +48 -44
- package/src/views/ScriptTagEditor.tsx +40 -40
- package/src/views/ScriptTags.tsx +34 -30
|
@@ -398,123 +398,131 @@ export function PagesListView({ onNavigate }: PagesListViewProps) {
|
|
|
398
398
|
|
|
399
399
|
{/* Table card */}
|
|
400
400
|
<div className="bg-card border-border overflow-hidden rounded-xl border shadow-sm">
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
<
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
401
|
+
{/* Horizontal scroll on narrow viewports: the fixed columns keep their
|
|
402
|
+
width and the table scrolls sideways instead of crushing content. */}
|
|
403
|
+
<div className="overflow-x-auto">
|
|
404
|
+
<table className="w-full min-w-[800px] table-fixed" role="table" aria-label="Pages">
|
|
405
|
+
<colgroup>
|
|
406
|
+
<col style={{ width: '40px' }} />
|
|
407
|
+
<col />
|
|
408
|
+
<col style={{ width: '200px' }} />
|
|
409
|
+
<col style={{ width: '170px' }} />
|
|
410
|
+
<col style={{ width: '120px' }} />
|
|
411
|
+
<col style={{ width: '130px' }} />
|
|
412
|
+
<col style={{ width: '80px' }} />
|
|
413
|
+
</colgroup>
|
|
414
|
+
<thead className="border-border bg-muted/40 border-b">
|
|
415
|
+
<tr className="text-muted-foreground text-xs">
|
|
416
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
417
|
+
<input
|
|
418
|
+
type="checkbox"
|
|
419
|
+
aria-label="Select all pages on this page"
|
|
420
|
+
checked={allOnPageSelected}
|
|
421
|
+
onChange={(e) => toggleAllOnPage(e.target.checked)}
|
|
422
|
+
className="border-border accent-primary rounded"
|
|
423
|
+
/>
|
|
424
|
+
</th>
|
|
425
|
+
<th scope="col" aria-sort={ariaSortFor('title')} className="px-3 py-2.5 text-left">
|
|
426
|
+
<SortHeader
|
|
427
|
+
label="Title"
|
|
428
|
+
field="title"
|
|
429
|
+
current={sortBy}
|
|
430
|
+
dir={dir}
|
|
431
|
+
onSort={handleSort}
|
|
432
|
+
/>
|
|
433
|
+
</th>
|
|
434
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
435
|
+
<span className="text-xs font-medium tracking-wider uppercase">Tags</span>
|
|
436
|
+
</th>
|
|
437
|
+
<th scope="col" aria-sort={ariaSortFor('author')} className="px-3 py-2.5 text-left">
|
|
438
|
+
<SortHeader
|
|
439
|
+
label="Author"
|
|
440
|
+
field="author"
|
|
441
|
+
current={sortBy}
|
|
442
|
+
dir={dir}
|
|
443
|
+
onSort={handleSort}
|
|
444
|
+
/>
|
|
445
|
+
</th>
|
|
446
|
+
<th scope="col" aria-sort={ariaSortFor('status')} className="px-3 py-2.5 text-left">
|
|
447
|
+
<SortHeader
|
|
448
|
+
label="Status"
|
|
449
|
+
field="status"
|
|
450
|
+
current={sortBy}
|
|
451
|
+
dir={dir}
|
|
452
|
+
onSort={handleSort}
|
|
453
|
+
/>
|
|
454
|
+
</th>
|
|
455
|
+
<th
|
|
456
|
+
scope="col"
|
|
457
|
+
aria-sort={ariaSortFor('modified')}
|
|
458
|
+
className="px-3 py-2.5 text-left"
|
|
459
|
+
>
|
|
460
|
+
<SortHeader
|
|
461
|
+
label="Last Modified"
|
|
462
|
+
field="modified"
|
|
463
|
+
current={sortBy}
|
|
464
|
+
dir={dir}
|
|
465
|
+
onSort={handleSort}
|
|
466
|
+
/>
|
|
467
|
+
</th>
|
|
468
|
+
<th scope="col" aria-sort={ariaSortFor('seo')} className="px-3 py-2.5 text-left">
|
|
469
|
+
<SortHeader
|
|
470
|
+
label="SEO"
|
|
471
|
+
field="seo"
|
|
472
|
+
current={sortBy}
|
|
473
|
+
dir={dir}
|
|
474
|
+
onSort={handleSort}
|
|
475
|
+
/>
|
|
476
|
+
</th>
|
|
477
|
+
</tr>
|
|
478
|
+
</thead>
|
|
479
|
+
<tbody>
|
|
480
|
+
{loading && pages.length === 0 && <LoadingRows />}
|
|
481
|
+
{!loading && error && (
|
|
482
|
+
<tr>
|
|
483
|
+
<td colSpan={7} className="px-3 py-12 text-center">
|
|
484
|
+
<div className="text-foreground mb-2 text-sm font-medium">{error}</div>
|
|
485
|
+
<button
|
|
486
|
+
onClick={() => setRefreshToken((t) => t + 1)}
|
|
487
|
+
className="text-primary text-sm hover:underline"
|
|
488
|
+
>
|
|
489
|
+
Try again
|
|
490
|
+
</button>
|
|
491
|
+
</td>
|
|
492
|
+
</tr>
|
|
493
|
+
)}
|
|
494
|
+
{!loading && !error && pages.length === 0 && (
|
|
495
|
+
<EmptyRow
|
|
496
|
+
filtersActive={filtersAreActive}
|
|
497
|
+
onClear={clearFilters}
|
|
498
|
+
onNewPage={() => onNavigate('/pages/new')}
|
|
468
499
|
/>
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
onClick={() => setRefreshToken((t) => t + 1)}
|
|
480
|
-
className="text-primary text-sm hover:underline"
|
|
500
|
+
)}
|
|
501
|
+
{!loading &&
|
|
502
|
+
!error &&
|
|
503
|
+
displayGroups.map((group) => (
|
|
504
|
+
<GroupBlock
|
|
505
|
+
key={group.key}
|
|
506
|
+
showHeader={grouped}
|
|
507
|
+
label={group.label}
|
|
508
|
+
color={group.color}
|
|
509
|
+
count={group.pages.length}
|
|
481
510
|
>
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
<GroupBlock
|
|
498
|
-
key={group.key}
|
|
499
|
-
showHeader={grouped}
|
|
500
|
-
label={group.label}
|
|
501
|
-
color={group.color}
|
|
502
|
-
count={group.pages.length}
|
|
503
|
-
>
|
|
504
|
-
{group.pages.map((p) => (
|
|
505
|
-
<PageRow
|
|
506
|
-
key={p.id}
|
|
507
|
-
page={p}
|
|
508
|
-
selected={selected.has(p.id)}
|
|
509
|
-
resolveTag={(slug) => tagBySlug.get(slug)}
|
|
510
|
-
onSelect={() => toggleOne(p.id)}
|
|
511
|
-
onOpen={() => onNavigate(`/pages/${p.id}/edit`)}
|
|
512
|
-
/>
|
|
513
|
-
))}
|
|
514
|
-
</GroupBlock>
|
|
515
|
-
))}
|
|
516
|
-
</tbody>
|
|
517
|
-
</table>
|
|
511
|
+
{group.pages.map((p) => (
|
|
512
|
+
<PageRow
|
|
513
|
+
key={p.id}
|
|
514
|
+
page={p}
|
|
515
|
+
selected={selected.has(p.id)}
|
|
516
|
+
resolveTag={(slug) => tagBySlug.get(slug)}
|
|
517
|
+
onSelect={() => toggleOne(p.id)}
|
|
518
|
+
onOpen={() => onNavigate(`/pages/${p.id}/edit`)}
|
|
519
|
+
/>
|
|
520
|
+
))}
|
|
521
|
+
</GroupBlock>
|
|
522
|
+
))}
|
|
523
|
+
</tbody>
|
|
524
|
+
</table>
|
|
525
|
+
</div>
|
|
518
526
|
|
|
519
527
|
{/* Pagination only for the flat (ungrouped) view. */}
|
|
520
528
|
{!grouped && (
|
|
@@ -257,118 +257,122 @@ export function PostsListView({ onNavigate }: PostsListViewProps) {
|
|
|
257
257
|
|
|
258
258
|
{/* Table card */}
|
|
259
259
|
<div className="bg-card border-border overflow-hidden rounded-xl border shadow-sm">
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
<
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
{loading && posts.length === 0 && <LoadingRows />}
|
|
339
|
-
{!loading && error && (
|
|
340
|
-
<tr>
|
|
341
|
-
<td colSpan={7} className="px-3 py-12 text-center">
|
|
342
|
-
<div className="text-foreground mb-2 text-sm font-medium">{error}</div>
|
|
343
|
-
<button
|
|
344
|
-
onClick={() => setRefreshToken((t) => t + 1)}
|
|
345
|
-
className="text-primary text-sm hover:underline"
|
|
346
|
-
>
|
|
347
|
-
Try again
|
|
348
|
-
</button>
|
|
349
|
-
</td>
|
|
260
|
+
{/* Horizontal scroll on narrow viewports: the fixed columns keep their
|
|
261
|
+
width and the table scrolls sideways instead of crushing content. */}
|
|
262
|
+
<div className="overflow-x-auto">
|
|
263
|
+
<table className="w-full min-w-[760px] table-fixed" role="table" aria-label="Posts">
|
|
264
|
+
<colgroup>
|
|
265
|
+
<col style={{ width: '40px' }} />
|
|
266
|
+
<col />
|
|
267
|
+
<col style={{ width: '140px' }} />
|
|
268
|
+
<col style={{ width: '180px' }} />
|
|
269
|
+
<col style={{ width: '130px' }} />
|
|
270
|
+
<col style={{ width: '120px' }} />
|
|
271
|
+
<col style={{ width: '90px' }} />
|
|
272
|
+
</colgroup>
|
|
273
|
+
<thead className="border-border bg-muted/40 border-b">
|
|
274
|
+
<tr className="text-muted-foreground text-xs">
|
|
275
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
276
|
+
<input
|
|
277
|
+
type="checkbox"
|
|
278
|
+
aria-label="Select all posts on this page"
|
|
279
|
+
checked={allOnPageSelected}
|
|
280
|
+
onChange={(e) => toggleAllOnPage(e.target.checked)}
|
|
281
|
+
className="border-border accent-primary rounded"
|
|
282
|
+
/>
|
|
283
|
+
</th>
|
|
284
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
285
|
+
<SortHeader
|
|
286
|
+
label="Title"
|
|
287
|
+
field="title"
|
|
288
|
+
current={sortBy}
|
|
289
|
+
dir={dir}
|
|
290
|
+
onSort={handleSort}
|
|
291
|
+
/>
|
|
292
|
+
</th>
|
|
293
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
294
|
+
<SortHeader
|
|
295
|
+
label="Type"
|
|
296
|
+
field="type"
|
|
297
|
+
current={sortBy}
|
|
298
|
+
dir={dir}
|
|
299
|
+
onSort={handleSort}
|
|
300
|
+
/>
|
|
301
|
+
</th>
|
|
302
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
303
|
+
<SortHeader
|
|
304
|
+
label="Author"
|
|
305
|
+
field="author"
|
|
306
|
+
current={sortBy}
|
|
307
|
+
dir={dir}
|
|
308
|
+
onSort={handleSort}
|
|
309
|
+
/>
|
|
310
|
+
</th>
|
|
311
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
312
|
+
<SortHeader
|
|
313
|
+
label="Status"
|
|
314
|
+
field="status"
|
|
315
|
+
current={sortBy}
|
|
316
|
+
dir={dir}
|
|
317
|
+
onSort={handleSort}
|
|
318
|
+
/>
|
|
319
|
+
</th>
|
|
320
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
321
|
+
<SortHeader
|
|
322
|
+
label="Date"
|
|
323
|
+
field="date"
|
|
324
|
+
current={sortBy}
|
|
325
|
+
dir={dir}
|
|
326
|
+
onSort={handleSort}
|
|
327
|
+
/>
|
|
328
|
+
</th>
|
|
329
|
+
<th scope="col" className="px-3 py-2.5 text-left">
|
|
330
|
+
<SortHeader
|
|
331
|
+
label="SEO"
|
|
332
|
+
field="seo"
|
|
333
|
+
current={sortBy}
|
|
334
|
+
dir={dir}
|
|
335
|
+
onSort={handleSort}
|
|
336
|
+
/>
|
|
337
|
+
</th>
|
|
350
338
|
</tr>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
339
|
+
</thead>
|
|
340
|
+
<tbody>
|
|
341
|
+
{loading && posts.length === 0 && <LoadingRows />}
|
|
342
|
+
{!loading && error && (
|
|
343
|
+
<tr>
|
|
344
|
+
<td colSpan={7} className="px-3 py-12 text-center">
|
|
345
|
+
<div className="text-foreground mb-2 text-sm font-medium">{error}</div>
|
|
346
|
+
<button
|
|
347
|
+
onClick={() => setRefreshToken((t) => t + 1)}
|
|
348
|
+
className="text-primary text-sm hover:underline"
|
|
349
|
+
>
|
|
350
|
+
Try again
|
|
351
|
+
</button>
|
|
352
|
+
</td>
|
|
353
|
+
</tr>
|
|
354
|
+
)}
|
|
355
|
+
{!loading && !error && posts.length === 0 && (
|
|
356
|
+
<EmptyRow
|
|
357
|
+
filtersActive={filtersAreActive}
|
|
358
|
+
onClear={clearFilters}
|
|
359
|
+
onNewPost={() => onNavigate('/posts/new')}
|
|
368
360
|
/>
|
|
369
|
-
)
|
|
370
|
-
|
|
371
|
-
|
|
361
|
+
)}
|
|
362
|
+
{!loading &&
|
|
363
|
+
!error &&
|
|
364
|
+
posts.map((p) => (
|
|
365
|
+
<PostRow
|
|
366
|
+
key={p.id}
|
|
367
|
+
post={p}
|
|
368
|
+
selected={selected.has(p.id)}
|
|
369
|
+
onSelect={() => toggleOne(p.id)}
|
|
370
|
+
onOpen={() => onNavigate(`/posts/${p.postTypeId}/${p.id}/edit`)}
|
|
371
|
+
/>
|
|
372
|
+
))}
|
|
373
|
+
</tbody>
|
|
374
|
+
</table>
|
|
375
|
+
</div>
|
|
372
376
|
|
|
373
377
|
{/* Pagination footer */}
|
|
374
378
|
<PaginationFooter
|