mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-01 04:55:40 +00:00
a886fa86ca
Add archive option feature. Archived items can only be seen on the items page when including archived is selected. Archived items are excluded from the count and from other views
35 lines
853 B
Vue
35 lines
853 B
Vue
<template>
|
|
<div v-if="!inline" class="form-control w-full">
|
|
<label class="label cursor-pointer">
|
|
<span class="label-text"> {{ label }}</span>
|
|
<input v-model="value" type="checkbox" class="checkbox checkbox-primary" />
|
|
</label>
|
|
</div>
|
|
<div v-else class="label cursor-pointer sm:grid sm:grid-cols-4 sm:items-start sm:gap-4">
|
|
<label>
|
|
<span class="label-text">
|
|
{{ label }}
|
|
</span>
|
|
</label>
|
|
<input v-model="value" type="checkbox" class="checkbox checkbox-primary" />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = defineProps({
|
|
modelValue: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
inline: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
label: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
});
|
|
|
|
const value = useVModel(props, "modelValue");
|
|
</script>
|