1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove branding from general settings page

This commit is contained in:
Bill Thornton 2024-11-20 18:06:44 -05:00
parent ca5f94df63
commit 06f2c226e1
2 changed files with 6 additions and 37 deletions

View file

@ -62,24 +62,6 @@
</label> </label>
</div> </div>
<div class="verticalSection">
<h2>${HeaderBranding}</h2>
<div class="inputContainer">
<textarea is="emby-textarea" id="txtLoginDisclaimer" label="${LabelLoginDisclaimer}" class="textarea-mono"></textarea>
<div class="fieldDescription">${LabelLoginDisclaimerHelp}</div>
</div>
<div class="inputContainer customCssContainer">
<textarea is="emby-textarea" id="txtCustomCss" label="${LabelCustomCss}" class="textarea-mono"></textarea>
<div class="fieldDescription">${LabelCustomCssHelp}</div>
</div>
<div class="checkboxList paperList" style="padding:.5em 1em;">
<label>
<input type="checkbox" is="emby-checkbox" id="chkSplashScreenAvailable" />
<span>${EnableSplashScreen}</span>
</label>
</div>
</div>
<div class="verticalSection"> <div class="verticalSection">
<h2>${HeaderPerformance}</h2> <h2>${HeaderPerformance}</h2>
<div class="inputContainer"> <div class="inputContainer">

View file

@ -39,25 +39,17 @@ function onSubmit() {
config.LibraryScanFanoutConcurrency = parseInt(form.querySelector('#txtLibraryScanFanoutConcurrency').value || '0', 10); config.LibraryScanFanoutConcurrency = parseInt(form.querySelector('#txtLibraryScanFanoutConcurrency').value || '0', 10);
config.ParallelImageEncodingLimit = parseInt(form.querySelector('#txtParallelImageEncodingLimit').value || '0', 10); config.ParallelImageEncodingLimit = parseInt(form.querySelector('#txtParallelImageEncodingLimit').value || '0', 10);
ApiClient.updateServerConfiguration(config).then(function() { return ApiClient.updateServerConfiguration(config)
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) { .then(() => {
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value; Dashboard.processServerConfigurationUpdateResult();
brandingConfig.CustomCss = form.querySelector('#txtCustomCss').value; }).catch(() => {
brandingConfig.SplashscreenEnabled = form.querySelector('#chkSplashScreenAvailable').checked; loading.hide();
alert(globalize.translate('ErrorDefault'));
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function () {
Dashboard.processServerConfigurationUpdateResult();
});
}); });
}, function () {
alert(globalize.translate('ErrorDefault'));
Dashboard.processServerConfigurationUpdateResult();
});
}); });
return false; return false;
} }
const brandingConfigKey = 'branding';
export default function (view) { export default function (view) {
$('#btnSelectCachePath', view).on('click.selectDirectory', function () { $('#btnSelectCachePath', view).on('click.selectDirectory', function () {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => { import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
@ -107,11 +99,6 @@ export default function (view) {
Promise.all([promiseConfig, promiseLanguageOptions, promiseSystemInfo]).then(function (responses) { Promise.all([promiseConfig, promiseLanguageOptions, promiseSystemInfo]).then(function (responses) {
loadPage(view, responses[0], responses[1], responses[2]); loadPage(view, responses[0], responses[1], responses[2]);
}); });
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (config) {
view.querySelector('#txtLoginDisclaimer').value = config.LoginDisclaimer || '';
view.querySelector('#txtCustomCss').value = config.CustomCss || '';
view.querySelector('#chkSplashScreenAvailable').checked = config.SplashscreenEnabled === true;
});
}); });
} }