mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 15:54:09 +00:00
Backport of #8250 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8291-backport-cloud-1-37-Linear-progressbar-tooltips-and-output-fixes-2f26d73d36508170a083eef8dfd1be50) by [Unito](https://www.unito.io) --------- Co-authored-by: AustinMroz <austin@comfy.org> Co-authored-by: GitHub Action <action@github.com>
42 lines
1.1 KiB
Vue
42 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
import { t } from '@/i18n'
|
|
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
|
|
import { useCommandStore } from '@/stores/commandStore'
|
|
|
|
const canvasStore = useCanvasStore()
|
|
function toggleLinearMode() {
|
|
useCommandStore().execute('Comfy.ToggleLinear', {
|
|
metadata: { source: 'button' }
|
|
})
|
|
}
|
|
</script>
|
|
<template>
|
|
<div class="p-1 bg-secondary-background rounded-lg w-10">
|
|
<Button
|
|
v-tooltip="{
|
|
value: t('linearMode.linearMode'),
|
|
showDelay: 300,
|
|
hideDelay: 300
|
|
}"
|
|
size="icon"
|
|
:variant="canvasStore.linearMode ? 'inverted' : 'secondary'"
|
|
@click="toggleLinearMode"
|
|
>
|
|
<i class="icon-[lucide--panels-top-left]" />
|
|
</Button>
|
|
<Button
|
|
v-tooltip="{
|
|
value: t('linearMode.graphMode'),
|
|
showDelay: 300,
|
|
hideDelay: 300
|
|
}"
|
|
size="icon"
|
|
:variant="canvasStore.linearMode ? 'secondary' : 'inverted'"
|
|
@click="toggleLinearMode"
|
|
>
|
|
<i class="icon-[comfy--workflow]" />
|
|
</Button>
|
|
</div>
|
|
</template>
|