mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
Misc app mode fixes (#9368)
A working branch of smaller app mode fixes. Can be merged at any time and I'll make a new branch. - Selected inputs and outputs can now be re-ordered when clicking on label text - 3d outputs once again display correctly - Some padding has been added to the side so that control buttons don't overlap with the floating app sidebar controls - A "Share" button placeholder has been added to the menu, but is disabled - Adds a workaround for canvas read_only state being disabled when 'space' is pressed. - This one is particularly hacky, and can be pulled out if problematic - Fix download all only downloading the first output ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9368-Misc-app-mode-fixes-3196d73d365081eab02ad1e693784707) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -45,7 +45,8 @@ const props = defineProps<{
|
||||
|
||||
defineEmits<{ navigateAssets: [] }>()
|
||||
|
||||
const jobFinishedQueue = ref(true)
|
||||
//NOTE: due to batching, will never be greater than 2
|
||||
const pendingJobQueues = ref(0)
|
||||
const { ready: jobToastTimeout, start: resetJobToastTimeout } = useTimeout(
|
||||
8000,
|
||||
{ controls: true, immediate: false }
|
||||
@@ -133,9 +134,8 @@ const partitionedNodes = computed(() => {
|
||||
//TODO: refactor out of this file.
|
||||
//code length is small, but changes should propagate
|
||||
async function runButtonClick(e: Event) {
|
||||
if (!jobFinishedQueue.value) return
|
||||
try {
|
||||
jobFinishedQueue.value = false
|
||||
pendingJobQueues.value += 1
|
||||
resetJobToastTimeout()
|
||||
const isShiftPressed = 'shiftKey' in e && e.shiftKey
|
||||
const commandId = isShiftPressed
|
||||
@@ -155,7 +155,7 @@ async function runButtonClick(e: Event) {
|
||||
})
|
||||
} finally {
|
||||
//TODO: Error state indicator for failed queue?
|
||||
jobFinishedQueue.value = true
|
||||
pendingJobQueues.value -= 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ defineExpose({ runButtonClick })
|
||||
</template>
|
||||
</section>
|
||||
<Teleport
|
||||
v-if="!jobToastTimeout || !jobFinishedQueue"
|
||||
v-if="!jobToastTimeout || pendingJobQueues > 0"
|
||||
defer
|
||||
:disabled="mobile"
|
||||
:to="toastTo"
|
||||
@@ -252,7 +252,7 @@ defineExpose({ runButtonClick })
|
||||
<div
|
||||
class="bg-base-foreground md:bg-secondary-background text-base-background md:text-base-foreground rounded-lg flex h-10 md:h-8 p-1 pr-2 gap-2 items-center"
|
||||
>
|
||||
<template v-if="jobFinishedQueue">
|
||||
<template v-if="pendingJobQueues === 0">
|
||||
<i
|
||||
class="icon-[lucide--check] size-5 not-md:bg-success-background"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user