Add About to Help menu (#2010)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
filtered
2024-12-23 08:17:25 +11:00
committed by GitHub
parent c3ceef0461
commit 3767749398
14 changed files with 58 additions and 4 deletions

View File

@@ -82,6 +82,10 @@ import { isElectron } from '@/utils/envUtil'
import { normalizeI18nKey } from '@/utils/formatUtil'
import { useI18n } from 'vue-i18n'
const props = defineProps<{
defaultPanel?: 'about' | 'keybinding' | 'extension' | 'server-config'
}>()
const KeybindingPanel = defineAsyncComponent(
() => import('./setting/KeybindingPanel.vue')
)
@@ -156,7 +160,10 @@ watch(activeCategory, (newCategory, oldCategory) => {
})
onMounted(() => {
activeCategory.value = categories.value[0]
activeCategory.value = props.defaultPanel
? categories.value.find((x) => x.key === props.defaultPanel) ??
categories.value[0]
: categories.value[0]
})
const sortedGroups = (category: SettingTreeNode): ISettingGroup[] => {

View File

@@ -21,5 +21,6 @@ export const CORE_MENU_COMMANDS = [
'Comfy.Help.OpenComfyUIDocs',
'Comfy.Help.OpenComfyOrgDiscord'
]
]
],
[['Help'], ['Comfy.Help.AboutComfyUI']]
]

View File

@@ -500,6 +500,16 @@ export function useCoreCommands(): ComfyCommand[] {
function: () => {
useSearchBoxStore().toggleVisible()
}
},
{
id: 'Comfy.Help.AboutComfyUI',
icon: 'pi pi-info-circle',
label: 'Open About ComfyUI',
menubarLabel: 'About ComfyUI',
versionAdded: '1.6.4',
function: () => {
showSettingsDialog('about')
}
}
]
}

View File

@@ -95,6 +95,9 @@
"Comfy_GroupNode_UngroupSelectedGroupNodes": {
"label": "Ungroup selected group nodes"
},
"Comfy_Help_AboutComfyUI": {
"label": "Open About ComfyUI"
},
"Comfy_Help_OpenComfyOrgDiscord": {
"label": "Open Comfy-Org Discord"
},

View File

@@ -341,6 +341,7 @@
"Convert selected nodes to group node": "Convert selected nodes to group node",
"Manage group nodes": "Manage group nodes",
"Ungroup selected group nodes": "Ungroup selected group nodes",
"About ComfyUI": "About ComfyUI",
"Comfy-Org Discord": "Comfy-Org Discord",
"ComfyUI Docs": "ComfyUI Docs",
"ComfyUI Issues": "ComfyUI Issues",

View File

@@ -95,6 +95,9 @@
"Comfy_GroupNode_UngroupSelectedGroupNodes": {
"label": "選択したグループノードのグループ解除"
},
"Comfy_Help_AboutComfyUI": {
"label": "ComfyUIについてを開く"
},
"Comfy_Help_OpenComfyOrgDiscord": {
"label": "Comfy-OrgのDiscordを開く"
},

View File

@@ -235,6 +235,7 @@
"toggleBottomPanel": "下部パネルを切り替え"
},
"menuLabels": {
"About ComfyUI": "ComfyUIについて",
"Browse Templates": "テンプレートを参照",
"Bypass/Unbypass Selected Nodes": "選択したノードのバイパス/バイパス解除",
"Canvas Toggle Link Visibility": "キャンバスのリンク表示を切り替え",

View File

@@ -95,6 +95,9 @@
"Comfy_GroupNode_UngroupSelectedGroupNodes": {
"label": "선택한 그룹 노드 분리"
},
"Comfy_Help_AboutComfyUI": {
"label": "ComfyUI 정보 열기"
},
"Comfy_Help_OpenComfyOrgDiscord": {
"label": "Comfy-Org 디스코드 열기"
},

View File

@@ -235,6 +235,7 @@
"toggleBottomPanel": "하단 패널 전환"
},
"menuLabels": {
"About ComfyUI": "ComfyUI에 대하여",
"Browse Templates": "템플릿 탐색",
"Bypass/Unbypass Selected Nodes": "선택한 노드 우회/우회 해제",
"Canvas Toggle Link Visibility": "캔버스 토글 링크 가시성",

View File

@@ -95,6 +95,9 @@
"Comfy_GroupNode_UngroupSelectedGroupNodes": {
"label": "Разгруппировать выбранные групповые узлы"
},
"Comfy_Help_AboutComfyUI": {
"label": "Открыть о ComfyUI"
},
"Comfy_Help_OpenComfyOrgDiscord": {
"label": "Открыть Comfy-Org Discord"
},

View File

@@ -235,6 +235,7 @@
"toggleBottomPanel": "Переключить нижнюю панель"
},
"menuLabels": {
"About ComfyUI": "О ComfyUI",
"Browse Templates": "Просмотреть шаблоны",
"Bypass/Unbypass Selected Nodes": "Обойти/восстановить выбранные узлы",
"Canvas Toggle Link Visibility": "Переключение видимости ссылки на холст",

View File

@@ -95,6 +95,9 @@
"Comfy_GroupNode_UngroupSelectedGroupNodes": {
"label": "取消选定组节点的分组"
},
"Comfy_Help_AboutComfyUI": {
"label": "打开关于ComfyUI"
},
"Comfy_Help_OpenComfyOrgDiscord": {
"label": "打开Comfy-Org Discord"
},

View File

@@ -235,6 +235,7 @@
"toggleBottomPanel": "底部面板"
},
"menuLabels": {
"About ComfyUI": "关于ComfyUI",
"Browse Templates": "浏览模板",
"Bypass/Unbypass Selected Nodes": "旁路/取消旁路选定节点",
"Canvas Toggle Link Visibility": "切换链接可见性",

View File

@@ -39,11 +39,27 @@ export function showMissingModelsWarning(props: {
})
}
export function showSettingsDialog() {
export function showSettingsDialog(
panel?: 'about' | 'keybinding' | 'extension' | 'server-config'
) {
const props = panel ? { props: { defaultPanel: panel } } : undefined
useDialogStore().showDialog({
key: 'global-settings',
headerComponent: SettingDialogHeader,
component: SettingDialogContent
component: SettingDialogContent,
...props
})
}
export function showAboutDialog() {
useDialogStore().showDialog({
key: 'global-settings',
headerComponent: SettingDialogHeader,
component: SettingDialogContent,
props: {
defaultPanel: 'about'
}
})
}