apply suggestions from code review

Co-Authored-By: dkanada <dkanada@users.noreply.github.com>
This commit is contained in:
Vasily 2019-02-05 14:26:51 +00:00 committed by Bond-009
parent f4798932ef
commit 0f96bb2b82
2 changed files with 13 additions and 4 deletions

View File

@ -44,10 +44,19 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
var msg = globalize.translate("MessageInstallPluginFromApp");
$("#nonServerMsg", page).html(msg).show();
}
pkg.shortDescription ? $("#tagline", page).show().html(pkg.shortDescription) : $("#tagline", page).hide();
if (pkg.shortDescription) {
$("#tagline", page).show().html(pkg.shortDescription);
} else {
$("#tagline", page).hide();
}
$("#overview", page).html(pkg.overview || "");
$("#developer", page).html(pkg.owner);
pkg.richDescUrl ? ($("#pViewWebsite", page).show(), $("#pViewWebsite a", page).attr("href", pkg.richDescUrl)) : $("#pViewWebsite", page).hide();
if (pkg.richDescUrl) {
$("#pViewWebsite", page).show();
$("#pViewWebsite a", page).attr("href", pkg.richDescUrl);
} else {
$("#pViewWebsite", page).hide();
}
if (pkg.previewImage || pkg.thumbImage) {
var img = pkg.previewImage ? pkg.previewImage : pkg.thumbImage;
$("#pPreviewImage", page).show().html("<img class='pluginPreviewImg' src='" + img + "' style='max-width: 100%;' />");
@ -128,4 +137,4 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
})
})
}
});
});

View File

@ -199,7 +199,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
if (user.localUser) {
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder lnkMySettings" href="mypreferencesmenu.html"><i class="md-icon navMenuOptionIcon">settings</i><span class="navMenuOptionText">' + globalize.translate("ButtonSettings") + "</span></a>";
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" data-itemid="selectserver" href="selectserver.html?showuser=1"><i class="md-icon navMenuOptionIcon">wifi</i><span class="navMenuOptionText">' + globalize.translate("ButtonSelectServer") + "</span></a>";
if (!localUser.EnableAutoLogin) {
if (!user.localUser.EnableAutoLogin) {
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnLogout" data-itemid="logout" href="#"><i class="md-icon navMenuOptionIcon">exit_to_app</i><span class="navMenuOptionText">' + globalize.translate("ButtonSignOut") + "</span></a>";
}
}