Skip to content

Commit 6353550

Browse files
AustinMrozchristian-byrne
authored andcommitted
Share button and Assets Panel in Linear Mode (#6794)
- Re-enables the share button in Linear Mode and have it export the current workflow - Not as nice as having it copy an actual URL, but good enough for the interim and it help with dead space - Display the Media Assets Panel on the left hand side to replace the removed Queue Panel <img width="806" alt="image" src="https://github.com/user-attachments/assets/93786dfa-8fbb-4368-8594-b9c98bbeb79e" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6794-Share-button-and-Assets-Panel-in-Linear-Mode-2b26d73d36508178aef9ededa38d47f1) by [Unito](https://www.unito.io)
1 parent 5172e6f commit 6353550

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/locales/en/main.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,6 +2207,10 @@
22072207
"vueNodesMigrationMainMenu": {
22082208
"message": "Switch back to Nodes 2.0 anytime from the main menu."
22092209
},
2210+
"linearMode": {
2211+
"share": "Share",
2212+
"openWorkflow": "Open Workflow"
2213+
},
22102214
"missingNodes": {
22112215
"cloud": {
22122216
"title": "These nodes aren't available on Comfy Cloud yet",

src/views/LinearView.vue

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ import {
1515
isValidWidgetValue,
1616
safeWidgetMapper
1717
} from '@/composables/graph/useGraphNodeManager'
18-
import { useQueueSidebarTab } from '@/composables/sidebarTabs/useQueueSidebarTab'
18+
import { useAssetsSidebarTab } from '@/composables/sidebarTabs/useAssetsSidebarTab'
1919
import { t } from '@/i18n'
2020
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
2121
import { useTelemetry } from '@/platform/telemetry'
22+
import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
2223
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
2324
import NodeWidgets from '@/renderer/extensions/vueNodes/components/NodeWidgets.vue'
2425
import WidgetInputNumberInput from '@/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue'
2526
import { app } from '@/scripts/app'
2627
import { useCommandStore } from '@/stores/commandStore'
2728
import { useNodeOutputStore } from '@/stores/imagePreviewStore'
28-
//import { useQueueStore } from '@/stores/queueStore'
2929
import { useQueueSettingsStore } from '@/stores/queueStore'
3030
import { isElectron } from '@/utils/envUtil'
3131
32-
//const queueStore = useQueueStore()
3332
const nodeOutputStore = useNodeOutputStore()
3433
const commandStore = useCommandStore()
3534
const nodeDatas = computed(() => {
@@ -120,12 +119,12 @@ function openFeedback() {
120119
<div
121120
class="sidebar-content-container h-full w-full overflow-x-hidden overflow-y-auto border-r-1 border-node-component-border"
122121
>
123-
<ExtensionSlot :extension="useQueueSidebarTab()" />
122+
<ExtensionSlot :extension="useAssetsSidebarTab()" />
124123
</div>
125124
</SplitterPanel>
126125
<SplitterPanel
127126
:size="98"
128-
class="flex flex-row overflow-y-auto flex-wrap min-w-min gap-4"
127+
class="flex flex-row overflow-y-auto flex-wrap min-w-min gap-4 m-4"
129128
>
130129
<img
131130
v-for="previewUrl in nodeOutputStore.latestOutput"
@@ -141,18 +140,26 @@ function openFeedback() {
141140
</SplitterPanel>
142141
<SplitterPanel :size="1" class="flex flex-col gap-1 p-1 min-w-min">
143142
<div
144-
class="actionbar-container flex h-12 items-center rounded-lg border border-[var(--interface-stroke)] p-2 gap-2 bg-comfy-menu-bg justify-center"
143+
class="actionbar-container flex h-12 items-center rounded-lg border border-[var(--interface-stroke)] p-2 gap-2 bg-comfy-menu-bg justify-end"
145144
>
146-
<Button label="Feedback" severity="secondary" @click="openFeedback" />
147145
<Button
148-
label="Open Workflow"
146+
:label="t('g.feedback')"
147+
severity="secondary"
148+
@click="openFeedback"
149+
/>
150+
<Button
151+
:label="t('linearMode.openWorkflow')"
149152
severity="secondary"
150153
class="min-w-max"
151154
icon="icon-[comfy--workflow]"
152155
icon-pos="right"
153156
@click="useCanvasStore().linearMode = false"
154157
/>
155-
<!--<Button label="Share" severity="contrast" /> Temporarily disabled-->
158+
<Button
159+
:label="t('linearMode.share')"
160+
severity="contrast"
161+
@click="useWorkflowService().exportWorkflow('workflow', 'workflow')"
162+
/>
156163
<CurrentUserButton v-if="isLoggedIn" />
157164
<LoginButton v-else-if="isDesktop" />
158165
</div>

0 commit comments

Comments
 (0)