generated from Seekra/repository-template
Feat(settings): add renderer for settings configuration #142
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
<script setup>
|
||||
import Icon from '@/features/icons/components/Icon.vue';
|
||||
import { useSettingsStore } from '../stores/settingsStore';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, ref, useId, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
@@ -59,14 +59,16 @@ const selected = ref(normalizeSelectedValue(store.get(props.path) ?? props.setti
|
||||
watch(selected, (newValue) => {
|
||||
|
jakob.scheid marked this conversation as resolved
Outdated
|
||||
store.set(props.path, newValue);
|
||||
});
|
||||
|
||||
const labelId = useId();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
Please add a label relationship between Please add a label relationship between `div.label` and `ul.options-list`.
|
||||
<div>
|
||||
<div class="label">
|
||||
<div class="label" :id="labelId">
|
||||
{{ t(props.setting.i18n) }}
|
||||
</div>
|
||||
<ul class="options-list">
|
||||
<ul class="options-list" :aria-labelledby="labelId">
|
||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
Please add a Please add a `title` and `aria-label` attributes.
|
||||
<li v-for="option in props.setting.options" :key="option.name">
|
||||
<label class="settings-button">
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user
The
oldValueparameter is not necessary.