mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-08 01:16:43 -03:00
feat(lora-cycler): disable pause button when prompts are queued
- Add `hasQueuedPrompts` reactive flag to track queued executions - Pass `is-pause-disabled` prop to settings view to disable pause button - Update pause button title to indicate why it's disabled - Remove server queue clearing logic from pause toggle handler - Clear `hasQueuedPrompts` flag when manually changing index or resetting - Set `hasQueuedPrompts` to true when adding prompts to execution queue - Update flag when processing queued executions to reflect current queue state
This commit is contained in:
@@ -87,8 +87,9 @@
|
||||
<button
|
||||
class="control-btn"
|
||||
:class="{ active: isPaused }"
|
||||
:disabled="isPauseDisabled"
|
||||
@click="$emit('toggle-pause')"
|
||||
:title="isPaused ? 'Continue iteration' : 'Pause iteration'"
|
||||
:title="isPauseDisabled ? 'Cannot pause while prompts are queued' : (isPaused ? 'Continue iteration' : 'Pause iteration')"
|
||||
>
|
||||
<svg v-if="isPaused" viewBox="0 0 24 24" fill="currentColor" class="control-icon">
|
||||
<path d="M8 5v14l11-7z"/>
|
||||
@@ -175,6 +176,7 @@ const props = defineProps<{
|
||||
repeatCount: number
|
||||
repeatUsed: number
|
||||
isPaused: boolean
|
||||
isPauseDisabled: boolean
|
||||
isWorkflowExecuting: boolean
|
||||
executingRepeatStep: number
|
||||
}>()
|
||||
@@ -504,12 +506,17 @@ const onRepeatBlur = (event: Event) => {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.control-btn:hover {
|
||||
.control-btn:hover:not(:disabled) {
|
||||
background: rgba(66, 153, 225, 0.2);
|
||||
border-color: rgba(66, 153, 225, 0.4);
|
||||
color: rgba(191, 219, 254, 1);
|
||||
}
|
||||
|
||||
.control-btn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.control-btn.active {
|
||||
background: rgba(245, 158, 11, 0.2);
|
||||
border-color: rgba(245, 158, 11, 0.5);
|
||||
|
||||
Reference in New Issue
Block a user