Files
Jérémie PardouandJonathan Adeline ca72db9a16 Nuxt3 builder fixes and cleanup (#4657)
* Fix preview error with page parameter

* Fix OIDC form support

* Fix input border color

* Fix some builder inputs

* Clear some TODO MIGs

* Clean comments

* Update snapshot

* Fix page title

* Fix reactivity issue

* refactor: replace individual RadioButtons with a RadioGroup component for choice option type selection.

* Fix domain

---------

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
2026-02-11 11:07:26 +01:00

23 lines
749 B
JavaScript

/**
* If this middleware is added to a page, it will load the pending jobs
* for the user from the server in order to show them in the UI.
*/
export default defineNuxtRouteMiddleware(async () => {
const nuxtApp = useNuxtApp()
const store = nuxtApp.$store
const event = import.meta.server ? useRequestEvent() : null
// If nuxt generate, pass this middleware
if (import.meta.server && !event) return
if (
// If the user is not authenticated we can't fetch unfinished jobs.
store.getters['auth/isAuthenticated'] &&
// If the unfinished jobs haven't been loaded we will load them all.
!store.getters['job/isLoaded'] &&
!store.getters['job/isLoading']
) {
await store.dispatch('job/fetchAllUnfinished')
}
})