mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
use if
This commit is contained in:
parent
17fbb3a312
commit
97d7395148
1 changed files with 8 additions and 2 deletions
|
@ -4,8 +4,14 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific
|
|||
function getEntryHtml(entry, apiClient) {
|
||||
var html = "";
|
||||
html += '<div class="listItem listItem-border">';
|
||||
var color = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "#cc0000" : "#00a4dc";
|
||||
var icon = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "notification_important" : "notifications";
|
||||
if ("Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity) {
|
||||
var color = "#cc0000";
|
||||
var icon = "notification_important";
|
||||
}
|
||||
else {
|
||||
var color = "#00a4dc";
|
||||
var icon = "notifications";
|
||||
}
|
||||
if (entry.UserId && entry.UserPrimaryImageTag) {
|
||||
html += '<i class="listItemIcon md-icon" style="width:2em!important;height:2em!important;padding:0;color:transparent;background-color:' + color + ";background-image:url('" + apiClient.getUserImageUrl(entry.UserId, {
|
||||
type: "Primary",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue