show warning for developer for missing labels

This commit is contained in:
Henry Jameson 2023-05-08 21:10:06 +03:00
parent b9c69a2272
commit 05a7e612aa
4 changed files with 22 additions and 9 deletions

View File

@ -10,9 +10,10 @@
<template v-if="backendDescriptionLabel"> <template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }} {{ backendDescriptionLabel + ' ' }}
</template> </template>
<template v-else> <template v-else-if="source === 'admin'">
<slot /> MISSING LABEL FOR {{ path }}
</template> </template>
<slot v-else />
</label> </label>
<p <p

View File

@ -10,16 +10,16 @@
@update:modelValue="update" @update:modelValue="update"
> >
<span <span
v-if="!!$slots.default"
class="label" class="label"
:class="{ 'faint': shouldBeDisabled }" :class="{ 'faint': shouldBeDisabled }"
> >
<template v-if="backendDescriptionLabel"> <template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel }} {{ backendDescriptionLabel }}
</template> </template>
<template v-else> <template v-else-if="source === 'admin'">
<slot /> MISSING LABEL FOR {{ path }}
</template> </template>
<slot v-else />
</span> </span>
</Checkbox> </Checkbox>
<ModifiedIndicator <ModifiedIndicator
@ -35,6 +35,16 @@
> >
{{ backendDescriptionDescription + ' ' }} {{ backendDescriptionDescription + ' ' }}
</p> </p>
<!-- debugging -->
<!--
<p
v-else
class="setting-description"
:class="{ 'faint': shouldBeDisabled }"
>
MISSING DESCRIPTION FOR {{ path }}
</p>
-->
</label> </label>
</template> </template>

View File

@ -10,9 +10,10 @@
<template v-if="backendDescriptionLabel"> <template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }} {{ backendDescriptionLabel + ' ' }}
</template> </template>
<template v-else> <template v-else-if="source === 'admin'">
<slot /> MISSING LABEL FOR {{ path }}
</template> </template>
<slot v-else />
</label> </label>
<input <input
:id="path" :id="path"

View File

@ -10,9 +10,10 @@
<template v-if="backendDescriptionLabel"> <template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }} {{ backendDescriptionLabel + ' ' }}
</template> </template>
<template v-else> <template v-else-if="source === 'admin'">
<slot /> MISSING LABEL FOR {{ path }}
</template> </template>
<slot v-else />
</label> </label>
<input <input
:id="path" :id="path"