mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-24 00:09:32 +00:00
Add native context menu when using desktop (#1875)
* Add system menu to elements * Add desktop text context menu control * Update electron types --------- Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
size="large"
|
||||
v-tooltip="{ value: $t('menu.showMenu'), showDelay: 300 }"
|
||||
@click="exitFocusMode"
|
||||
@contextmenu="showNativeMenu"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -18,6 +19,7 @@ import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import { computed, CSSProperties, watchEffect } from 'vue'
|
||||
import { app } from '@/scripts/app'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { showNativeMenu } from '@/utils/envUtil'
|
||||
|
||||
const workspaceState = useWorkspaceStore()
|
||||
const settingStore = useSettingStore()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
text
|
||||
v-tooltip="{ value: $t('menu.hideMenu'), showDelay: 300 }"
|
||||
@click="workspaceState.focusMode = true"
|
||||
@contextmenu="showNativeMenu"
|
||||
/>
|
||||
</div>
|
||||
</teleport>
|
||||
@@ -38,6 +39,7 @@ import { useSettingStore } from '@/stores/settingStore'
|
||||
import { app } from '@/scripts/app'
|
||||
import { useEventBus } from '@vueuse/core'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import { showNativeMenu } from '@/utils/envUtil'
|
||||
|
||||
const workspaceState = useWorkspaceStore()
|
||||
const settingStore = useSettingStore()
|
||||
|
||||
Reference in New Issue
Block a user