mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Revert "[Desktop] Native window virtual menu bar (#2215)"
This reverts commit e076783b89.
This commit is contained in:
8
package-lock.json
generated
8
package-lock.json
generated
@@ -10,7 +10,7 @@
|
|||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
||||||
"@comfyorg/comfyui-electron-types": "^0.4.7",
|
"@comfyorg/comfyui-electron-types": "^0.4.6",
|
||||||
"@comfyorg/litegraph": "^0.8.60",
|
"@comfyorg/litegraph": "^0.8.60",
|
||||||
"@primevue/themes": "^4.0.5",
|
"@primevue/themes": "^4.0.5",
|
||||||
"@tiptap/core": "^2.10.4",
|
"@tiptap/core": "^2.10.4",
|
||||||
@@ -1935,9 +1935,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@comfyorg/comfyui-electron-types": {
|
"node_modules/@comfyorg/comfyui-electron-types": {
|
||||||
"version": "0.4.7",
|
"version": "0.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.4.6.tgz",
|
||||||
"integrity": "sha512-APC3C4VZOo9W6h0xiAGxnsU9iNp3T8rN9w/5KmOCI0GUoKtKg5U2OaicTmnMwcDSQe5Jxflmej53GyJ1nH9oRw==",
|
"integrity": "sha512-LY6AI7kMucMHU7UOAV9gGUPBUHrXXo1vxoabxupCL7xF2e8c14yHnJ4ngQogQrbwnLLax1mZfXNj/O9SyNtc9Q==",
|
||||||
"license": "GPL-3.0-only"
|
"license": "GPL-3.0-only"
|
||||||
},
|
},
|
||||||
"node_modules/@comfyorg/litegraph": {
|
"node_modules/@comfyorg/litegraph": {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
||||||
"@comfyorg/comfyui-electron-types": "^0.4.7",
|
"@comfyorg/comfyui-electron-types": "^0.4.6",
|
||||||
"@comfyorg/litegraph": "^0.8.60",
|
"@comfyorg/litegraph": "^0.8.60",
|
||||||
"@primevue/themes": "^4.0.5",
|
"@primevue/themes": "^4.0.5",
|
||||||
"@tiptap/core": "^2.10.4",
|
"@tiptap/core": "^2.10.4",
|
||||||
|
|||||||
@@ -764,11 +764,3 @@ audio.comfy-audio.empty-audio-widget {
|
|||||||
.p-tree-node-content {
|
.p-tree-node-content {
|
||||||
padding: var(--comfy-tree-explorer-item-padding) !important;
|
padding: var(--comfy-tree-explorer-item-padding) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-drag {
|
|
||||||
app-region: drag;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-drag {
|
|
||||||
app-region: no-drag;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,28 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="font-sans w-screen h-screen flex flex-col pointer-events-auto"
|
class="font-sans w-screen h-screen flex items-center justify-center pointer-events-auto overflow-auto"
|
||||||
:class="[
|
:class="[
|
||||||
props.dark
|
props.dark
|
||||||
? 'text-neutral-300 bg-neutral-900 dark-theme'
|
? 'text-neutral-300 bg-neutral-900 dark-theme'
|
||||||
: 'text-neutral-900 bg-neutral-300'
|
: 'text-neutral-900 bg-neutral-300'
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<!-- Virtual top menu for native window (drag handle) -->
|
<slot></slot>
|
||||||
<div
|
|
||||||
v-show="isNativeWindow"
|
|
||||||
ref="topMenuRef"
|
|
||||||
class="app-drag w-full h-[var(--comfy-topbar-height)]"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="flex-grow w-full flex items-center justify-center overflow-auto"
|
|
||||||
>
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, ref } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
|
|
||||||
import { electronAPI, isElectron } from '@/utils/envUtil'
|
import { electronAPI, isElectron } from '@/utils/envUtil'
|
||||||
|
|
||||||
@@ -45,19 +35,9 @@ const lightTheme = {
|
|||||||
symbolColor: '#171717'
|
symbolColor: '#171717'
|
||||||
}
|
}
|
||||||
|
|
||||||
const topMenuRef = ref<HTMLDivElement | null>(null)
|
onMounted(() => {
|
||||||
const isNativeWindow = ref(false)
|
|
||||||
onMounted(async () => {
|
|
||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
const windowStyle = await electronAPI().Config.getWindowStyle()
|
electronAPI().changeTheme(props.dark ? darkTheme : lightTheme)
|
||||||
isNativeWindow.value = windowStyle === 'custom'
|
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
electronAPI().changeTheme({
|
|
||||||
...(props.dark ? darkTheme : lightTheme),
|
|
||||||
height: topMenuRef.value.getBoundingClientRect().height
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user