Merge branch 'fix/delete-dict-button-colors' into 'main'
fix(ui): delete dict modal — destructive вместо invalid mars/danger See merge request 2-6/2-6-4/terravault/ordinis!294
This commit is contained in:
@@ -241,7 +241,7 @@ export function EditorInfoPanel({ detail, recordCount, actions, banner }: Editor
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={actions.onDelete}
|
onClick={actions.onDelete}
|
||||||
disabled={actions.deletePending}
|
disabled={actions.deletePending}
|
||||||
className="w-full h-8 rounded-md border border-mars/40 bg-surface text-mars text-cell flex items-center justify-center gap-1.5 transition-colors hover:border-mars hover:bg-mars/8 disabled:opacity-50 disabled:cursor-not-allowed"
|
className="w-full h-8 rounded-md border border-destructive/40 bg-surface text-destructive text-cell flex items-center justify-center gap-1.5 transition-colors hover:border-destructive hover:bg-destructive/10 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
>
|
>
|
||||||
{actions.deletePending
|
{actions.deletePending
|
||||||
? t('dict.delete.pending', { defaultValue: 'Удаляю…' })
|
? t('dict.delete.pending', { defaultValue: 'Удаляю…' })
|
||||||
|
|||||||
@@ -1848,12 +1848,12 @@ function DictionaryDetail() {
|
|||||||
'Будут удалены: ВСЕ записи справочника, drafts, schema-drafts, история версий. Эта операция необратима.',
|
'Будут удалены: ВСЕ записи справочника, drafts, schema-drafts, история версий. Эта операция необратима.',
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
<div className="rounded-md border border-mars/30 bg-mars/8 px-3 py-2 text-cell">
|
<div className="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-cell">
|
||||||
<strong>{name}</strong>
|
<strong>{name}</strong>
|
||||||
{detailQuery.data?.displayName ? ` — ${detailQuery.data.displayName}` : null}
|
{detailQuery.data?.displayName ? ` — ${detailQuery.data.displayName}` : null}
|
||||||
</div>
|
</div>
|
||||||
{deleteError && (
|
{deleteError && (
|
||||||
<div className="rounded-md border border-mars/40 bg-mars/8 px-3 py-2 text-cell text-mars whitespace-pre-line">
|
<div className="rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-cell text-destructive whitespace-pre-line">
|
||||||
{deleteError}
|
{deleteError}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -1871,7 +1871,7 @@ function DictionaryDetail() {
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="h-9 px-4 rounded-md bg-mars text-surface text-cell font-medium hover:bg-mars/85 disabled:opacity-50 disabled:cursor-not-allowed"
|
className="h-9 px-4 rounded-md bg-destructive text-destructive-foreground text-cell font-medium hover:bg-destructive/85 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setDeleteError(null)
|
setDeleteError(null)
|
||||||
deleteMut.mutate(
|
deleteMut.mutate(
|
||||||
@@ -1913,7 +1913,7 @@ function DictionaryDetail() {
|
|||||||
deleteError.toLowerCase().includes('зависимы')) ? (
|
deleteError.toLowerCase().includes('зависимы')) ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="h-9 px-4 rounded-md border border-mars/40 bg-surface text-mars text-cell hover:bg-mars/8 disabled:opacity-50 disabled:cursor-not-allowed"
|
className="h-9 px-4 rounded-md border border-destructive/40 bg-surface text-destructive text-cell hover:bg-destructive/10 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setDeleteError(null)
|
setDeleteError(null)
|
||||||
deleteMut.mutate(
|
deleteMut.mutate(
|
||||||
|
|||||||
Reference in New Issue
Block a user