logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 53cde520276af98a9b2b20cd0e8acf7bde768e70
parent 75f6506bc7e490dd544548db7bcccbe0420d2727
Author: Henry Jameson <me@hjkos.com>
Date:   Sun, 27 Mar 2022 14:16:23 +0300

fix font control

Diffstat:

Msrc/components/font_control/font_control.js9+++++----
Msrc/components/font_control/font_control.vue4++--
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/components/font_control/font_control.js b/src/components/font_control/font_control.js @@ -6,11 +6,12 @@ export default { Select }, props: [ - 'name', 'label', 'value', 'fallback', 'options', 'no-inherit' + 'name', 'label', 'modelValue', 'fallback', 'options', 'no-inherit' ], + emits: ['update:modelValue'], data () { return { - lValue: this.value, + lValue: this.modelValue, availableOptions: [ this.noInherit ? '' : 'inherit', 'custom', @@ -22,7 +23,7 @@ export default { } }, beforeUpdate () { - this.lValue = this.value + this.lValue = this.modelValue }, computed: { present () { @@ -37,7 +38,7 @@ export default { }, set (v) { set(this.lValue, 'family', v) - this.$emit('input', this.lValue) + this.$emit('update:modelValue', this.lValue) } }, isCustom () { diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue @@ -14,8 +14,8 @@ :id="name + '-o'" class="opt exlcude-disabled" type="checkbox" - :modelValue="present" - @input="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)" + :checked="present" + @change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)" > <label v-if="typeof fallback !== 'undefined'"