mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-21 18:55:36 +02:00
fix(frontend): skeleton replacement ordering and col-check alignment
- Await the entry list refresh before removing the skeleton so the real row arrives before the placeholder disappears. handleCaptured now returns its Promise.all; startPolling awaits it before calling onJobSettled on the success path. - Add col-check as the first child of SkeletonEntryRow to match EntryRow's DOM structure; without it, columns misalign on touch devices where col-check becomes display:flex.
This commit is contained in:
parent
3bd61e944e
commit
e8ee0f5de9
3 changed files with 3 additions and 2 deletions
|
|
@ -436,7 +436,7 @@ export default function App() {
|
|||
|
||||
const handleCaptured = useCallback(() => {
|
||||
if (!archiveId) return
|
||||
Promise.all([
|
||||
return Promise.all([
|
||||
loadEntries(archiveId, searchQuery, tagFilter),
|
||||
fetchRuns(archiveId).then(setRuns),
|
||||
])
|
||||
|
|
|
|||
|
|
@ -206,8 +206,8 @@ export default function CaptureDialog({ open, archiveId, onClose, onCaptured, on
|
|||
if (updated.status === 'completed') {
|
||||
clearInterval(pollIntervals.current.get(jobUid))
|
||||
pollIntervals.current.delete(jobUid)
|
||||
await Promise.resolve(onCapturedRef.current?.())
|
||||
onJobSettledRef.current?.(bgJobId)
|
||||
onCapturedRef.current()
|
||||
try {
|
||||
const notes = updated.notes_json ? JSON.parse(updated.notes_json) : null
|
||||
if (notes?.ublock_skipped || notes?.cookie_ext_skipped) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default function SkeletonEntryRow() {
|
||||
return (
|
||||
<div className="skeleton-row">
|
||||
<div className="col-check" aria-hidden="true" />
|
||||
<div className="col-added">
|
||||
<span className="skeleton-cell" style={{ width: 108, height: 13 }} />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue