mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Disallow block padding
This commit is contained in:
parent
454b81a037
commit
5e1b6acffe
126 changed files with 2 additions and 2127 deletions
|
@ -4,12 +4,10 @@
|
|||
*/
|
||||
|
||||
function getTextStyles(settings, isCue) {
|
||||
|
||||
let list = [];
|
||||
|
||||
if (isCue) {
|
||||
switch (settings.textSize || '') {
|
||||
|
||||
case 'smaller':
|
||||
list.push({ name: 'font-size', value: '.5em' });
|
||||
break;
|
||||
|
@ -31,7 +29,6 @@ function getTextStyles(settings, isCue) {
|
|||
}
|
||||
} else {
|
||||
switch (settings.textSize || '') {
|
||||
|
||||
case 'smaller':
|
||||
list.push({ name: 'font-size', value: '.8em' });
|
||||
break;
|
||||
|
@ -55,7 +52,6 @@ function getTextStyles(settings, isCue) {
|
|||
}
|
||||
|
||||
switch (settings.dropShadow || '') {
|
||||
|
||||
case 'raised':
|
||||
list.push({ name: 'text-shadow', value: '-1px -1px white, 0px -1px white, -1px 0px white, 1px 1px black, 0px 1px black, 1px 0px black' });
|
||||
break;
|
||||
|
@ -85,7 +81,6 @@ function getTextStyles(settings, isCue) {
|
|||
}
|
||||
|
||||
switch (settings.font || '') {
|
||||
|
||||
case 'typewriter':
|
||||
list.push({ name: 'font-family', value: '"Courier New",monospace' });
|
||||
list.push({ name: 'font-variant', value: 'none' });
|
||||
|
@ -120,7 +115,6 @@ function getTextStyles(settings, isCue) {
|
|||
}
|
||||
|
||||
export function getStyles(settings, isCue) {
|
||||
|
||||
return {
|
||||
text: getTextStyles(settings, isCue),
|
||||
window: []
|
||||
|
@ -128,9 +122,7 @@ export function getStyles(settings, isCue) {
|
|||
}
|
||||
|
||||
function applyStyleList(styles, elem) {
|
||||
|
||||
for (let i = 0, length = styles.length; i < length; i++) {
|
||||
|
||||
let style = styles[i];
|
||||
|
||||
elem.style[style.name] = style.value;
|
||||
|
@ -138,7 +130,6 @@ function applyStyleList(styles, elem) {
|
|||
}
|
||||
|
||||
export function applyStyles(elements, appearanceSettings) {
|
||||
|
||||
let styles = getStyles(appearanceSettings);
|
||||
|
||||
if (elements.text) {
|
||||
|
|
|
@ -32,9 +32,7 @@ function getSubtitleAppearanceObject(context) {
|
|||
}
|
||||
|
||||
function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
||||
|
||||
apiClient.getCultures().then(function (allCultures) {
|
||||
|
||||
if (appHost.supports('subtitleburnsettings') && user.Policy.EnableVideoPlaybackTranscoding) {
|
||||
context.querySelector('.fldBurnIn').classList.remove('hide');
|
||||
}
|
||||
|
@ -65,7 +63,6 @@ function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
|||
}
|
||||
|
||||
function saveUser(context, user, userSettingsInstance, appearanceKey, apiClient) {
|
||||
|
||||
let appearanceSettings = userSettingsInstance.getSubtitleAppearanceSettings(appearanceKey);
|
||||
appearanceSettings = Object.assign(appearanceSettings, getSubtitleAppearanceObject(context));
|
||||
|
||||
|
@ -78,15 +75,12 @@ function saveUser(context, user, userSettingsInstance, appearanceKey, apiClient)
|
|||
}
|
||||
|
||||
function save(instance, context, userId, userSettings, apiClient, enableSaveConfirmation) {
|
||||
|
||||
loading.show();
|
||||
|
||||
appSettings.set('subtitleburnin', context.querySelector('#selectSubtitleBurnIn').value);
|
||||
|
||||
apiClient.getUser(userId).then(function (user) {
|
||||
|
||||
saveUser(context, user, userSettings, instance.appearanceKey, apiClient).then(function () {
|
||||
|
||||
loading.hide();
|
||||
if (enableSaveConfirmation) {
|
||||
import('toast').then(({default: toast}) => {
|
||||
|
@ -95,7 +89,6 @@ function save(instance, context, userId, userSettings, apiClient, enableSaveConf
|
|||
}
|
||||
|
||||
events.trigger(instance, 'saved');
|
||||
|
||||
}, function () {
|
||||
loading.hide();
|
||||
});
|
||||
|
@ -103,7 +96,6 @@ function save(instance, context, userId, userSettings, apiClient, enableSaveConf
|
|||
}
|
||||
|
||||
function onSubtitleModeChange(e) {
|
||||
|
||||
let view = dom.parentWithClass(e.target, 'subtitlesettings');
|
||||
|
||||
let subtitlesHelp = view.querySelectorAll('.subtitlesHelp');
|
||||
|
@ -114,7 +106,6 @@ function onSubtitleModeChange(e) {
|
|||
}
|
||||
|
||||
function onAppearanceFieldChange(e) {
|
||||
|
||||
let view = dom.parentWithClass(e.target, 'subtitlesettings');
|
||||
|
||||
let appearanceSettings = getSubtitleAppearanceObject(view);
|
||||
|
@ -128,9 +119,7 @@ function onAppearanceFieldChange(e) {
|
|||
}
|
||||
|
||||
function embed(options, self) {
|
||||
|
||||
import('text!./subtitlesettings.template.html').then(({default: template}) => {
|
||||
|
||||
options.element.classList.add('subtitlesettings');
|
||||
options.element.innerHTML = globalize.translateHtml(template, 'core');
|
||||
|
||||
|
@ -160,9 +149,7 @@ function embed(options, self) {
|
|||
}
|
||||
|
||||
export class SubtitleSettings {
|
||||
|
||||
constructor(options) {
|
||||
|
||||
this.options = options;
|
||||
|
||||
embed(options, this);
|
||||
|
@ -204,7 +191,6 @@ export class SubtitleSettings {
|
|||
let userSettings = self.options.userSettings;
|
||||
|
||||
userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||
|
||||
let enableSaveConfirmation = self.options.enableSaveConfirmation;
|
||||
save(self, self.options.element, userId, userSettings, apiClient, enableSaveConfirmation);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue