Add option for popup theme

This commit is contained in:
toasted-nutbread 2019-10-12 13:48:23 -04:00
parent be7fa57d5c
commit 696ea80e06
3 changed files with 11 additions and 0 deletions

View File

@ -276,6 +276,7 @@ function profileOptionsCreateDefaults() {
compactTags: false,
compactGlossaries: false,
mainDictionary: '',
popupTheme: 'default',
customPopupCss: ''
},

View File

@ -39,6 +39,7 @@ async function formRead(options) {
options.general.popupVerticalOffset = parseInt($('#popup-vertical-offset').val(), 10);
options.general.popupHorizontalOffset2 = parseInt($('#popup-horizontal-offset2').val(), 0);
options.general.popupVerticalOffset2 = parseInt($('#popup-vertical-offset2').val(), 10);
options.general.popupTheme = $('#popup-theme').val();
options.general.customPopupCss = $('#custom-popup-css').val();
options.audio.enabled = $('#audio-playback-enabled').prop('checked');
@ -107,6 +108,7 @@ async function formWrite(options) {
$('#popup-vertical-offset').val(options.general.popupVerticalOffset);
$('#popup-horizontal-offset2').val(options.general.popupHorizontalOffset2);
$('#popup-vertical-offset2').val(options.general.popupVerticalOffset2);
$('#popup-theme').val(options.general.popupTheme);
$('#custom-popup-css').val(options.general.customPopupCss);
$('#audio-playback-enabled').prop('checked', options.audio.enabled);

View File

@ -231,6 +231,14 @@
</div>
</div>
<div class="form-group">
<label for="popup-theme">Theme</label>
<select class="form-control" id="popup-theme">
<option value="default">Light</option>
<option value="dark">Dark</option>
</select>
</div>
<div class="form-group options-advanced">
<label for="custom-popup-css">Custom popup CSS</label>
<div><textarea autocomplete="off" spellcheck="false" wrap="soft" id="custom-popup-css" class="form-control"></textarea></div>