Skip to content

Commit 01e2fbc

Browse files
[backport core/1.32] Share button and Assets Panel in Linear Mode (#6794) (#6938)
## Summary Backport of #6794 to core/1.32 - Re-enables share button in Linear Mode (exports workflow) - Displays Assets Panel in left sidebar instead of Queue Panel - Adds margin to main content area ## Conflict Resolution Resolved conflict in `src/views/LinearView.vue`: - Replaced `useQueueSidebarTab` → `useAssetsSidebarTab` (the intended change from the original PR) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6938-backport-Share-button-and-Assets-Panel-in-Linear-Mode-6794-2b66d73d365081c697d6c4d2b0040388) by [Unito](https://www.unito.io) Co-authored-by: AustinMroz <[email protected]>
1 parent 5172e6f commit 01e2fbc

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)