Skip to content

Commit 58b051a

Browse files
authored
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 0b33470 commit 58b051a

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

src/locales/en/main.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,6 +2199,10 @@
21992199
"vueNodesMigrationMainMenu": {
22002200
"message": "Switch back to Nodes 2.0 anytime from the main menu."
22012201
},
2202+
"linearMode": {
2203+
"share": "Share",
2204+
"openWorkflow": "Open Workflow"
2205+
},
22022206
"missingNodes": {
22032207
"cloud": {
22042208
"title": "These nodes aren't available on Comfy Cloud yet",

src/views/LinearView.vue

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Splitter from 'primevue/splitter'
55
import SplitterPanel from 'primevue/splitterpanel'
66
import { computed } from 'vue'
77
8+
import ExtensionSlot from '@/components/common/ExtensionSlot.vue'
89
import CurrentUserButton from '@/components/topbar/CurrentUserButton.vue'
910
import LoginButton from '@/components/topbar/LoginButton.vue'
1011
import TopbarBadges from '@/components/topbar/TopbarBadges.vue'
@@ -14,20 +15,20 @@ import {
1415
isValidWidgetValue,
1516
safeWidgetMapper
1617
} from '@/composables/graph/useGraphNodeManager'
18+
import { useAssetsSidebarTab } from '@/composables/sidebarTabs/useAssetsSidebarTab'
1719
import { t } from '@/i18n'
1820
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
1921
import { useTelemetry } from '@/platform/telemetry'
22+
import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
2023
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
2124
import NodeWidgets from '@/renderer/extensions/vueNodes/components/NodeWidgets.vue'
2225
import WidgetInputNumberInput from '@/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue'
2326
import { app } from '@/scripts/app'
2427
import { useCommandStore } from '@/stores/commandStore'
2528
import { useNodeOutputStore } from '@/stores/imagePreviewStore'
26-
//import { useQueueStore } from '@/stores/queueStore'
2729
import { useQueueSettingsStore } from '@/stores/queueStore'
2830
import { isElectron } from '@/utils/envUtil'
2931
30-
//const queueStore = useQueueStore()
3132
const nodeOutputStore = useNodeOutputStore()
3233
const commandStore = useCommandStore()
3334
const nodeDatas = computed(() => {
@@ -114,9 +115,16 @@ function openFeedback() {
114115
class="h-[calc(100%-38px)] w-full bg-comfy-menu-secondary-bg"
115116
:pt="{ gutter: { class: 'bg-transparent w-4 -mx-3' } }"
116117
>
118+
<SplitterPanel :size="1" class="min-w-min bg-comfy-menu-bg">
119+
<div
120+
class="sidebar-content-container h-full w-full overflow-x-hidden overflow-y-auto border-r-1 border-node-component-border"
121+
>
122+
<ExtensionSlot :extension="useAssetsSidebarTab()" />
123+
</div>
124+
</SplitterPanel>
117125
<SplitterPanel
118-
:size="99"
119-
class="flex flex-row overflow-y-auto flex-wrap min-w-min gap-4"
126+
:size="98"
127+
class="flex flex-row overflow-y-auto flex-wrap min-w-min gap-4 m-4"
120128
>
121129
<img
122130
v-for="previewUrl in nodeOutputStore.latestOutput"
@@ -132,18 +140,26 @@ function openFeedback() {
132140
</SplitterPanel>
133141
<SplitterPanel :size="1" class="flex flex-col gap-1 p-1 min-w-min">
134142
<div
135-
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"
136144
>
137-
<Button label="Feedback" severity="secondary" @click="openFeedback" />
138145
<Button
139-
label="Open Workflow"
146+
:label="t('g.feedback')"
147+
severity="secondary"
148+
@click="openFeedback"
149+
/>
150+
<Button
151+
:label="t('linearMode.openWorkflow')"
140152
severity="secondary"
141153
class="min-w-max"
142154
icon="icon-[comfy--workflow]"
143155
icon-pos="right"
144156
@click="useCanvasStore().linearMode = false"
145157
/>
146-
<!--<Button label="Share" severity="contrast" /> Temporarily disabled-->
158+
<Button
159+
:label="t('linearMode.share')"
160+
severity="contrast"
161+
@click="useWorkflowService().exportWorkflow('workflow', 'workflow')"
162+
/>
147163
<CurrentUserButton v-if="isLoggedIn" />
148164
<LoginButton v-else-if="isDesktop" />
149165
</div>

0 commit comments

Comments
 (0)