feat(admin): footer record actions, deletable flag, mail row states and diff styles

- FormView footer RecordActions when there is no preview; meta.deletable hides Delete
- Partial fields reload after save and record actions; customized/outdated badges
- .summer-diff kit and docs for codeeditor, mailpreview and footer actions

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-13 13:37:55 +01:00
parent aba512800e
commit d13340672f
9 changed files with 155 additions and 25 deletions

View File

@@ -1,14 +1,18 @@
<script setup lang="ts">
import { inject, ref } from 'vue'
import { t } from '../../../app/i18n'
import PartialHost from '../../partial/PartialHost.vue'
import ExtensionFailure from '../../ui/ExtensionFailure.vue'
import type { FieldControlProps } from '../control'
import { FORM_PARTIAL_RELOAD } from '../formContext'
// A `type: partial` form row (D-09; UI-SPEC S2): the controller partial
// named by `path`, rendered on create (no record) and update (?id=). It holds
// no value. The row's visible label, when declared, names the group. A form
// without a controller (a settings page) has no partial route to call.
// Phase 35: reloads when FormView bumps FORM_PARTIAL_RELOAD after save/action.
const props = defineProps<FieldControlProps>()
const reloadKey = inject(FORM_PARTIAL_RELOAD, ref(0))
</script>
<template>
@@ -25,6 +29,7 @@ const props = defineProps<FieldControlProps>()
:source="source"
:name="props.field.path || props.field.name"
:record-id="recordId ?? null"
:reload-key="reloadKey"
/>
<ExtensionFailure v-else data-partial-failed :text="t('backend::lang.extension.partial_failed')" />
</div>

View File

@@ -16,6 +16,12 @@ export const FORM_PATCH: InjectionKey<(name: string, value: unknown) => void> =
/** The form schema's locale (meta.locale). */
export const FORM_LOCALE: InjectionKey<Readonly<Ref<string>>> = Symbol('summer.form.locale')
/**
* Bumped after every successful save and record action so `type: partial`
* fields re-fetch (Phase 35, UI-SPEC C8).
*/
export const FORM_PARTIAL_RELOAD: InjectionKey<Readonly<Ref<number>>> = Symbol('summer.form.partialReload')
/** Enabled content locales for ML controls (schema meta.enabledLocales). */
export const FORM_ENABLED_LOCALES: InjectionKey<Readonly<Ref<readonly string[]>>> = Symbol('summer.form.enabledLocales')