refac: duplicates, crap, dry etc. on last features commits

This commit is contained in:
Florian Sylvain committed 2026-10-21 00:52:14 +02:00
1 parent fba20f83c5
commit 89051b3f1f
12 files changed
+260 -153

No files matched your search

+42 -4
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { t } from '@/i18n'
import { computed } from 'vue'
import BuilderStatusChip from '@/components/BuilderStatusChip.vue'
import ContentState from '@/components/ContentState.vue'
import DirectoryLoadError from '@/components/DirectoryLoadError.vue'
@@ -28,6 +29,14 @@ function loadErrorLine() {
)
}
const actionProps = computed(() => ({
chip: props.page.chip.value,
savedClock: props.page.savedClock.value,
creating: props.page.creating.value,
saving: props.page.saving.value,
canSave: props.page.canSave.value,
}))
function goHome() {
router.push(HOME_PATH)
}
@@ -65,7 +74,12 @@ function backToList() {
<p class="text-muted">{{ page.subtitle.value }}</p>
</template>
</div>
<EntryActions v-if="isDesktop && phase === 'ready'" :page="page" />
<EntryActions
v-if="isDesktop && phase === 'ready'"
v-bind="actionProps"
@remove="page.removal.open"
@cancel="page.cancel"
/>
</div>
<div
@@ -83,8 +97,32 @@ function backToList() {
/>
<EntryEditorSkeleton v-else-if="phase === 'loading'" />
<template v-else>
<EntryNotices :page="page" />
<EntryForm :page="page" />
<EntryNotices
:failure="page.failure.value"
:schema-changed="page.schemaChanged.value"
:schema-field="page.schemaField.value"
:issues="page.form.issues.value"
:fields="page.fields.value"
:type-name="page.typeName.value"
@retry="page.submit"
@reload="page.reload"
/>
<EntryForm
:fields="page.fields.value"
:values="page.form.values.value"
:issues="page.form.issues.value"
:first-issue="page.form.firstIssue.value"
:focus-token="page.focusToken.value"
:locked="page.locked.value"
:saving="page.saving.value"
:creating="page.creating.value"
:is-default="page.form.isDefault"
:entry-line="page.entryLine.value"
:created-line="page.createdLine.value"
:updated-line="page.updatedLine.value"
@update="page.change"
@submit="page.submit"
/>
</template>
</div>
@@ -92,7 +130,7 @@ function backToList() {
v-if="!isDesktop && phase === 'ready'"
class="sticky bottom-0 -mx-4 mt-auto flex border-t border-default bg-default px-4 py-3"
>
<EntryActions :page="page" bar />
<EntryActions v-bind="actionProps" bar @remove="page.removal.open" @cancel="page.cancel" />
</div>
<EntryDeleteDialog