fixes
Some checks failed
CI / rust (push) Failing after 36s
CI / frontend (push) Failing after 1m53s
CI / wasm (push) Successful in 1m46s
CI / publish-crates (push) Has been skipped
CI / publish-npm (push) Has been skipped

This commit is contained in:
2026-04-09 02:16:27 +03:00
parent 58a59f2609
commit 92583141c9
24 changed files with 586 additions and 40 deletions

View File

@@ -1,18 +1,41 @@
<script setup lang="ts">
import { computed } from 'vue'
import { usePropertyUpdate } from '../../composables/usePropertyUpdate'
import { useSchemaStore } from '../../stores/schema'
import PropSection from './shared/PropSection.vue'
import PropNumberInput from './shared/PropNumberInput.vue'
import PropColorInput from './shared/PropColorInput.vue'
import PropCheckbox from './shared/PropCheckbox.vue'
import PropFieldSelect from './shared/PropFieldSelect.vue'
import type { CheckboxElement } from '../../core/types'
import '../../styles/properties.css'
const props = defineProps<{ element: CheckboxElement }>()
const { update, updateStyle } = usePropertyUpdate(() => props.element)
const schemaStore = useSchemaStore()
const booleanFields = computed(() =>
schemaStore.scalarFields.filter((f) => f.type === 'boolean' || f.type === 'string'),
)
</script>
<template>
<PropSection title="Onay Kutusu">
<PropFieldSelect
label="Veri Alani"
:model-value="element.binding?.path ?? ''"
:fields="booleanFields"
:allow-empty="true"
empty-label="Yok (statik)"
data-tip="Onay durumunun gelecegi veri alani"
@update:model-value="
(v) =>
update({
binding: v ? { type: 'scalar', path: v } : undefined,
checked: v ? undefined : element.checked ?? false,
} as any)
"
/>
<PropCheckbox
v-if="!element.binding"
label="Isaretli"
@@ -40,5 +63,13 @@ const { update, updateStyle } = usePropertyUpdate(() => props.element)
data-tip="Kutu kenarlik rengi"
@update:model-value="(v) => updateStyle('borderColor', v)"
/>
<PropNumberInput
label="Kenar Kalinligi"
:model-value="element.style.borderWidth ?? 0.3"
:step="0.1"
:min="0"
data-tip="Kutu kenarlik kalinligi (mm)"
@update:model-value="(v) => updateStyle('borderWidth', v)"
/>
</PropSection>
</template>