This commit is contained in:
Henry Jameson 2020-01-12 17:59:41 +02:00
parent 39dd08e694
commit 3492d7f81e
4 changed files with 13 additions and 13 deletions

View file

@ -13,8 +13,8 @@
v-if="typeof fallback !== 'undefined' && showOptionalTickbox" v-if="typeof fallback !== 'undefined' && showOptionalTickbox"
:checked="present" :checked="present"
:disabled="disabled" :disabled="disabled"
@change="$emit('input', typeof value === 'undefined' ? fallback : undefined)"
class="opt" class="opt"
@change="$emit('input', typeof value === 'undefined' ? fallback : undefined)"
/> />
<div class="input color-input-field"> <div class="input color-input-field">
<input <input
@ -46,6 +46,9 @@
import Checkbox from '../checkbox/checkbox.vue' import Checkbox from '../checkbox/checkbox.vue'
import { hex2rgb } from '../../services/color_convert/color_convert.js' import { hex2rgb } from '../../services/color_convert/color_convert.js'
export default { export default {
components: {
Checkbox
},
props: { props: {
// Name of color, used for identifying // Name of color, used for identifying
name: { name: {
@ -83,9 +86,6 @@ export default {
default: true default: true
} }
}, },
components: {
Checkbox
},
computed: { computed: {
present () { present () {
return typeof this.value !== 'undefined' return typeof this.value !== 'undefined'

View file

@ -13,8 +13,8 @@
v-if="typeof fallback !== 'undefined'" v-if="typeof fallback !== 'undefined'"
:checked="present" :checked="present"
:disabled="disabled" :disabled="disabled"
@change="$emit('input', !present ? fallback : undefined)"
class="opt" class="opt"
@change="$emit('input', !present ? fallback : undefined)"
/> />
<input <input
:id="name" :id="name"
@ -33,12 +33,12 @@
<script> <script>
import Checkbox from '../checkbox/checkbox.vue' import Checkbox from '../checkbox/checkbox.vue'
export default { export default {
props: [
'name', 'value', 'fallback', 'disabled'
],
components: { components: {
Checkbox Checkbox
}, },
props: [
'name', 'value', 'fallback', 'disabled'
],
computed: { computed: {
present () { present () {
return typeof this.value !== 'undefined' return typeof this.value !== 'undefined'

View file

@ -76,9 +76,9 @@
<li> <li>
<Checkbox v-model="useStreamingApi"> <Checkbox v-model="useStreamingApi">
{{ $t('settings.useStreamingApi') }} {{ $t('settings.useStreamingApi') }}
<br/> <br>
<small> <small>
{{ $t('settings.useStreamingApiWarning') }} {{ $t('settings.useStreamingApiWarning') }}
</small> </small>
</Checkbox> </Checkbox>
</li> </li>

View file

@ -119,14 +119,14 @@
name="accentColor" name="accentColor"
:fallback="previewTheme.colors.link" :fallback="previewTheme.colors.link"
:label="$t('settings.accent')" :label="$t('settings.accent')"
:showOptionalTickbox="typeof linkColorLocal !== 'undefined'" :show-optional-tickbox="typeof linkColorLocal !== 'undefined'"
/> />
<ColorInput <ColorInput
v-model="linkColorLocal" v-model="linkColorLocal"
name="linkColor" name="linkColor"
:fallback="previewTheme.colors.accent" :fallback="previewTheme.colors.accent"
:label="$t('settings.links')" :label="$t('settings.links')"
:showOptionalTickbox="typeof accentColorLocal !== 'undefined'" :show-optional-tickbox="typeof accentColorLocal !== 'undefined'"
/> />
<ContrastRatio :contrast="previewContrast.bgLink" /> <ContrastRatio :contrast="previewContrast.bgLink" />
</div> </div>
@ -388,7 +388,7 @@
v-model="underlayColorLocal" v-model="underlayColorLocal"
name="underlay" name="underlay"
:label="$t('settings.style.advanced_colors.underlay')" :label="$t('settings.style.advanced_colors.underlay')"
fallback='#000000' fallback="#000000"
/> />
<OpacityInput <OpacityInput
v-model="underlayOpacityLocal" v-model="underlayOpacityLocal"