aboutsummaryrefslogtreecommitdiff
path: root/src/components/opacity_input
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/opacity_input
parente594252668256197d9b68f1db1f7108c5255d275 (diff)
parent9ddb43296f3fbb6621e646a20e86e05b6c730ad2 (diff)
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into feat/report-notification
Diffstat (limited to 'src/components/opacity_input')
-rw-r--r--src/components/opacity_input/opacity_input.vue13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/opacity_input/opacity_input.vue b/src/components/opacity_input/opacity_input.vue
index 3cc3942b..15d08e04 100644
--- a/src/components/opacity_input/opacity_input.vue
+++ b/src/components/opacity_input/opacity_input.vue
@@ -11,21 +11,21 @@
</label>
<Checkbox
v-if="typeof fallback !== 'undefined'"
- :checked="present"
+ :model-value="present"
:disabled="disabled"
class="opt"
- @change="$emit('input', !present ? fallback : undefined)"
+ @update:modelValue="$emit('update:modelValue', !present ? fallback : undefined)"
/>
<input
:id="name"
class="input-number"
type="number"
- :value="value || fallback"
+ :value="modelValue || fallback"
:disabled="!present || disabled"
max="1"
min="0"
step=".05"
- @input="$emit('input', $event.target.value)"
+ @input="$emit('update:modelValue', $event.target.value)"
>
</div>
</template>
@@ -37,11 +37,12 @@ export default {
Checkbox
},
props: [
- 'name', 'value', 'fallback', 'disabled'
+ 'name', 'modelValue', 'fallback', 'disabled'
],
+ emits: ['update:modelValue'],
computed: {
present () {
- return typeof this.value !== 'undefined'
+ return typeof this.modelValue !== 'undefined'
}
}
}