mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
2c42afd83b
commit
e03c297f2f
64 changed files with 170 additions and 49 deletions
|
@ -1 +1 @@
|
|||
define(["jQuery","loading","libraryMenu"],function($,loading,libraryMenu){"use strict";function reloadList(page){loading.show();var promise1=ApiClient.getAvailablePlugins({TargetSystems:"Server"}),promise2=ApiClient.getInstalledPlugins();Promise.all([promise1,promise2]).then(function(responses){renderInstalled(page,responses[0],responses[1]),renderCatalog(page,responses[0],responses[1])})}function getCategories(){var context=getParameterByName("context"),categories=[];return"sync"==context?categories.push("Sync"):"livetv"==context?categories.push("Live TV"):"notifications"==context&&categories.push("Notifications"),categories}function renderInstalled(page,availablePlugins,installedPlugins){requirejs(["scripts/pluginspage"],function(){var category=getCategories()[0];installedPlugins=installedPlugins.filter(function(i){var catalogEntry=availablePlugins.filter(function(a){return(a.guid||"").toLowerCase()==(i.Id||"").toLowerCase()})[0];return!!catalogEntry&&catalogEntry.category==category}),PluginsPage.renderPlugins(page,installedPlugins)})}function renderCatalog(page,availablePlugins,installedPlugins){requirejs(["scripts/plugincatalogpage"],function(){var categories=getCategories();PluginCatalog.renderCatalog({catalogElement:$(".catalog",page),availablePlugins:availablePlugins,installedPlugins:installedPlugins,categories:categories,showCategory:!1,context:getParameterByName("context"),targetSystem:"Server"})})}$(document).on("pagebeforeshow pageshow","#appServicesPage",function(){var page=this,context=getParameterByName("context");"sync"==context?(libraryMenu.setTitle(Globalize.translate("TitleSync")),page.setAttribute("data-helpurl","https://github.com/MediaBrowser/Wiki/wiki/Sync")):"livetv"==context?(libraryMenu.setTitle(Globalize.translate("TitleLiveTV")),page.setAttribute("data-helpurl","https://github.com/MediaBrowser/Wiki/wiki/Live%20TV")):"notifications"==context&&(libraryMenu.setTitle(Globalize.translate("TitleNotifications")),page.setAttribute("data-helpurl","https://github.com/MediaBrowser/Wiki/wiki/Notifications"))}).on("pageshow","#appServicesPage",function(){var page=this;reloadList(page)})});
|
||||
define(["loading","libraryMenu"],function(loading,libraryMenu){"use strict";function reloadList(page){loading.show();var promise1=ApiClient.getAvailablePlugins({TargetSystems:"Server"}),promise2=ApiClient.getInstalledPlugins();Promise.all([promise1,promise2]).then(function(responses){renderInstalled(page,responses[0],responses[1]),renderCatalog(page,responses[0],responses[1])})}function getCategories(){var context=getParameterByName("context"),categories=[];return"sync"==context?categories.push("Sync"):"livetv"==context?categories.push("Live TV"):"notifications"==context&&categories.push("Notifications"),categories}function renderInstalled(page,availablePlugins,installedPlugins){requirejs(["scripts/pluginspage"],function(){var category=getCategories()[0];installedPlugins=installedPlugins.filter(function(i){var catalogEntry=availablePlugins.filter(function(a){return(a.guid||"").toLowerCase()==(i.Id||"").toLowerCase()})[0];return!!catalogEntry&&catalogEntry.category==category}),PluginsPage.renderPlugins(page,installedPlugins)})}function renderCatalog(page,availablePlugins,installedPlugins){requirejs(["scripts/plugincatalogpage"],function(){var categories=getCategories();PluginCatalog.renderCatalog({catalogElement:page.querySelector(".catalog"),availablePlugins:availablePlugins,installedPlugins:installedPlugins,categories:categories,showCategory:!1,context:getParameterByName("context"),targetSystem:"Server"})})}function onPageShow(){var page=this,context=getParameterByName("context");"sync"==context?(libraryMenu.setTitle(Globalize.translate("TitleSync")),page.setAttribute("data-helpurl","https://github.com/MediaBrowser/Wiki/wiki/Sync")):"livetv"==context?(libraryMenu.setTitle(Globalize.translate("TitleLiveTV")),page.setAttribute("data-helpurl","https://github.com/MediaBrowser/Wiki/wiki/Live%20TV")):"notifications"==context&&(libraryMenu.setTitle(Globalize.translate("TitleNotifications")),page.setAttribute("data-helpurl","https://github.com/MediaBrowser/Wiki/wiki/Notifications"))}pageIdOn("pagebeforeshow","appServicesPage",onPageShow),pageIdOn("pageshow","appServicesPage",onPageShow),pageIdOn("pageshow","appServicesPage",function(){var page=this;reloadList(page)})});
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
define(["jQuery","loading","libraryMenu","listViewStyle","emby-linkbutton"],function($,loading,libraryMenu){"use strict";function deleteDevice(page,id){var msg=Globalize.translate("DeleteDeviceConfirmation");require(["confirm"],function(confirm){confirm(msg,Globalize.translate("HeaderDeleteDevice")).then(function(){loading.show(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Devices",{Id:id})}).then(function(){loadData(page)})})})}function load(page,devices){var html="";devices.length&&(html+='<div class="paperList">'),html+=devices.map(function(d){var deviceHtml="";return deviceHtml+='<div class="listItem">',deviceHtml+='<i class="listItemIcon md-icon" style="background:#999;">tablet_android</i>',deviceHtml+=d.AppName&&d.LastUserName?'<div class="listItemBody three-line">':'<div class="listItemBody two-line">',deviceHtml+='<a class="clearLink" data-ripple="false" style="display:block;text-align:left;" is="emby-linkbutton" href="device.html?id='+d.Id+'">',deviceHtml+='<div class="listItemBodyText">',deviceHtml+=d.Name,deviceHtml+="</div>",d.AppName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=d.AppName,deviceHtml+="</div>"),d.LastUserName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=Globalize.translate("DeviceLastUsedByUserName",d.LastUserName),deviceHtml+="</div>"),deviceHtml+="</a>",deviceHtml+="</div>",deviceHtml+='<button type="button" is="paper-icon-button-light" class="btnDeleteDevice" data-id="'+d.Id+'" title="'+Globalize.translate("ButtonDelete")+'"><i class="md-icon">delete</i></button>',deviceHtml+="</div>"}).join(""),devices.length&&(html+="</div>");var elem=$(".devicesList",page).html(html).trigger("create");$(".btnDeleteDevice",elem).on("click",function(){deleteDevice(page,this.getAttribute("data-id"))})}function loadData(page){loading.show(),ApiClient.getJSON(ApiClient.getUrl("Devices",{SupportsPersistentIdentifier:!0})).then(function(result){load(page,result.Items),loading.hide()})}$(document).on("pageshow","#devicesPage",function(){var page=this;loadData(page)})});
|
||||
define(["jQuery","loading","libraryMenu","listViewStyle","emby-linkbutton"],function($,loading,libraryMenu){"use strict";function deleteDevice(page,id){var msg=Globalize.translate("DeleteDeviceConfirmation");require(["confirm"],function(confirm){confirm(msg,Globalize.translate("HeaderDeleteDevice")).then(function(){loading.show(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Devices",{Id:id})}).then(function(){loadData(page)})})})}function load(page,devices){var html="";devices.length&&(html+='<div class="paperList">'),html+=devices.map(function(d){var deviceHtml="";return deviceHtml+='<div class="listItem">',deviceHtml+='<i class="listItemIcon md-icon" style="background:#999;">tablet_android</i>',deviceHtml+=d.AppName&&d.LastUserName?'<div class="listItemBody three-line">':'<div class="listItemBody two-line">',deviceHtml+='<a class="clearLink" data-ripple="false" style="display:block;text-align:left;padding:0;margin:0;" is="emby-linkbutton" href="device.html?id='+d.Id+'">',deviceHtml+='<div class="listItemBodyText">',deviceHtml+=d.Name,deviceHtml+="</div>",d.AppName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=d.AppName,deviceHtml+="</div>"),d.LastUserName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=Globalize.translate("DeviceLastUsedByUserName",d.LastUserName),deviceHtml+="</div>"),deviceHtml+="</a>",deviceHtml+="</div>",deviceHtml+='<button type="button" is="paper-icon-button-light" class="btnDeleteDevice" data-id="'+d.Id+'" title="'+Globalize.translate("ButtonDelete")+'"><i class="md-icon">delete</i></button>',deviceHtml+="</div>"}).join(""),devices.length&&(html+="</div>");var elem=$(".devicesList",page).html(html).trigger("create");$(".btnDeleteDevice",elem).on("click",function(){deleteDevice(page,this.getAttribute("data-id"))})}function loadData(page){loading.show(),ApiClient.getJSON(ApiClient.getUrl("Devices",{SupportsPersistentIdentifier:!0})).then(function(result){load(page,result.Items),loading.hide()})}$(document).on("pageshow","#devicesPage",function(){var page=this;loadData(page)})});
|
|
@ -1 +1 @@
|
|||
define(["jQuery","loading","libraryMenu","listViewStyle"],function($,loading,libraryMenu){"use strict";function loadProfiles(page){loading.show(),ApiClient.getJSON(ApiClient.getUrl("Dlna/ProfileInfos")).then(function(result){renderUserProfiles(page,result),renderSystemProfiles(page,result),loading.hide()})}function renderUserProfiles(page,profiles){renderProfiles(page,page.querySelector(".customProfiles"),profiles.filter(function(p){return"User"==p.Type}))}function renderSystemProfiles(page,profiles){renderProfiles(page,page.querySelector(".systemProfiles"),profiles.filter(function(p){return"System"==p.Type}))}function renderProfiles(page,element,profiles){var html="";profiles.length&&(html+='<div class="paperList">');for(var i=0,length=profiles.length;i<length;i++){var profile=profiles[i];html+='<div class="listItem">',html+="<a item-icon class='clearLink listItemIconContainer' href='dlnaprofile.html?id="+profile.Id+"'>",html+='<i class="md-icon listItemIcon">dvr</i>',html+="</a>",html+='<div class="listItemBody">',html+="<a class='clearLink' href='dlnaprofile.html?id="+profile.Id+"'>",html+="<div>"+profile.Name+"</div>",html+="</a>",html+="</div>","User"==profile.Type&&(html+='<button type="button" is="paper-icon-button-light" class="btnDeleteProfile" data-profileid="'+profile.Id+'" title="'+Globalize.translate("ButtonDelete")+'"><i class="md-icon">delete</i></button>'),html+="</div>"}profiles.length&&(html+="</div>"),element.innerHTML=html,$(".btnDeleteProfile",element).on("click",function(){var id=this.getAttribute("data-profileid");deleteProfile(page,id)})}function deleteProfile(page,id){require(["confirm"],function(confirm){confirm(Globalize.translate("MessageConfirmProfileDeletion"),Globalize.translate("HeaderConfirmProfileDeletion")).then(function(){loading.show(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Dlna/Profiles/"+id)}).then(function(){loading.hide(),loadProfiles(page)})})})}function getTabs(){return[{href:"dlnasettings.html",name:Globalize.translate("TabSettings")},{href:"dlnaprofiles.html",name:Globalize.translate("TabProfiles")}]}$(document).on("pageshow","#dlnaProfilesPage",function(){libraryMenu.setTabs("dlna",1,getTabs);var page=this;loadProfiles(page)})});
|
||||
define(["jQuery","globalize","loading","libraryMenu","listViewStyle","emby-linkbutton"],function($,globalize,loading,libraryMenu){"use strict";function loadProfiles(page){loading.show(),ApiClient.getJSON(ApiClient.getUrl("Dlna/ProfileInfos")).then(function(result){renderUserProfiles(page,result),renderSystemProfiles(page,result),loading.hide()})}function renderUserProfiles(page,profiles){renderProfiles(page,page.querySelector(".customProfiles"),profiles.filter(function(p){return"User"==p.Type}))}function renderSystemProfiles(page,profiles){renderProfiles(page,page.querySelector(".systemProfiles"),profiles.filter(function(p){return"System"==p.Type}))}function renderProfiles(page,element,profiles){var html="";profiles.length&&(html+='<div class="paperList">');for(var i=0,length=profiles.length;i<length;i++){var profile=profiles[i];html+='<div class="listItem">',html+="<a is='emby-linkbutton' style='padding:0;margin:0;' data-ripple='false' class='clearLink listItemIconContainer' href='dlnaprofile.html?id="+profile.Id+"'>",html+='<i class="md-icon listItemIcon">dvr</i>',html+="</a>",html+='<div class="listItemBody">',html+="<a is='emby-linkbutton' style='padding:0;margin:0;' data-ripple='false' class='clearLink' href='dlnaprofile.html?id="+profile.Id+"'>",html+="<div>"+profile.Name+"</div>",html+="</a>",html+="</div>","User"==profile.Type&&(html+='<button type="button" is="paper-icon-button-light" class="btnDeleteProfile" data-profileid="'+profile.Id+'" title="'+globalize.translate("ButtonDelete")+'"><i class="md-icon">delete</i></button>'),html+="</div>"}profiles.length&&(html+="</div>"),element.innerHTML=html,$(".btnDeleteProfile",element).on("click",function(){var id=this.getAttribute("data-profileid");deleteProfile(page,id)})}function deleteProfile(page,id){require(["confirm"],function(confirm){confirm(globalize.translate("MessageConfirmProfileDeletion"),globalize.translate("HeaderConfirmProfileDeletion")).then(function(){loading.show(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Dlna/Profiles/"+id)}).then(function(){loading.hide(),loadProfiles(page)})})})}function getTabs(){return[{href:"dlnasettings.html",name:globalize.translate("TabSettings")},{href:"dlnaprofiles.html",name:globalize.translate("TabProfiles")}]}$(document).on("pageshow","#dlnaProfilesPage",function(){libraryMenu.setTabs("dlna",1,getTabs);var page=this;loadProfiles(page)})});
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
define(["jQuery","loading","libraryMenu","listViewStyle"],function($,loading,libraryMenu){"use strict";function reload(page){loading.show(),ApiClient.getJSON(ApiClient.getUrl("Notifications/Types")).then(function(list){var html="",lastCategory="";html+=list.map(function(i){var itemHtml="";return i.Category!=lastCategory&&(lastCategory=i.Category,lastCategory&&(itemHtml+="</div>"),itemHtml+="<h1>",itemHtml+=i.Category,itemHtml+="</h1>",itemHtml+='<div class="paperList" style="margin-bottom:2em;">'),itemHtml+='<a class="clearLink" href="notificationsetting.html?type='+i.Type+'">',itemHtml+='<div class="listItem">',itemHtml+=i.Enabled?'<i class="listItemIcon md-icon">notifications_active</i>':'<i class="listItemIcon md-icon" style="background-color:#999;">notifications_off</i>',itemHtml+='<div class="listItemBody">',itemHtml+='<div class="listItemBodyText">'+i.Name+"</div>",itemHtml+="</div>",itemHtml+='<button type="button" is="paper-icon-button-light"><i class="md-icon">mode_edit</i></button>',itemHtml+="</div>",itemHtml+="</a>"}).join(""),list.length&&(html+="</div>"),$(".notificationList",page).html(html).trigger("create"),loading.hide()})}function getTabs(){return[{href:"notificationsettings.html",name:Globalize.translate("TabNotifications")},{href:"appservices.html?context=notifications",name:Globalize.translate("TabServices")}]}return function(view,params){view.addEventListener("viewshow",function(){libraryMenu.setTabs("notifications",0,getTabs),reload(view)})}});
|
||||
define(["loading","libraryMenu","listViewStyle","emby-linkbutton"],function(loading,libraryMenu){"use strict";function reload(page){loading.show(),ApiClient.getJSON(ApiClient.getUrl("Notifications/Types")).then(function(list){var html="",lastCategory="";html+=list.map(function(i){var itemHtml="";return i.Category!=lastCategory&&(lastCategory=i.Category,lastCategory&&(itemHtml+="</div>"),itemHtml+="<h1>",itemHtml+=i.Category,itemHtml+="</h1>",itemHtml+='<div class="paperList" style="margin-bottom:2em;">'),itemHtml+='<a class="clearLink" is="emby-linkbutton" style="display:block;margin:0;padding:0;" data-ripple="false" href="notificationsetting.html?type='+i.Type+'">',itemHtml+='<div class="listItem">',itemHtml+=i.Enabled?'<i class="listItemIcon md-icon">notifications_active</i>':'<i class="listItemIcon md-icon" style="background-color:#999;">notifications_off</i>',itemHtml+='<div class="listItemBody">',itemHtml+='<div class="listItemBodyText">'+i.Name+"</div>",itemHtml+="</div>",itemHtml+='<button type="button" is="paper-icon-button-light"><i class="md-icon">mode_edit</i></button>',itemHtml+="</div>",itemHtml+="</a>"}).join(""),list.length&&(html+="</div>"),page.querySelector(".notificationList").innerHTML=html,loading.hide()})}function getTabs(){return[{href:"notificationsettings.html",name:Globalize.translate("TabNotifications")},{href:"appservices.html?context=notifications",name:Globalize.translate("TabServices")}]}return function(view,params){view.addEventListener("viewshow",function(){libraryMenu.setTabs("notifications",0,getTabs),reload(view)})}});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue