mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Beautified all js in web dashboard
This commit is contained in:
parent
5895f209e7
commit
6bfd795635
346 changed files with 72978 additions and 375 deletions
|
@ -1 +1,29 @@
|
|||
define(["datetime","loading","apphost","listViewStyle","emby-linkbutton","flexStyles"],function(datetime,loading,appHost){"use strict";return function(view,params){view.querySelector("#chkDebugLog").addEventListener("change",function(){ApiClient.getServerConfiguration().then(function(config){config.EnableDebugLevelLogging=view.querySelector("#chkDebugLog").checked,ApiClient.updateServerConfiguration(config)})}),view.addEventListener("viewbeforeshow",function(){loading.show();var apiClient=ApiClient;apiClient.getJSON(apiClient.getUrl("System/Logs")).then(function(logs){var html="";html+='<div class="paperList">',html+=logs.map(function(log){var logUrl=apiClient.getUrl("System/Logs/Log",{name:log.Name});logUrl+="&api_key="+apiClient.accessToken();var logHtml="";logHtml+='<a is="emby-linkbutton" href="'+logUrl+'" target="_blank" class="listItem listItem-border" style="color:inherit;">',logHtml+='<div class="listItemBody two-line">',logHtml+="<h3 class='listItemBodyText'>"+log.Name+"</h3>";var date=datetime.parseISO8601Date(log.DateModified,!0),text=datetime.toLocaleDateString(date);return text+=" "+datetime.getDisplayTime(date),logHtml+='<div class="listItemBodyText secondary">'+text+"</div>",logHtml+="</div>",logHtml+="</a>"}).join(""),html+="</div>",view.querySelector(".serverLogs").innerHTML=html,loading.hide()}),apiClient.getServerConfiguration().then(function(config){view.querySelector("#chkDebugLog").checked=config.EnableDebugLevelLogging})})}});
|
||||
define(["datetime", "loading", "apphost", "listViewStyle", "emby-linkbutton", "flexStyles"], function(datetime, loading, appHost) {
|
||||
"use strict";
|
||||
return function(view, params) {
|
||||
view.querySelector("#chkDebugLog").addEventListener("change", function() {
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
config.EnableDebugLevelLogging = view.querySelector("#chkDebugLog").checked, ApiClient.updateServerConfiguration(config)
|
||||
})
|
||||
}), view.addEventListener("viewbeforeshow", function() {
|
||||
loading.show();
|
||||
var apiClient = ApiClient;
|
||||
apiClient.getJSON(apiClient.getUrl("System/Logs")).then(function(logs) {
|
||||
var html = "";
|
||||
html += '<div class="paperList">', html += logs.map(function(log) {
|
||||
var logUrl = apiClient.getUrl("System/Logs/Log", {
|
||||
name: log.Name
|
||||
});
|
||||
logUrl += "&api_key=" + apiClient.accessToken();
|
||||
var logHtml = "";
|
||||
logHtml += '<a is="emby-linkbutton" href="' + logUrl + '" target="_blank" class="listItem listItem-border" style="color:inherit;">', logHtml += '<div class="listItemBody two-line">', logHtml += "<h3 class='listItemBodyText'>" + log.Name + "</h3>";
|
||||
var date = datetime.parseISO8601Date(log.DateModified, !0),
|
||||
text = datetime.toLocaleDateString(date);
|
||||
return text += " " + datetime.getDisplayTime(date), logHtml += '<div class="listItemBodyText secondary">' + text + "</div>", logHtml += "</div>", logHtml += "</a>"
|
||||
}).join(""), html += "</div>", view.querySelector(".serverLogs").innerHTML = html, loading.hide()
|
||||
}), apiClient.getServerConfiguration().then(function(config) {
|
||||
view.querySelector("#chkDebugLog").checked = config.EnableDebugLevelLogging
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue