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>
export default {
props: [
'large', 'contrast'
],
props: {
large: {
required: false
},
contrast: {
required: true,
type: Object
}
},
computed: {
hint () {
const levelVal = this.contrast.aaa ? 'aaa' : (this.contrast.aa ? 'aa' : 'bad')

View file

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