feat(frontend): implement basic frontend interface

This commit is contained in:
2026-09-08 23:15:50 +08:00
parent 8b43e8b2ea
commit 378727ac57
29 changed files with 5190 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<script setup>
defineProps({
modelValue: { type: Boolean, default: false },
label: { type: String, default: '' },
disabled: { type: Boolean, default: false }
});
const emit = defineEmits(['update:modelValue']);
</script>
<template>
<label class="switch" :class="{ disabled }">
<input
type="checkbox"
:checked="modelValue"
:disabled="disabled"
@change="emit('update:modelValue', $event.target.checked)"
/>
<span class="track" />
<span v-if="label" class="switch-label">{{ label }}</span>
</label>
</template>
<style scoped>
.switch.disabled {
opacity: 0.5;
cursor: not-allowed;
}
</style>