mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add adult content filter to catalog
This commit is contained in:
parent
c52720b994
commit
ce1763c192
5 changed files with 30 additions and 12 deletions
|
@ -11,7 +11,7 @@
|
||||||
<a href="plugins.html" data-role="button">${TabMyPlugins}</a>
|
<a href="plugins.html" data-role="button">${TabMyPlugins}</a>
|
||||||
<a href="#" data-role="button" class="ui-btn-active">${TabCatalog}</a>
|
<a href="#" data-role="button" class="ui-btn-active">${TabCatalog}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<fieldset data-role="controlgroup" data-type="horizontal">
|
<fieldset data-role="controlgroup" data-type="horizontal">
|
||||||
<legend>${LabelDisplayPluginsFor}</legend>
|
<legend>${LabelDisplayPluginsFor}</legend>
|
||||||
|
@ -30,6 +30,11 @@
|
||||||
<label for="chkPremium">Free Only</label>
|
<label for="chkPremium">Free Only</label>
|
||||||
</p>
|
</p>
|
||||||
<br />
|
<br />
|
||||||
|
<p style="max-width: 300px;">
|
||||||
|
<label for="chkAdult">${OptionDisplayAdultContent}</label>
|
||||||
|
<input id="chkAdult" type="checkbox" data-mini="true" />
|
||||||
|
</p>
|
||||||
|
<br />
|
||||||
<div id="noPlugins" class="hide">
|
<div id="noPlugins" class="hide">
|
||||||
<div style="text-align: center; margin: 10px;">${MessageNoAvailablePlugins}</div>
|
<div style="text-align: center; margin: 10px;">${MessageNoAvailablePlugins}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
SortBy: "",
|
SortBy: "",
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
|
Fields: "PrimaryImageAspectRatio",
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,11 @@
|
||||||
|
|
||||||
DashboardPage.renderRunningTasks(page, tasks);
|
DashboardPage.renderRunningTasks(page, tasks);
|
||||||
}
|
}
|
||||||
|
else if (msg.MessageType == "PackageInstalling" || msg.MessageType == "PackageInstallationCompleted") {
|
||||||
|
|
||||||
|
DashboardPage.pollForInfo(page, true);
|
||||||
|
DashboardPage.reloadSystemInfo(page);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onWebSocketOpen: function () {
|
onWebSocketOpen: function () {
|
||||||
|
@ -183,11 +188,11 @@
|
||||||
DashboardPage.startInterval();
|
DashboardPage.startInterval();
|
||||||
},
|
},
|
||||||
|
|
||||||
pollForInfo: function (page) {
|
pollForInfo: function (page, forceUpdate) {
|
||||||
|
|
||||||
ApiClient.getSessions().done(function (sessions) {
|
ApiClient.getSessions().done(function (sessions) {
|
||||||
|
|
||||||
DashboardPage.renderInfo(page, sessions);
|
DashboardPage.renderInfo(page, sessions, forceUpdate);
|
||||||
});
|
});
|
||||||
ApiClient.getScheduledTasks().done(function (tasks) {
|
ApiClient.getScheduledTasks().done(function (tasks) {
|
||||||
|
|
||||||
|
@ -195,10 +200,10 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
renderInfo: function (page, sessions) {
|
renderInfo: function (page, sessions, forceUpdate) {
|
||||||
|
|
||||||
DashboardPage.renderActiveConnections(page, sessions);
|
DashboardPage.renderActiveConnections(page, sessions);
|
||||||
DashboardPage.renderPluginUpdateInfo(page);
|
DashboardPage.renderPluginUpdateInfo(page, forceUpdate);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
},
|
},
|
||||||
|
@ -812,10 +817,10 @@
|
||||||
$('#pendingInstallations', page).html(html);
|
$('#pendingInstallations', page).html(html);
|
||||||
},
|
},
|
||||||
|
|
||||||
renderPluginUpdateInfo: function (page) {
|
renderPluginUpdateInfo: function (page, forceUpdate) {
|
||||||
|
|
||||||
// Only check once every 30 mins
|
// Only check once every 30 mins
|
||||||
if (DashboardPage.lastPluginUpdateCheck && (new Date().getTime() - DashboardPage.lastPluginUpdateCheck) < 1800000) {
|
if (!forceUpdate && DashboardPage.lastPluginUpdateCheck && (new Date().getTime() - DashboardPage.lastPluginUpdateCheck) < 1800000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ $.fn.createHoverTouch = function () {
|
||||||
timerId = setTimeout(function () {
|
timerId = setTimeout(function () {
|
||||||
|
|
||||||
$(elem).trigger('hovertouch');
|
$(elem).trigger('hovertouch');
|
||||||
}, 250);
|
}, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopTimer(elem) {
|
function stopTimer(elem) {
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
// The base query options
|
// The base query options
|
||||||
var query = {
|
var query = {
|
||||||
TargetSystems: 'Server'
|
TargetSystems: 'Server',
|
||||||
|
IsAdult: false
|
||||||
};
|
};
|
||||||
|
|
||||||
function getApps() {
|
function getApps() {
|
||||||
|
@ -79,7 +80,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '<div class="ui-bar-a" style="padding: 0 1em;"><h3>' + category + '</h3></div>';
|
html += '<div class="ui-bar-a" style="padding: 0 1em;"><h3>' + category + '</h3></div>';
|
||||||
|
|
||||||
currentCategory = category;
|
currentCategory = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +127,7 @@
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
html += "<div class='posterItemText' style='color:#000;'>";
|
html += "<div class='posterItemText' style='color:#000;'>";
|
||||||
|
|
||||||
if (installedPlugin) {
|
if (installedPlugin) {
|
||||||
html += Globalize.translate('LabelVersionInstalled').replace("{0}", installedPlugin.Version);
|
html += Globalize.translate('LabelVersionInstalled').replace("{0}", installedPlugin.Version);
|
||||||
} else {
|
} else {
|
||||||
|
@ -173,11 +174,17 @@
|
||||||
reloadList(page);
|
reloadList(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#chkAdult', page).on('change', function () {
|
||||||
|
|
||||||
|
query.IsAdult = this.checked ? null : false;
|
||||||
|
reloadList(page);
|
||||||
|
});
|
||||||
|
|
||||||
}).on('pageshow', "#pluginCatalogPage", function () {
|
}).on('pageshow', "#pluginCatalogPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
$(".radioPackageTypes", page).each(function() {
|
$(".radioPackageTypes", page).each(function () {
|
||||||
|
|
||||||
this.checked = this.value == query.TargetSystems;
|
this.checked = this.value == query.TargetSystems;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue