mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
improve readability of logout function
Co-Authored-By: dkanada <dkanada@users.noreply.github.com>
This commit is contained in:
parent
3c0dbeedd5
commit
3eb533d4bb
1 changed files with 7 additions and 1 deletions
|
@ -63,7 +63,13 @@ var Dashboard = {
|
|||
logout: function(logoutWithServer) {
|
||||
function onLogoutDone() {
|
||||
var loginPage;
|
||||
AppInfo.isNativeApp ? (loginPage = "selectserver.html", window.ApiClient = null) : loginPage = "login.html", Dashboard.navigate(loginPage)
|
||||
if (AppInfo.isNativeApp) {
|
||||
loginPage = "selectserver.html";
|
||||
window.ApiClient = null;
|
||||
} else {
|
||||
loginPage = "login.html";
|
||||
}
|
||||
Dashboard.navigate(loginPage);
|
||||
}!1 === logoutWithServer ? onLogoutDone() : ConnectionManager.logout().then(onLogoutDone)
|
||||
},
|
||||
getConfigurationPageUrl: function(name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue