mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove appservices page in favor of plugin catalog
This commit is contained in:
parent
07673d0ae6
commit
579fbe90c8
9 changed files with 7 additions and 125 deletions
|
@ -1,56 +0,0 @@
|
|||
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.querySelector(".headerHelpButton").setAttribute("href", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Sync")) : "livetv" == context ? (libraryMenu.setTitle(Globalize.translate("TitleLiveTV")), page.querySelector(".headerHelpButton").setAttribute("href", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Live-TV")) : "notifications" == context && (libraryMenu.setTitle(Globalize.translate("TitleNotifications")), page.querySelector(".headerHelpButton").setAttribute("href", "https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Notifications"))
|
||||
}
|
||||
pageIdOn("pagebeforeshow", "appServicesPage", onPageShow), pageIdOn("pageshow", "appServicesPage", onPageShow), pageIdOn("pageshow", "appServicesPage", function() {
|
||||
reloadList(this)
|
||||
})
|
||||
});
|
|
@ -188,16 +188,6 @@ define(["jQuery", "globalize", "scripts/taskbutton", "dom", "libraryMenu", "layo
|
|||
Dashboard.navigate("livetvtuner.html")
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "livetvstatus.html",
|
||||
name: globalize.translate("TabDevices")
|
||||
}, {
|
||||
href: "appservices.html?context=livetv",
|
||||
name: globalize.translate("TabServices")
|
||||
}]
|
||||
}
|
||||
|
||||
function showDeviceMenu(button, tunerDeviceId) {
|
||||
var items = [];
|
||||
items.push({
|
||||
|
|
|
@ -13,15 +13,6 @@ define(["loading", "libraryMenu", "globalize", "listViewStyle", "emby-linkbutton
|
|||
})
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
|
@ -423,11 +423,6 @@ var Dashboard = {
|
|||
autoFocus: !1,
|
||||
roles: "admin",
|
||||
controller: "scripts/addpluginpage"
|
||||
}), defineRoute({
|
||||
path: "/appservices.html",
|
||||
dependencies: [],
|
||||
autoFocus: !1,
|
||||
roles: "admin"
|
||||
}), defineRoute({
|
||||
path: "/autoorganizelog.html",
|
||||
dependencies: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue