Snapshot: alpha-2026-9

This commit is contained in:
j3d1 2026-09-02 21:40:28 +02:00
parent 9acf5a97e2
commit 85940cfcda
242 changed files with 85549 additions and 2409 deletions

View file

@ -0,0 +1,83 @@
<template>
<textarea v-if="type === 'textarea'" class="form-control" rows="2" v-model="localValue"></textarea>
<input v-else-if="type === 'number'" type="number" class="form-control" min="0" v-model.number="localValue">
<!-- Tags/properties mutate the passed-in array in place (same convention as
InventoryNew.vue's own `:value="item.tags"`), so no v-model wiring is needed here. -->
<tag-field v-else-if="type === 'tags'" :value="modelValue"></tag-field>
<property-field v-else-if="type === 'properties'" :value="modelValue"></property-field>
<select v-else-if="type === 'owner_group'" class="form-select" v-model="localValue">
<option :value="null">Myself</option>
<option v-for="group in ownerGroups" :key="group.handle" :value="group.handle">{{ group.handle }}</option>
</select>
<select v-else-if="type === 'availability_policy'" class="form-select" v-model="localValue">
<option v-for="policy in availabilityPolicies" :key="policy.slug" :value="policy.slug">
{{ policy.text }}
</option>
</select>
<select v-else-if="type === 'visibility_policy'" class="form-select" v-model="localValue">
<option v-for="policy in visibilityPolicies" :key="policy.slug" :value="policy.slug">
{{ policy.text }}
</option>
</select>
<select v-else-if="type === 'storage_location'" class="form-select" v-model="localValue">
<option :value="null">No storage location</option>
<option v-for="location in storageLocations" :key="location.id" :value="location.id">
{{ location.path }}
</option>
</select>
<input v-else type="text" class="form-control" v-model="localValue">
</template>
<script>
import TagField from "@/components/TagField.vue";
import PropertyField from "@/components/PropertyField.vue";
export default {
name: 'FotoFirstFieldInput',
components: {TagField, PropertyField},
props: {
type: {
type: String,
required: true
},
modelValue: {
default: null
},
ownerGroups: {
type: Array,
default: () => []
},
availabilityPolicies: {
type: Array,
default: () => []
},
visibilityPolicies: {
type: Array,
default: () => []
},
storageLocations: {
type: Array,
default: () => []
}
},
emits: ['update:modelValue'],
computed: {
localValue: {
get() {
return this.modelValue;
},
set(value) {
this.$emit('update:modelValue', value);
}
}
}
}
</script>