fix checkboxes, specifically the NSFW one
This commit is contained in:
parent
9793002070
commit
4539feed40
|
@ -6,9 +6,9 @@
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:checked="checked"
|
:modelValue="modelValue"
|
||||||
:indeterminate="indeterminate"
|
:indeterminate="indeterminate"
|
||||||
@change="$emit('change', $event.target.checked)"
|
@change="$emit('update:modelValue', $event.target.checked)"
|
||||||
>
|
>
|
||||||
<i class="checkbox-indicator" />
|
<i class="checkbox-indicator" />
|
||||||
<span
|
<span
|
||||||
|
@ -22,12 +22,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
model: {
|
emits: ['update:modelValue'],
|
||||||
prop: 'checked',
|
|
||||||
event: 'change'
|
|
||||||
},
|
|
||||||
props: [
|
props: [
|
||||||
'checked',
|
'modelValue',
|
||||||
'indeterminate',
|
'indeterminate',
|
||||||
'disabled'
|
'disabled'
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</label>
|
</label>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="typeof fallback !== 'undefined' && showOptionalTickbox"
|
v-if="typeof fallback !== 'undefined' && showOptionalTickbox"
|
||||||
:checked="present"
|
:modelValue="present"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
class="opt"
|
class="opt"
|
||||||
@change="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)"
|
@change="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
:id="name + '-o'"
|
:id="name + '-o'"
|
||||||
class="opt exlcude-disabled"
|
class="opt exlcude-disabled"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:checked="present"
|
:modelValue="present"
|
||||||
@input="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)"
|
@input="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</label>
|
</label>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="typeof fallback !== 'undefined'"
|
v-if="typeof fallback !== 'undefined'"
|
||||||
:checked="present"
|
:modelValue="present"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
class="opt"
|
class="opt"
|
||||||
@change="$emit('update:modelValue', !present ? fallback : undefined)"
|
@change="$emit('update:modelValue', !present ? fallback : undefined)"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
:id="name + '-o'"
|
:id="name + '-o'"
|
||||||
class="opt"
|
class="opt"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:checked="present"
|
:modelValue="present"
|
||||||
@input="$emit('update:modelValue', !present ? fallback : undefined)"
|
@input="$emit('update:modelValue', !present ? fallback : undefined)"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
>
|
>
|
||||||
<div class="selectable-list-checkbox-wrapper">
|
<div class="selectable-list-checkbox-wrapper">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
:checked="allSelected"
|
:modelValue="allSelected"
|
||||||
:indeterminate="someSelected"
|
:indeterminate="someSelected"
|
||||||
@change="toggleAll"
|
@change="toggleAll"
|
||||||
>
|
>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
>
|
>
|
||||||
<div class="selectable-list-checkbox-wrapper">
|
<div class="selectable-list-checkbox-wrapper">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
:checked="isSelected(item)"
|
:modelValue="isSelected(item)"
|
||||||
@change="checked => toggle(checked, item)"
|
@change="checked => toggle(checked, item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
class="BooleanSetting"
|
class="BooleanSetting"
|
||||||
>
|
>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
:checked="state"
|
:modelValue="state"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@change="update"
|
@update:modelValue="update"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="!!$slots.default"
|
v-if="!!$slots.default"
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
</template>
|
</template>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
<Checkbox :checked="!!expertLevel" @change="expertLevel = Number($event)">
|
<Checkbox :modelValue="!!expertLevel" @update:modelValue="expertLevel = Number($event)">
|
||||||
{{ $t("settings.expert_mode") }}
|
{{ $t("settings.expert_mode") }}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
:statusoid="item"
|
:statusoid="item"
|
||||||
/>
|
/>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
:checked="isChecked(item.id)"
|
:modelValue="isChecked(item.id)"
|
||||||
@change="checked => toggleStatus(checked, item.id)"
|
@change="checked => toggleStatus(checked, item.id)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue