PrimeBrickPrimeBrick
  • Docs
  • Contact
  • MIT License
  • Documentation
  • MCP Server
  • API Catalog
  • Services
  • Libraries
PrimeBrickPrimeBrick

© 2026 PrimeBrick. MIT License. v3.11.2

github
Backend
Frontend
    Developer Guide
      OverviewGetting startedUI stackApp shell & sidebarAuthentication & sessionsSystem settingsUI componentsUI patternsIcon ConventionsInput AnatomyField Hints & TooltipsButton Style StandardsEntity metadatai18n — Translations on the FrontendThe AI Tool Loop (caller-driven)Error HandlingComposables (use* hooks)
      Components
        Entity list tableComboSelectDynamicIconColorSelectorColorPickerAvatarPreviewEventCardCommandPaletteAppShellAppSidebarAppTopbarAppPageLayoutAppPageScaffoldAppPageBreadcrumbAppServerBannerBrowserClientInfoLangSelectThemeToggleSidebarAppLauncherSidebarHealthBadgeSidebarOrgSwitcherSidebarProfileMenuSidebarVersionBadgeButtonButton (async)FormPageLayoutFormLabelWithPriorityHelpPasswordChecklistChoiceboxDateWheelPickerEventToastLoadingBarMetadataLoadingJsonTableViewerNumberTickerStatCardToolbarDialogBorderedEntity Confirm DialogsSheet panelRFCErrorDialogLoginFormPasskeyButtonPasskeyEnrollmentAuthMethodsPromptDialogSessionExpiredDialogInputSliderSliderFieldSwitchFieldSelectableFieldsetBadgeValuesEditorTooltipFormPrimeFieldSmartRegexInput
      API Reference
Microservices
powered by Zudoku
Components

Entity Confirm Dialogs

src/lib/components/entity-list-table/dialogs/

Purpose

Every confirmation dialog that deletes or restores an entity record must use one of the four standard dialogs. Title and body copy are never passed by the caller — they are built by convention from two translation-key families:

  • system.entities.{entity}.singular / .plural — the entity display name
  • app.common.{action} — the title/body templates with {entity}, {name}, {count} placeholders

This guarantees that no dialog ever says generic "record" and that copy stays consistent across every list page and detail page.

Components

ComponentSeverityTitle keyBody key
DeleteDialogdestructiveapp.common.deleteEntityTitle → Delete {entity}app.common.deleteEntityConfirm → …delete {entity}{name}? + app.common.deleteConfirm (undo warning, second line)
BulkDeleteDialogdestructiveapp.common.deleteEntitiesTitleapp.common.deleteEntitiesConfirm ({count} + {entity} plural)
RestoreDialogwarningapp.common.restoreEntityTitleapp.common.restoreEntityConfirm ({entity}{name})
BulkRestoreDialogwarningapp.common.restoreEntitiesTitleapp.common.restoreEntitiesConfirm ({count} + {entity} plural)

All four wrap DialogBordered with showCloseButton={false}, sm:max-w-md, secondary-outline Cancel + severity-colored confirm button, and an isDeleting/isRestoring busy state on the confirm CTA.

Usage

Single record — /system/ai (canonical, remote ai module page)

Code
<DeleteDialog entity={deleteTarget?.entity ?? 'ai_model'} recordName={deleteTarget?.name} bind:open={deleteDialogOpen} onOpenChange={(open) => { if (!open) cancelDelete(); }} isDeleting={isDeleting} onConfirm={confirmDelete} onCancel={cancelDelete} />

Renders: "Elimina Modello AI" / "Sei sicuro di voler eliminare il Modello AI "Qwen2.5 Coder 3B (q4f16)"?" + "Questa azione non può essere annullata." on a second line. The {entity} placeholder is resolved via singular_definite (with article) and rendered bold; {name} is rendered bold italic.

Entity list tables

EntityListTable wires all four dialogs automatically through EntityListTableDialogs — no per-page setup. The entity prop of the table drives the translation keys, and recordName is derived from the row (first non-empty of name, username, email, code, key, model_id).

Bulk

Code
<BulkDeleteDialog entity="config_entry" bind:open={bulkDeleteDialogOpen} selectedCount={selectedKeys.length} isDeleting={isDeleting} onConfirm={handleBulkDelete} onCancel={() => (bulkDeleteDialogOpen = false)} />

Props

DeleteDialog / RestoreDialog

PropTypeDescription
entitystring requiredEntity key used to resolve system.entities.{entity}.singular — never pass a custom title
recordNamestring?Record display name, interpolated as "{name}" inside the confirm question
openboolean (bindable)Visibility
onOpenChange(open: boolean) => voidClose handler
isDeleting / isRestoringbooleanBusy state on the confirm CTA
onConfirm / onCancel() => voidActions

BulkDeleteDialog / BulkRestoreDialog

Same contract, plus selectedCount: number (interpolated as {count}) — no recordName.

Translation keys required per entity

For the dialogs to render correctly an entity needs, in system.translations:

Code
system.entities.{entity}.singular → e.g. "Modello AI" (titles) system.entities.{entity}.plural → e.g. "Modelli AI" (bulk) system.entities.{entity}.singular_definite → e.g. "il Modello AI" (confirm question — name WITH the definite article, per-language; falls back to `singular`)

The app.common.* templates already exist for all supported languages. app.common.deleteConfirm ("This action cannot be undone.") is rendered as the second line of DeleteDialog — keep it alive.

Rules

  • Never pass a custom title/body to these dialogs — there is no such prop.
  • Never use DialogBordered directly for entity delete/restore.
  • Non-entity destructive dialogs (model cache files, MFA reset, sessions) MAY keep custom titles via DialogBordered — they are not entity records.

Next steps

  • DialogBordered
  • EntityListTable
  • Component catalog
Last modified on October 28, 2026
DialogBorderedSheet panel
On this page
  • Purpose
  • Components
  • Usage
    • Single record — /system/ai (canonical, remote ai module page)
    • Entity list tables
    • Bulk
  • Props
    • DeleteDialog / RestoreDialog
    • BulkDeleteDialog / BulkRestoreDialog
  • Translation keys required per entity
  • Rules
  • Next steps