mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-12 00:20:15 +00:00
fix: Make bottom panel tab titles reactive to language changes (#5077)
* computed extraMenuItems * add i18n key option * underline fix * Update locales [skip ci] * restore title * Update locales [skip ci] * refactor: Extract tab title logic to helper method for better readability - Moved complex nested ternary logic from template to getTabDisplayTitle helper - Improves code readability and maintainability - Addresses review feedback about using computed/method for performance --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -110,10 +110,11 @@ export const useBottomPanelStore = defineStore('bottomPanel', () => {
|
||||
panel.activeTabId = tab.id
|
||||
}
|
||||
|
||||
const tabName = tab.title || tab.titleKey || tab.id
|
||||
useCommandStore().registerCommand({
|
||||
id: `Workspace.ToggleBottomPanelTab.${tab.id}`,
|
||||
icon: 'pi pi-list',
|
||||
label: `Toggle ${tab.title} Bottom Panel`,
|
||||
label: `Toggle ${tabName} Bottom Panel`,
|
||||
category: 'view-controls' as const,
|
||||
function: () => toggleBottomPanelTab(tab.id),
|
||||
source: 'System'
|
||||
|
||||
Reference in New Issue
Block a user