mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-23 18:20:01 +00:00
refactor(grid): show pending count on commit button
This commit is contained in:
@@ -5537,13 +5537,6 @@ const gridContextMenuItems = computed<ContextMenuItem[]>(() => {
|
||||
>
|
||||
<Plus class="w-3 h-3 mr-1" /> {{ t("grid.addRow") }}
|
||||
</Button>
|
||||
<span
|
||||
v-if="transactionActive"
|
||||
class="flex shrink-0 items-center gap-1 px-1 text-xs text-emerald-600 dark:text-emerald-400"
|
||||
>
|
||||
<span class="h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse" />
|
||||
{{ t("grid.transactionActive") }}
|
||||
</span>
|
||||
<template v-if="saveToolbarState.showActions">
|
||||
<Tooltip>
|
||||
<TooltipTrigger as-child>
|
||||
@@ -5555,6 +5548,12 @@ const gridContextMenuItems = computed<ContextMenuItem[]>(() => {
|
||||
@click="onToolbarCommit"
|
||||
>
|
||||
<Loader2 v-if="isSaving" class="w-3 h-3 mr-1 animate-spin" />
|
||||
<span
|
||||
v-else-if="pendingChangeCount > 0"
|
||||
class="mr-1 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-amber-300 px-1 text-[9px] font-semibold leading-none text-amber-950 shadow-[0_0_0_1px_rgba(120,53,15,0.16)] dark:bg-amber-400 dark:text-amber-950"
|
||||
>
|
||||
{{ pendingChangeCount }}
|
||||
</span>
|
||||
<Save v-else class="w-3 h-3 mr-1" />
|
||||
{{ t(saveActionMode.labelKey, { count: pendingChangeCount }) }}
|
||||
</Button>
|
||||
|
||||
@@ -627,7 +627,6 @@ export default {
|
||||
transactionSaveHint: "Commit {count} pending change(s) in a transaction.",
|
||||
nonTransactionalSaveHint:
|
||||
"Save {count} pending change(s) one by one. If one fails, earlier successful changes will not be rolled back.",
|
||||
transactionActive: "Editing",
|
||||
keylessEditWarning: "No primary key",
|
||||
keylessEditWarningHint:
|
||||
"This table has no primary key. Updates and deletes use all original row values in the WHERE clause; exact duplicate rows may be affected together.",
|
||||
|
||||
@@ -581,7 +581,6 @@ export default {
|
||||
transactionSaveHint: "Confirma {count} cambio(s) pendiente(s) en una transacción.",
|
||||
nonTransactionalSaveHint:
|
||||
"Guarda {count} cambio(s) pendiente(s) uno por uno. Si uno falla, los cambios anteriores correctos no se revierten.",
|
||||
transactionActive: "Editando",
|
||||
keylessEditWarning: "Sin clave primaria",
|
||||
keylessEditWarningHint:
|
||||
"Esta tabla no tiene clave primaria. Las actualizaciones y eliminaciones usan todos los valores originales de la fila en WHERE; filas duplicadas exactas pueden verse afectadas juntas.",
|
||||
|
||||
@@ -621,7 +621,6 @@ export default {
|
||||
rollback: "回滚",
|
||||
transactionSaveHint: "在事务中提交 {count} 项待保存更改。",
|
||||
nonTransactionalSaveHint: "逐条保存 {count} 项更改;如果中途失败,前面已成功的更改不会回滚。",
|
||||
transactionActive: "编辑中",
|
||||
keylessEditWarning: "无主键定位",
|
||||
keylessEditWarningHint:
|
||||
"这张表没有主键。保存更新或删除时会使用整行原始值作为 WHERE 条件;如果存在完全重复的行,可能会影响多行。",
|
||||
|
||||
@@ -620,7 +620,6 @@ export default {
|
||||
rollback: "回溯",
|
||||
transactionSaveHint: "在事務中提交 {count} 項待儲存更改。",
|
||||
nonTransactionalSaveHint: "逐條儲存 {count} 項更改;如果中途失敗,前面已成功的更改不會回溯。",
|
||||
transactionActive: "編輯中",
|
||||
keylessEditWarning: "無主鍵定位",
|
||||
keylessEditWarningHint:
|
||||
"此資料表沒有主鍵。更新與刪除會在 WHERE 子句中使用所有原始資料列值;完全重複的資料列可能會一起受到影響。",
|
||||
|
||||
Reference in New Issue
Block a user