refactor(sidebar): drop company name from delete-confirm prompt

"删除 OrbitOps AI?" was being truncated to "删除O..." inside the
~100px inline confirm row, because the row has to share width with
the 是 / 否 buttons. The name-interpolation was the wrong half of
the message to keep: the user has just clicked the trash icon on a
specific row, so **which** company is about to be deleted is
already anchored by the row they are looking at. The bare
confirmation "删除?" / "Delete?" fits comfortably and loses zero
information.

- zh key: "删除{name}?" → "删除?"
- en key: "Delete {name}?" → "Delete?"
- Removed the `.replace("{name}", company.name)` call and the
  fallback string that also interpolated `company.name`.

No visual change to the 是 / 否 buttons; the confirm still blocks
the row, still requires an explicit click. The only thing gone is
the truncated company-name echo.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-17 21:32:59 -04:00
1 parent 68f2725918
commit b68307b24f
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ export const en: Record<string, string> = {
"common.close": "Close",
"common.yes": "Yes",
"common.no": "No",
"sidebar.deleteCompanyConfirm": "Delete {name}?",
"sidebar.deleteCompanyConfirm": "Delete?",
"common.confirm": "Confirm",
"common.status": "Status",
"common.started": "Started",
+1 -1
View File
@@ -288,7 +288,7 @@ export const zh: Record<string, string> = {
"common.close": "关闭",
"common.yes": "是",
"common.no": "否",
"sidebar.deleteCompanyConfirm": "删除{name}?",
"sidebar.deleteCompanyConfirm": "删除?",
"common.confirm": "确认",
"common.status": "状态",
"common.started": "开始时间",
+1 -1
View File
@@ -84,7 +84,7 @@ export function SidebarView({
<div key={company.id} className="group flex items-center">
{confirmDeleteCompanyId === company.id ? (
<div className="flex w-full items-center gap-2 px-3 py-2">
<span className="flex-1 truncate text-[12px] text-destructive">{t("sidebar.deleteCompanyConfirm", `Delete ${company.name}?`).replace("{name}", company.name)}</span>
<span className="flex-1 truncate text-[12px] text-destructive">{t("sidebar.deleteCompanyConfirm")}</span>
<button
type="button"
className="rounded px-2 py-0.5 text-[11px] font-semibold text-destructive transition hover:bg-destructive hover:text-primary-foreground"