mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove app router routing
This commit is contained in:
parent
9d6e266cf8
commit
99b2bd4f6e
4 changed files with 54 additions and 345 deletions
|
@ -9,6 +9,7 @@ import ServerConnections from './components/ServerConnections';
|
|||
|
||||
import { appHost } from './components/apphost';
|
||||
import autoFocuser from './components/autoFocuser';
|
||||
import loading from 'components/loading/loading';
|
||||
import { pluginManager } from './components/pluginManager';
|
||||
import { appRouter } from './components/router/appRouter';
|
||||
import globalize from './lib/globalize';
|
||||
|
@ -99,6 +100,16 @@ build: ${__JF_BUILD_VERSION__}`);
|
|||
ServerConnections.currentApiClient()?.ensureWebSocket();
|
||||
});
|
||||
|
||||
// Register API request error handlers
|
||||
ServerConnections.getApiClients().forEach(apiClient => {
|
||||
Events.off(apiClient, 'requestfail', appRouter.onRequestFail);
|
||||
Events.on(apiClient, 'requestfail', appRouter.onRequestFail);
|
||||
});
|
||||
Events.on(ServerConnections, 'apiclientcreated', (_e, apiClient) => {
|
||||
Events.off(apiClient, 'requestfail', appRouter.onRequestFail);
|
||||
Events.on(apiClient, 'requestfail', appRouter.onRequestFail);
|
||||
});
|
||||
|
||||
// Render the app
|
||||
await renderApp();
|
||||
|
||||
|
@ -250,7 +261,7 @@ async function renderApp() {
|
|||
// Remove the splash logo
|
||||
container.innerHTML = '';
|
||||
|
||||
await appRouter.start();
|
||||
loading.show();
|
||||
|
||||
const root = createRoot(container);
|
||||
root.render(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue