mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #215 from dkanada/css
Fix some minor CSS issues and add the classic themes back
This commit is contained in:
commit
01ee2fca0e
55 changed files with 120 additions and 390 deletions
|
@ -43,7 +43,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "humanedate", "emby-button
|
|||
callback: function(id) {
|
||||
switch (id) {
|
||||
case "open":
|
||||
Dashboard.navigate("devices/device.html?id=" + deviceId);
|
||||
Dashboard.navigate("device.html?id=" + deviceId);
|
||||
break;
|
||||
case "delete":
|
||||
deleteDevice(view, deviceId)
|
||||
|
@ -57,7 +57,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "humanedate", "emby-button
|
|||
var html = "";
|
||||
html += devices.map(function(device) {
|
||||
var deviceHtml = "";
|
||||
deviceHtml += "<div data-id='" + device.Id + "' class='card backdropCard'>", deviceHtml += '<div class="cardBox visualCardBox">', deviceHtml += '<div class="cardScalable">', deviceHtml += '<div class="cardPadder cardPadder-backdrop"></div>', deviceHtml += '<a is="emby-linkbutton" href="' + (canEdit ? "devices/device.html?id=" + device.Id : "#") + '" class="cardContent cardImageContainer">';
|
||||
deviceHtml += "<div data-id='" + device.Id + "' class='card backdropCard'>", deviceHtml += '<div class="cardBox visualCardBox">', deviceHtml += '<div class="cardScalable">', deviceHtml += '<div class="cardPadder cardPadder-backdrop"></div>', deviceHtml += '<a is="emby-linkbutton" href="' + (canEdit ? "device.html?id=" + device.Id : "#") + '" class="cardContent cardImageContainer">';
|
||||
var iconUrl = device.IconUrl;
|
||||
return iconUrl && -1 === iconUrl.indexOf("://") && (iconUrl = ApiClient.getUrl(iconUrl)), iconUrl ? (deviceHtml += '<div class="cardImage" style="background-image:url(\'' + iconUrl + "');background-size: auto 64%;background-position:center center;\">", deviceHtml += "</div>") : deviceHtml += '<i class="cardImageIcon md-icon">tablet_android</i>', deviceHtml += "</a>", deviceHtml += "</div>", deviceHtml += '<div class="cardFooter">', (canEdit || canDelete(device.Id)) && (deviceHtml += '<div style="text-align:right; float:right;padding-top:5px;">', deviceHtml += '<button type="button" is="paper-icon-button-light" data-id="' + device.Id + '" title="' + globalize.translate("Menu") + '" class="btnDeviceMenu"><i class="md-icon"></i></button>', deviceHtml += "</div>"), deviceHtml += "<div class='cardText'>", deviceHtml += device.Name, deviceHtml += "</div>", deviceHtml += "<div class='cardText cardText-secondary'>", deviceHtml += device.AppName + " " + device.AppVersion, deviceHtml += "</div>", deviceHtml += "<div class='cardText cardText-secondary'>", device.LastUserName && (deviceHtml += device.LastUserName, deviceHtml += ", " + humane_date(device.DateLastActivity)), deviceHtml += " ", deviceHtml += "</div>", deviceHtml += "</div>", deviceHtml += "</div>", deviceHtml += "</div>"
|
||||
}).join(""), page.querySelector(".devicesList").innerHTML = html
|
||||
|
|
|
@ -967,7 +967,25 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
|
|||
var stream = version.MediaStreams[i];
|
||||
if ("Data" != stream.Type) {
|
||||
html += '<div class="mediaInfoStream">';
|
||||
html += '<h3 class="mediaInfoStreamType">' + globalize.translate("MediaInfoStreamType" + stream.Type) + "</h3>";
|
||||
html += '<h3 class="mediaInfoStreamType">';
|
||||
switch (stream.Type) {
|
||||
case 'Audio':
|
||||
html += globalize.translate("MediaInfoStreamTypeAudio");
|
||||
break;
|
||||
case 'Subtitle':
|
||||
html += globalize.translate("MediaInfoStreamTypeSubtitle");
|
||||
break;
|
||||
case 'Video':
|
||||
html += globalize.translate("MediaInfoStreamTypeVideo");
|
||||
break;
|
||||
case 'Data':
|
||||
html += globalize.translate("MediaInfoStreamTypeData");
|
||||
break;
|
||||
case 'EmbeddedImage':
|
||||
html += globalize.translate("MediaInfoStreamTypeEmbeddedImage");
|
||||
break;
|
||||
}
|
||||
html += "</h3>";
|
||||
var attributes = [];
|
||||
stream.DisplayTitle && attributes.push(createAttribute("Title", stream.DisplayTitle)), stream.Language && "Video" != stream.Type && attributes.push(createAttribute(globalize.translate("MediaInfoLanguage"), stream.Language)), stream.Codec && attributes.push(createAttribute(globalize.translate("MediaInfoCodec"), stream.Codec.toUpperCase())), stream.CodecTag && attributes.push(createAttribute(globalize.translate("MediaInfoCodecTag"), stream.CodecTag)), null != stream.IsAVC && attributes.push(createAttribute("AVC", stream.IsAVC ? "Yes" : "No")), stream.Profile && attributes.push(createAttribute(globalize.translate("MediaInfoProfile"), stream.Profile)), stream.Level && attributes.push(createAttribute(globalize.translate("MediaInfoLevel"), stream.Level)), (stream.Width || stream.Height) && attributes.push(createAttribute(globalize.translate("MediaInfoResolution"), stream.Width + "x" + stream.Height)), stream.AspectRatio && "mjpeg" != stream.Codec && attributes.push(createAttribute(globalize.translate("MediaInfoAspectRatio"), stream.AspectRatio)), "Video" == stream.Type && (null != stream.IsAnamorphic && attributes.push(createAttribute(globalize.translate("MediaInfoAnamorphic"), stream.IsAnamorphic ? "Yes" : "No")), attributes.push(createAttribute(globalize.translate("MediaInfoInterlaced"), stream.IsInterlaced ? "Yes" : "No"))), (stream.AverageFrameRate || stream.RealFrameRate) && attributes.push(createAttribute(globalize.translate("MediaInfoFramerate"), stream.AverageFrameRate || stream.RealFrameRate)), stream.ChannelLayout && attributes.push(createAttribute(globalize.translate("MediaInfoLayout"), stream.ChannelLayout)), stream.Channels && attributes.push(createAttribute(globalize.translate("MediaInfoChannels"), stream.Channels + " ch")), stream.BitRate && "mjpeg" != stream.Codec && attributes.push(createAttribute(globalize.translate("MediaInfoBitrate"), parseInt(stream.BitRate / 1e3) + " kbps")), stream.SampleRate && attributes.push(createAttribute(globalize.translate("MediaInfoSampleRate"), stream.SampleRate + " Hz")), stream.VideoRange && "SDR" !== stream.VideoRange && attributes.push(createAttribute(globalize.translate("VideoRange"), stream.VideoRange)), stream.ColorPrimaries && attributes.push(createAttribute(globalize.translate("ColorPrimaries"), stream.ColorPrimaries)), stream.ColorSpace && attributes.push(createAttribute(globalize.translate("ColorSpace"), stream.ColorSpace)), stream.ColorTransfer && attributes.push(createAttribute(globalize.translate("ColorTransfer"), stream.ColorTransfer)), stream.BitDepth && attributes.push(createAttribute(globalize.translate("MediaInfoBitDepth"), stream.BitDepth + " bit")), stream.PixelFormat && attributes.push(createAttribute(globalize.translate("MediaInfoPixelFormat"), stream.PixelFormat)), stream.RefFrames && attributes.push(createAttribute(globalize.translate("MediaInfoRefFrames"), stream.RefFrames)), stream.NalLengthSize && attributes.push(createAttribute("NAL", stream.NalLengthSize)), "Video" != stream.Type && attributes.push(createAttribute(globalize.translate("MediaInfoDefault"), stream.IsDefault ? "Yes" : "No")), "Subtitle" == stream.Type && (attributes.push(createAttribute(globalize.translate("MediaInfoForced"), stream.IsForced ? "Yes" : "No")), attributes.push(createAttribute(globalize.translate("MediaInfoExternal"), stream.IsExternal ? "Yes" : "No"))), "Video" == stream.Type && version.Timestamp && attributes.push(createAttribute(globalize.translate("MediaInfoTimestamp"), version.Timestamp)), html += attributes.join("<br/>"), html += "</div>"
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-button"], functio
|
|||
});
|
||||
|
||||
Dashboard.getCurrentUser().then(function(user) {
|
||||
page.querySelector(".headerUser").innerHTML = user.Name;
|
||||
page.querySelector(".headerUsername").innerHTML = user.Name;
|
||||
if (user.Policy.IsAdministrator) {
|
||||
page.querySelector(".adminSection").classList.remove("hide");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue