mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 15:10:06 +00:00
* 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>
29 lines
955 B
TypeScript
29 lines
955 B
TypeScript
import { markRaw } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import CommandTerminal from '@/components/bottomPanel/tabs/terminal/CommandTerminal.vue'
|
|
import LogsTerminal from '@/components/bottomPanel/tabs/terminal/LogsTerminal.vue'
|
|
import { BottomPanelExtension } from '@/types/extensionTypes'
|
|
|
|
export const useLogsTerminalTab = (): BottomPanelExtension => {
|
|
const { t } = useI18n()
|
|
return {
|
|
id: 'logs-terminal',
|
|
title: t('g.logs'), // For command labels (collected by i18n workflow)
|
|
titleKey: 'g.logs', // For dynamic translation in UI
|
|
component: markRaw(LogsTerminal),
|
|
type: 'vue'
|
|
}
|
|
}
|
|
|
|
export const useCommandTerminalTab = (): BottomPanelExtension => {
|
|
const { t } = useI18n()
|
|
return {
|
|
id: 'command-terminal',
|
|
title: t('g.terminal'), // For command labels (collected by i18n workflow)
|
|
titleKey: 'g.terminal', // For dynamic translation in UI
|
|
component: markRaw(CommandTerminal),
|
|
type: 'vue'
|
|
}
|
|
}
|