logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 05a7e612aa6d9f2a44eea22266b325933da6f5ad
parent b9c69a2272219865ff7e5b35dd1a0df7ead16538
Author: Henry Jameson <me@hjkos.com>
Date:   Mon,  8 May 2023 21:10:06 +0300

show warning for developer for missing labels

Diffstat:

Msrc/components/settings_modal/helpers/attachment_setting.vue5+++--
Msrc/components/settings_modal/helpers/boolean_setting.vue16+++++++++++++---
Msrc/components/settings_modal/helpers/number_setting.vue5+++--
Msrc/components/settings_modal/helpers/string_setting.vue5+++--
4 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/components/settings_modal/helpers/attachment_setting.vue b/src/components/settings_modal/helpers/attachment_setting.vue @@ -10,9 +10,10 @@ <template v-if="backendDescriptionLabel"> {{ backendDescriptionLabel + ' ' }} </template> - <template v-else> - <slot /> + <template v-else-if="source === 'admin'"> + MISSING LABEL FOR {{ path }} </template> + <slot v-else /> </label> <p diff --git a/src/components/settings_modal/helpers/boolean_setting.vue b/src/components/settings_modal/helpers/boolean_setting.vue @@ -10,16 +10,16 @@ @update:modelValue="update" > <span - v-if="!!$slots.default" class="label" :class="{ 'faint': shouldBeDisabled }" > <template v-if="backendDescriptionLabel"> {{ backendDescriptionLabel }} </template> - <template v-else> - <slot /> + <template v-else-if="source === 'admin'"> + MISSING LABEL FOR {{ path }} </template> + <slot v-else /> </span> </Checkbox> <ModifiedIndicator @@ -35,6 +35,16 @@ > {{ backendDescriptionDescription + ' ' }} </p> + <!-- debugging --> + <!-- + <p + v-else + class="setting-description" + :class="{ 'faint': shouldBeDisabled }" + > + MISSING DESCRIPTION FOR {{ path }} + </p> + --> </label> </template> diff --git a/src/components/settings_modal/helpers/number_setting.vue b/src/components/settings_modal/helpers/number_setting.vue @@ -10,9 +10,10 @@ <template v-if="backendDescriptionLabel"> {{ backendDescriptionLabel + ' ' }} </template> - <template v-else> - <slot /> + <template v-else-if="source === 'admin'"> + MISSING LABEL FOR {{ path }} </template> + <slot v-else /> </label> <input :id="path" diff --git a/src/components/settings_modal/helpers/string_setting.vue b/src/components/settings_modal/helpers/string_setting.vue @@ -10,9 +10,10 @@ <template v-if="backendDescriptionLabel"> {{ backendDescriptionLabel + ' ' }} </template> - <template v-else> - <slot /> + <template v-else-if="source === 'admin'"> + MISSING LABEL FOR {{ path }} </template> + <slot v-else /> </label> <input :id="path"