fix(ui): correct translation interpolation and button alignment

- Fix date interpolation in workspace settings translation
- Add tooltip for disabled delete button on default workspace
- Align v2 nav button items properly with center alignment
This commit is contained in:
Quorafind 2025-09-24 14:03:59 +08:00
parent 2d7a697ec7
commit ec09f34771
2 changed files with 12 additions and 4 deletions

View file

@ -949,9 +949,11 @@ export class TaskProgressBarSettingTab extends PluginSettingTab {
isDefaultWs
? t("Default workspace")
: t("Last updated: {{date}}", {
date: new Date(
workspace.updatedAt
).toLocaleDateString(),
interpolation: {
date: new Date(
workspace.updatedAt
).toLocaleDateString(),
},
})
)
.addButton((button) => {
@ -979,6 +981,11 @@ export class TaskProgressBarSettingTab extends PluginSettingTab {
})
.addButton((button) => {
if (isDefaultWs) {
button
.setIcon("trash")
.setTooltip(
t("Default workspace cannot be deleted")
);
button.setDisabled(true);
} else {
button

File diff suppressed because one or more lines are too long