| 1 | <template> |
| 2 | <ConfigSection title="Transport Options" collapsible :readonly="readonly" |
| 3 | :has-value="form.useEncryption || form.useCompression"> |
| 4 | <div class="field-row two-col"> |
| 5 | <ConfigField label="Use Encryption" type="switch" v-model="form.useEncryption" :readonly="readonly" /> |
| 6 | <ConfigField label="Use Compression" type="switch" v-model="form.useCompression" :readonly="readonly" /> |
| 7 | </div> |
| 8 | </ConfigSection> |
| 9 | </template> |
| 10 | |
| 11 | <script setup lang="ts"> |
| 12 | import { computed } from 'vue' |
| 13 | import type { VisitorFormData } from '../../types' |
| 14 | import ConfigSection from '../ConfigSection.vue' |
| 15 | import ConfigField from '../ConfigField.vue' |
| 16 | |
| 17 | const props = withDefaults(defineProps<{ |
| 18 | modelValue: VisitorFormData |
| 19 | readonly?: boolean |
| 20 | }>(), { readonly: false }) |
| 21 | |
| 22 | const emit = defineEmits<{ 'update:modelValue': [value: VisitorFormData] }>() |
| 23 | |
| 24 | const form = computed({ |
| 25 | get: () => props.modelValue, |
| 26 | set: (val) => emit('update:modelValue', val), |
| 27 | }) |
| 28 | </script> |
| 29 | |
| 30 | <style scoped lang="scss"> |
| 31 | @use '@/assets/css/form-layout'; |
| 32 | </style> |