add subtitle appearance settings
This commit is contained in:
parent
69a85535d6
commit
b4220cee76
65 changed files with 1931 additions and 597 deletions
|
@ -0,0 +1 @@
|
|||
define([],function(){"use strict";function getTextStyles(settings,isCue){var list=[];if(isCue)switch(settings.textSize||""){case"small":list.push({name:"font-size",value:".7em"});break;case"large":list.push({name:"font-size",value:"1.3em"});break;case"larger":list.push({name:"font-size",value:"1.72em"});break;case"extralarge":list.push({name:"font-size",value:"2em"});break;default:case"medium":}else switch(settings.textSize||""){case"small":list.push({name:"font-size",value:"inherit"});break;case"larger":list.push({name:"font-size",value:"2em"});break;case"extralarge":list.push({name:"font-size",value:"2.2em"});break;case"large":list.push({name:"font-size",value:"1.72em"});break;default:case"medium":list.push({name:"font-size",value:"1.36em"})}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;case"depressed":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;case"uniform":list.push({name:"text-shadow",value:"-1px 0px #000000, 0px 1px #000000, 1px 0px #000000, 0px -1px #000000"});break;case"none":list.push({name:"text-shadow",value:"none"});break;default:case"dropshadow":list.push({name:"text-shadow",value:"#000000 0px 0px 7px"})}var background=settings.textBackground||"transparent";background&&list.push({name:"background",value:background});var textColor=settings.textColor||"#ffffff";switch(textColor&&list.push({name:"color",value:textColor}),settings.font||""){case"typewriter":list.push({name:"font-family",value:'"Courier New",monospace'}),list.push({name:"font-variant",value:"none"});break;case"print":list.push({name:"font-family",value:"Georgia,Times New Roman,Arial,Helvetica,serif"}),list.push({name:"font-variant",value:"none"});break;case"console":list.push({name:"font-family",value:"Consolas,Lucida Console,Menlo,Monaco,Arial,Helvetica,monospace"}),list.push({name:"font-variant",value:"none"});break;case"cursive":list.push({name:"font-family",value:"Lucida Handwriting,Brush Script MT,Segoe Script,Arial,Helvetica"}),list.push({name:"font-variant",value:"none"});break;case"casual":list.push({name:"font-family",value:"Gabriola,Segoe Print,Comic Sans MS,Chalkboard,Arial,Helvetica,cursive"}),list.push({name:"font-variant",value:"none"});break;case"smallcaps":list.push({name:"font-family",value:"Copperplate Gothic,Copperplate Gothic Bold,Copperplate,Arial,Helvetica"}),list.push({name:"font-variant",value:"small-caps"});break;default:list.push({name:"font-family",value:"inherit"}),list.push({name:"font-variant",value:"none"})}return list}function getWindowStyles(settings){return[]}function getStyles(settings,isCue){return{text:getTextStyles(settings,isCue),window:getWindowStyles(settings)}}function applyStyleList(styles,elem){for(var i=0,length=styles.length;i<length;i++){var style=styles[i];elem.style[style.name]=style.value}}function applyStyles(elements,appearanceSettings){var styles=getStyles(appearanceSettings);elements.text&&applyStyleList(styles.text,elements.text),elements.window&&applyStyleList(styles.window,elements.window)}return{getStyles:getStyles,applyStyles:applyStyles}});
|
1
dashboard-ui/bower_components/emby-webcomponents/subtitlesettings/subtitlesettings.js
vendored
Normal file
1
dashboard-ui/bower_components/emby-webcomponents/subtitlesettings/subtitlesettings.js
vendored
Normal file
File diff suppressed because one or more lines are too long
87
dashboard-ui/bower_components/emby-webcomponents/subtitlesettings/subtitlesettings.template.html
vendored
Normal file
87
dashboard-ui/bower_components/emby-webcomponents/subtitlesettings/subtitlesettings.template.html
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
<form style="margin:0 auto;">
|
||||
|
||||
<div class="verticalSection">
|
||||
|
||||
<br />
|
||||
<h1 class="sectionTitle">
|
||||
${HeaderSubtitleSettings}
|
||||
</h1>
|
||||
|
||||
<br />
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectSubtitleLanguage" label="${LabelPreferredSubtitleLanguage}"></select>
|
||||
</div>
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectSubtitlePlaybackMode" label="${LabelSubtitlePlaybackMode}">
|
||||
<option value="Default">${Default}</option>
|
||||
<option value="Smart">${Smart}</option>
|
||||
<option value="OnlyForced">${OnlyForcedSubtitles}</option>
|
||||
<option value="Always">${AlwaysPlaySubtitles}</option>
|
||||
<option value="None">${NoSubtitles}</option>
|
||||
</select>
|
||||
<div class="fieldDescription subtitlesDefaultHelp subtitlesHelp hide">${DefaultSubtitlesHelp}</div>
|
||||
<div class="fieldDescription subtitlesSmartHelp subtitlesHelp hide">${SmartSubtitlesHelp}</div>
|
||||
<div class="fieldDescription subtitlesAlwaysHelp subtitlesHelp hide">${AlwaysPlaySubtitlesHelp}</div>
|
||||
<div class="fieldDescription subtitlesOnlyForcedHelp subtitlesHelp hide">${OnlyForcedSubtitlesHelp}</div>
|
||||
<div class="fieldDescription subtitlesNoneHelp subtitlesHelp hide">${NoSubtitlesHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="verticalSection subtitleAppearanceSection hide">
|
||||
|
||||
<h1 class="sectionTitle">
|
||||
${HeaderSubtitleAppearance}
|
||||
</h1>
|
||||
|
||||
<div style="margin: 2em 0 2em;">
|
||||
<div class="subtitleappearance-preview flex align-items-center justify-content-center" style="border: 1px solid gray; color: black; background: lightblue url(https://github.com/MediaBrowser/Emby.Resources/raw/master/images/subtitles/previewbg.jpg) no-repeat center center; background-size: cover; height: 6em;">
|
||||
<div class="subtitleappearance-preview-window flex align-items-center justify-content-center" style="width: 90%; padding: .25em;">
|
||||
<div class="subtitleappearance-preview-text flex align-items-center justify-content-center">
|
||||
${TheseSettingsAffectSubtitlesOnThisDevice}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldDescription">${SubtitleAppearanceSettingsDisclaimer}</div>
|
||||
</div>
|
||||
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectTextSize" label="${LabelTextSize}">
|
||||
<option value="small">${Small}</option>
|
||||
<option value="">${Medium}</option>
|
||||
<option value="large">${Large}</option>
|
||||
<option value="larger">${Larger}</option>
|
||||
<option value="extralarge">${ExtraLarge}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectFont" label="${LabelFont}">
|
||||
<option value="">${Default}</option>
|
||||
<option value="typewriter">${Typewriter}</option>
|
||||
<option value="print">${Print}</option>
|
||||
<option value="console">${Console}</option>
|
||||
<option value="casual">${Casual}</option>
|
||||
<option value="cursive">${Cursive}</option>
|
||||
<option value="smallcaps">${SmallCaps}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="inputContainer hide">
|
||||
<input is="emby-input" id="inputTextBackground" label="${LabelTextBackgroundColor}" type="text" />
|
||||
</div>
|
||||
<div class="inputContainer hide">
|
||||
<input is="emby-input" id="inputTextColor" label="${LabelTextColor}" type="text" />
|
||||
</div>
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectDropShadow" label="${LabelDropShadow}">
|
||||
<option value="none">${None}</option>
|
||||
<option value="raised">${Raised}</option>
|
||||
<option value="depressed">${Depressed}</option>
|
||||
<option value="uniform">${Uniform}</option>
|
||||
<option value="">${DropShadow}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
||||
<span>${Save}</span>
|
||||
</button>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue