useSignInPageContentStore
This store loads the content of the Sign-In App from the CMS backend and dynamically imports the components specified in the page content.
Info: This store is currently not in use - it was meant as a prototype for frontend issue #24
Used by
State
| Name | Type | Description |
|---|---|---|
pageContent | ref | Holds the actual Page content |
componentInstances | ref | Holds the instances of the loaded components, so that we can integrate in the template |
loading | ref | The loading state for pageContent |
Actions
loadComponent
Dynamically imports a Vue component by its name.
getPageContent
Fetches and processes the page content for the Sign-In App page. This function retrieves data from the backend API /sign-in-page endpoint, then extracts and sets up the tabs and components to be displayed on the page. It dynamically loads Vue components specified in the tab data and maps them to their respective tab IDs for rendering.
- Sets the initial tab based on the query parameter or defaults to the first tab.
- Dynamically imports components and associates them with tab IDs.
- Updates the global pageContent and componentInstances references.
Handles errors by logging them and ensures the loading state is updated.
