mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add code suggestions
This commit is contained in:
parent
5d8fdc311f
commit
4553215841
1 changed files with 9 additions and 9 deletions
|
@ -509,23 +509,23 @@ class AppRouter {
|
|||
if (firstResult && firstResult.State === 'ServerSignIn' && !route.anonymous) {
|
||||
let url = ApiClient.serverAddress() + '/System/Info/Public';
|
||||
fetch(url).then(response => {
|
||||
if (!response.ok) return;
|
||||
response.json().then(data => {
|
||||
if (data !== null && data.StartupWizardCompleted === false) {
|
||||
Dashboard.navigate('wizardstart.html');
|
||||
} else {
|
||||
this.handleConnectionResult(firstResult);
|
||||
}
|
||||
});
|
||||
if (!response.ok) return Promise.reject('fetch failed');
|
||||
return response.json();
|
||||
}).then(data => {
|
||||
if (data !== null && data.StartupWizardCompleted === false) {
|
||||
Dashboard.navigate('wizardstart.html');
|
||||
} else {
|
||||
this.handleConnectionResult(firstResult);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
console.debug('processing path request: ' + pathname);
|
||||
const apiClient = window.connectionManager.currentApiClient();
|
||||
const pathname = ctx.pathname.toLowerCase();
|
||||
|
||||
console.debug('processing path request: ' + pathname);
|
||||
const isCurrentRouteStartup = this.currentRouteInfo ? this.currentRouteInfo.route.startup : true;
|
||||
const shouldExitApp = ctx.isBack && route.isDefaultRoute && isCurrentRouteStartup;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue