Refactor app architecture and clean local artifacts

This commit is contained in:
AzuTear
2026-06-24 23:43:14 +02:00
parent 17134b3b82
commit fef1d36fe8
274 changed files with 37724 additions and 6065 deletions
@@ -0,0 +1,43 @@
<template>
<select
:value="modelValue ?? ''"
class="h-11 w-full rounded-2xl border border-violet-200 bg-white px-4 text-sm text-slate-900 outline-none transition focus:border-violet-400 focus:ring-4 focus:ring-violet-100"
@change="onChange"
>
<option
v-for="option in options"
:key="`${option.value}`"
:value="stringifyValue(option.value)"
>
{{ option.label }}
</option>
</select>
</template>
<script setup lang="ts">
type SelectOptionValue = string | number | null
type SelectOption = {
label: string
value: SelectOptionValue
}
const props = defineProps<{
modelValue: SelectOptionValue
options: SelectOption[]
}>()
const emit = defineEmits<{
'update:modelValue': [value: SelectOptionValue]
}>()
function stringifyValue(value: SelectOptionValue) {
return value === null ? '' : String(value)
}
function onChange(event: Event) {
const rawValue = (event.target as HTMLSelectElement).value
const selectedOption = props.options.find((option) => stringifyValue(option.value) === rawValue)
emit('update:modelValue', selectedOption?.value ?? null)
}
</script>