aboutsummaryrefslogtreecommitdiff
path: root/src/components/font_control
diff options
context:
space:
mode:
authorIlja <ilja@ilja.space>2022-07-18 12:33:03 +0200
committerIlja <ilja@ilja.space>2022-07-18 12:42:40 +0200
commit18d69f93d38dc15a74db81ee4c10b4766bebfc35 (patch)
tree56763764de2ef984f498d3507c6ebead3099c57d /src/components/font_control
parente594252668256197d9b68f1db1f7108c5255d275 (diff)
parent9ddb43296f3fbb6621e646a20e86e05b6c730ad2 (diff)
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into feat/report-notification
Diffstat (limited to 'src/components/font_control')
-rw-r--r--src/components/font_control/font_control.js11
-rw-r--r--src/components/font_control/font_control.vue3
2 files changed, 8 insertions, 6 deletions
diff --git a/src/components/font_control/font_control.js b/src/components/font_control/font_control.js
index 137ef9c0..92ee3f30 100644
--- a/src/components/font_control/font_control.js
+++ b/src/components/font_control/font_control.js
@@ -1,4 +1,4 @@
-import { set } from 'vue'
+import { set } from 'lodash'
import Select from '../select/select.vue'
export default {
@@ -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
index 29605084..f100c3a9 100644
--- a/src/components/font_control/font_control.vue
+++ b/src/components/font_control/font_control.vue
@@ -15,13 +15,14 @@
class="opt exlcude-disabled"
type="checkbox"
:checked="present"
- @input="$emit('input', typeof value === 'undefined' ? fallback : undefined)"
+ @change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
>
<label
v-if="typeof fallback !== 'undefined'"
class="opt-l"
:for="name + '-o'"
/>
+ {{ ' ' }}
<Select
:id="name + '-font-switcher'"
v-model="preset"