mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat(editor): Add toggle viewport sync to workflow diffs & UI improvements (#19373)
This commit is contained in:
committed by
GitHub
parent
9509ef3e79
commit
d7b84747f8
@@ -14,7 +14,14 @@ import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
|||||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||||
import { removeWorkflowExecutionData } from '@/utils/workflowUtils';
|
import { removeWorkflowExecutionData } from '@/utils/workflowUtils';
|
||||||
import { N8nButton, N8nHeading, N8nIconButton, N8nRadioButtons, N8nText } from '@n8n/design-system';
|
import {
|
||||||
|
N8nButton,
|
||||||
|
N8nCheckbox,
|
||||||
|
N8nHeading,
|
||||||
|
N8nIconButton,
|
||||||
|
N8nRadioButtons,
|
||||||
|
N8nText,
|
||||||
|
} from '@n8n/design-system';
|
||||||
import type { BaseTextKey } from '@n8n/i18n';
|
import type { BaseTextKey } from '@n8n/i18n';
|
||||||
import { useI18n } from '@n8n/i18n';
|
import { useI18n } from '@n8n/i18n';
|
||||||
import type { EventBus } from '@n8n/utils/event-bus';
|
import type { EventBus } from '@n8n/utils/event-bus';
|
||||||
@@ -30,7 +37,7 @@ const props = defineProps<{
|
|||||||
data: { eventBus: EventBus; workflowId: string; direction: 'push' | 'pull' };
|
data: { eventBus: EventBus; workflowId: string; direction: 'push' | 'pull' };
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const { selectedDetailId, onNodeClick } = useProvideViewportSync();
|
const { selectedDetailId, onNodeClick, syncIsEnabled } = useProvideViewportSync();
|
||||||
|
|
||||||
const telemetry = useTelemetry();
|
const telemetry = useTelemetry();
|
||||||
const $style = useCssModule();
|
const $style = useCssModule();
|
||||||
@@ -427,6 +434,12 @@ const modifiers = [
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="$style.headerRight">
|
<div :class="$style.headerRight">
|
||||||
|
<N8nCheckbox
|
||||||
|
v-model="syncIsEnabled"
|
||||||
|
label-size="small"
|
||||||
|
label="Sync views"
|
||||||
|
class="mb-0 mr-s"
|
||||||
|
/>
|
||||||
<ElDropdown
|
<ElDropdown
|
||||||
trigger="click"
|
trigger="click"
|
||||||
:popper-options="{
|
:popper-options="{
|
||||||
@@ -434,10 +447,9 @@ const modifiers = [
|
|||||||
modifiers,
|
modifiers,
|
||||||
}"
|
}"
|
||||||
:popper-class="$style.popper"
|
:popper-class="$style.popper"
|
||||||
class="mr-2xs"
|
|
||||||
@visible-change="setActiveTab"
|
@visible-change="setActiveTab"
|
||||||
>
|
>
|
||||||
<N8nButton type="secondary">
|
<N8nButton type="secondary" style="--button-border-radius: 4px 0 0 4px">
|
||||||
<div v-if="changesCount" :class="$style.circleBadge">
|
<div v-if="changesCount" :class="$style.circleBadge">
|
||||||
{{ changesCount }}
|
{{ changesCount }}
|
||||||
</div>
|
</div>
|
||||||
@@ -567,16 +579,17 @@ const modifiers = [
|
|||||||
<N8nIconButton
|
<N8nIconButton
|
||||||
icon="chevron-left"
|
icon="chevron-left"
|
||||||
type="secondary"
|
type="secondary"
|
||||||
class="mr-2xs"
|
|
||||||
:class="$style.navigationButton"
|
:class="$style.navigationButton"
|
||||||
|
style="--button-border-radius: 0; margin: 0 -1px"
|
||||||
@click="previousNodeChange"
|
@click="previousNodeChange"
|
||||||
></N8nIconButton>
|
/>
|
||||||
<N8nIconButton
|
<N8nIconButton
|
||||||
icon="chevron-right"
|
icon="chevron-right"
|
||||||
type="secondary"
|
type="secondary"
|
||||||
:class="$style.navigationButton"
|
:class="$style.navigationButton"
|
||||||
|
style="--button-border-radius: 0 4px 4px 0"
|
||||||
@click="nextNodeChange"
|
@click="nextNodeChange"
|
||||||
></N8nIconButton>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user