Feat(settings): add renderer for settings configuration #142

Merged
jakob.scheid merged 88 commits from feature/settings-renderer into main 2026-07-28 20:14:50 +02:00
3 changed files with 21 additions and 3 deletions
Showing only changes of commit 9cf2245217 - Show all commits
+13 -3
View File
@@ -16,6 +16,7 @@ limitations under the License.
<script setup>
import { useSettingsStore } from '../stores/settingsStore';
import { useId } from 'vue';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
@@ -29,6 +30,9 @@ const props = defineProps({
}
});
const labelId = useId();
const switchId = useId();
const store = useSettingsStore();
const toggle = function toggle () {
@@ -38,10 +42,16 @@ const toggle = function toggle () {
<template>
<div class="switch-container" @click="toggle">
<div>
<label :for="switchId" :id="labelId">
{{ t(props.setting.i18n) }}
</div>
<div class="switch-wrapper" :class="{ enabled: store.get(props.path) }">
</label>
<div
class="switch-wrapper"
:class="{ enabled: store.get(props.path) }"
:title="t('settings.switch.title')"
:aria-label="t('settings.switch.ariaLabel')"
:aria-labelledby="labelId"
>
<div class="switch-point"></div>
</div>
</div>
+4
View File
@@ -45,6 +45,10 @@
"title": "Wert speichern",
"ariaLabel": "Speichert den eingegebenen Wert"
}
},
"switch": {
"title": "Wert umschalten",
"ariaLabel": "Schaltet den Wert um"
}
}
}
+4
View File
@@ -45,6 +45,10 @@
"title": "Save value",
"ariaLabel": "Saves the entered value"
}
},
"switch": {
"title": "Toggle value",
"ariaLabel": "Toggles the value"
}
}
}