Keep the UI attached to background jobs across navigation
Jobs already run on the server — leaving the page or closing the tab does not stop them — but the SPA lost its link to them because the task id lived in component state. The online detail page now looks up the newest task for the post: an active one resumes the progress bar and cancel button, and a finished one shows "your last download for this post finished — J-xx". The downloads list accepts a post_id filter for that lookup. The footer's Active Workers count is also a link to the staff stats dashboard, which is the global view of running jobs.
This commit is contained in:
@@ -175,7 +175,12 @@ export function AppShell() {
|
||||
<Outlet />
|
||||
</main>
|
||||
|
||||
<StatusFooter status={status} />
|
||||
<StatusFooter
|
||||
status={status}
|
||||
staff={Boolean(
|
||||
user && (user.is_staff || user.is_superuser || user.role === "staff"),
|
||||
)}
|
||||
/>
|
||||
<CommandPalette open={paletteOpen} onClose={() => setPaletteOpen(false)} />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user