From 1087741b0df00d42576c55f5869d331469bcbb6e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Nov 2018 22:39:06 +0300 Subject: [PATCH] font control args to allow passing an option list of fonts, for future use --- src/components/font_control/font_control.vue | 14 +++++++++++--- src/components/style_switcher/style_switcher.vue | 12 +++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue index 424f6259..004b5546 100644 --- a/src/components/font_control/font_control.vue +++ b/src/components/font_control/font_control.vue @@ -17,7 +17,7 @@ v-model="preset" class="font-switcher" id="name + '-font-switcher'"> - @@ -37,11 +37,19 @@ import { set } from 'vue' export default { props: [ - 'name', 'label', 'value', 'fallback', 'options' + 'name', 'label', 'value', 'fallback', 'options', 'no-inherit' ], data () { return { - lValue: this.value + lValue: this.value, + availableOptions: [ + this.noInherit ? '' : 'inherit', + 'custom', + ...(this.options || []), + 'serif', + 'monospace', + 'sans-serif' + ].filter(_ => _) } }, beforeUpdate () { diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue index f64bda3f..a444c6a7 100644 --- a/src/components/style_switcher/style_switcher.vue +++ b/src/components/style_switcher/style_switcher.vue @@ -215,31 +215,29 @@

{{$t('settings.style.fonts.help')}}

+
+ no-inherit="1"/> + :fallback="previewTheme.fonts.input"/> + :fallback="previewTheme.fonts.post"/> + :fallback="previewTheme.fonts.postCode"/>