fix some contrast ratios not displaying

This commit is contained in:
Henry Jameson 2020-01-19 22:44:35 +02:00
parent 62343f6099
commit 7d7ccf7298
2 changed files with 18 additions and 12 deletions

View file

@ -37,9 +37,15 @@
<script> <script>
export default { export default {
props: [ props: {
'large', 'contrast' large: {
], required: false
},
contrast: {
required: true,
type: Object
}
},
computed: { computed: {
hint () { hint () {
const levelVal = this.contrast.aaa ? 'aaa' : (this.contrast.aa ? 'aa' : 'bad') const levelVal = this.contrast.aaa ? 'aaa' : (this.contrast.aa ? 'aa' : 'bad')

View file

@ -157,13 +157,13 @@
name="cRedColor" name="cRedColor"
:label="$t('settings.cRed')" :label="$t('settings.cRed')"
/> />
<ContrastRatio :contrast="previewContrast.bgRed" /> <ContrastRatio :contrast="previewContrast.bgCRed" />
<ColorInput <ColorInput
v-model="cBlueColorLocal" v-model="cBlueColorLocal"
name="cBlueColor" name="cBlueColor"
:label="$t('settings.cBlue')" :label="$t('settings.cBlue')"
/> />
<ContrastRatio :contrast="previewContrast.bgBlue" /> <ContrastRatio :contrast="previewContrast.bgCBlue" />
</div> </div>
<div class="color-item"> <div class="color-item">
<ColorInput <ColorInput
@ -171,13 +171,13 @@
name="cGreenColor" name="cGreenColor"
:label="$t('settings.cGreen')" :label="$t('settings.cGreen')"
/> />
<ContrastRatio :contrast="previewContrast.bgGreen" /> <ContrastRatio :contrast="previewContrast.bgCGreen" />
<ColorInput <ColorInput
v-model="cOrangeColorLocal" v-model="cOrangeColorLocal"
name="cOrangeColor" name="cOrangeColor"
:label="$t('settings.cOrange')" :label="$t('settings.cOrange')"
/> />
<ContrastRatio :contrast="previewContrast.bgOrange" /> <ContrastRatio :contrast="previewContrast.bgCOrange" />
</div> </div>
<p>{{ $t('settings.theme_help_v2_2') }}</p> <p>{{ $t('settings.theme_help_v2_2') }}</p>
</div> </div>
@ -217,7 +217,7 @@
/> />
<ContrastRatio <ContrastRatio
:contrast="previewContrast.alertErrorText" :contrast="previewContrast.alertErrorText"
large="1" large="true"
/> />
<ColorInput <ColorInput
v-model="alertWarningColorLocal" v-model="alertWarningColorLocal"
@ -233,7 +233,7 @@
/> />
<ContrastRatio <ContrastRatio
:contrast="previewContrast.alertWarningText" :contrast="previewContrast.alertWarningText"
large="1" large="true"
/> />
</div> </div>
<div class="color-item"> <div class="color-item">
@ -252,7 +252,7 @@
/> />
<ContrastRatio <ContrastRatio
:contrast="previewContrast.badgeNotificationText" :contrast="previewContrast.badgeNotificationText"
large="1" large="true"
/> />
</div> </div>
<div class="color-item"> <div class="color-item">
@ -277,7 +277,7 @@
/> />
<ContrastRatio <ContrastRatio
:contrast="previewContrast.panelText" :contrast="previewContrast.panelText"
large="1" large="true"
/> />
<ColorInput <ColorInput
v-model="panelLinkColorLocal" v-model="panelLinkColorLocal"
@ -287,7 +287,7 @@
/> />
<ContrastRatio <ContrastRatio
:contrast="previewContrast.panelLink" :contrast="previewContrast.panelLink"
large="1" large="true"
/> />
</div> </div>
<div class="color-item"> <div class="color-item">