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) {
|
if (firstResult && firstResult.State === 'ServerSignIn' && !route.anonymous) {
|
||||||
let url = ApiClient.serverAddress() + '/System/Info/Public';
|
let url = ApiClient.serverAddress() + '/System/Info/Public';
|
||||||
fetch(url).then(response => {
|
fetch(url).then(response => {
|
||||||
if (!response.ok) return;
|
if (!response.ok) return Promise.reject('fetch failed');
|
||||||
response.json().then(data => {
|
return response.json();
|
||||||
if (data !== null && data.StartupWizardCompleted === false) {
|
}).then(data => {
|
||||||
Dashboard.navigate('wizardstart.html');
|
if (data !== null && data.StartupWizardCompleted === false) {
|
||||||
} else {
|
Dashboard.navigate('wizardstart.html');
|
||||||
this.handleConnectionResult(firstResult);
|
} else {
|
||||||
}
|
this.handleConnectionResult(firstResult);
|
||||||
});
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug('processing path request: ' + pathname);
|
|
||||||
const apiClient = window.connectionManager.currentApiClient();
|
const apiClient = window.connectionManager.currentApiClient();
|
||||||
const pathname = ctx.pathname.toLowerCase();
|
const pathname = ctx.pathname.toLowerCase();
|
||||||
|
|
||||||
|
console.debug('processing path request: ' + pathname);
|
||||||
const isCurrentRouteStartup = this.currentRouteInfo ? this.currentRouteInfo.route.startup : true;
|
const isCurrentRouteStartup = this.currentRouteInfo ? this.currentRouteInfo.route.startup : true;
|
||||||
const shouldExitApp = ctx.isBack && route.isDefaultRoute && isCurrentRouteStartup;
|
const shouldExitApp = ctx.isBack && route.isDefaultRoute && isCurrentRouteStartup;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue