mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #987 - Support custom css
This commit is contained in:
parent
22c701d9a9
commit
bed14f4b40
5 changed files with 32 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
var brandingConfigKey = "branding";
|
||||
var currentBrandingOptions;
|
||||
|
||||
function loadPage(page, config, languageOptions) {
|
||||
|
||||
|
@ -49,7 +50,10 @@
|
|||
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).done(function (config) {
|
||||
|
||||
currentBrandingOptions = config;
|
||||
|
||||
$('#txtLoginDisclaimer', page).val(config.LoginDisclaimer || '');
|
||||
$('#txtCustomCss', page).val(config.CustomCss || '');
|
||||
});
|
||||
|
||||
}).on('pageinit', "#dashboardGeneralPage", function () {
|
||||
|
@ -99,8 +103,15 @@
|
|||
ApiClient.getNamedConfiguration(brandingConfigKey).done(function (brandingConfig) {
|
||||
|
||||
brandingConfig.LoginDisclaimer = $('#txtLoginDisclaimer', form).val();
|
||||
brandingConfig.CustomCss = $('#txtCustomCss', form).val();
|
||||
|
||||
var cssChanged = currentBrandingOptions && brandingConfig.CustomCss != currentBrandingOptions.CustomCss;
|
||||
|
||||
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
|
||||
if (cssChanged) {
|
||||
Dashboard.showDashboardRefreshNotification();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue