mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(editor): Workflow history [WIP]- Add workflow history opening button to main header component (no-changelog) (#7310)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -101,6 +101,13 @@
|
||||
data-test-id="workflow-save-button"
|
||||
@click="onSaveButtonClick"
|
||||
/>
|
||||
<router-link
|
||||
v-if="isWorkflowHistoryFeatureEnabled"
|
||||
:to="workflowHistoryRoute"
|
||||
:class="$style.workflowHistoryButton"
|
||||
>
|
||||
<n8n-icon icon="history" size="medium" />
|
||||
</router-link>
|
||||
<div :class="$style.workflowMenuContainer">
|
||||
<input
|
||||
:class="$style.hiddenInput"
|
||||
@@ -335,6 +342,19 @@ export default defineComponent({
|
||||
|
||||
return actions;
|
||||
},
|
||||
isWorkflowHistoryFeatureEnabled(): boolean {
|
||||
return this.settingsStore.isEnterpriseFeatureEnabled(
|
||||
EnterpriseEditionFeature.WorkflowHistory,
|
||||
);
|
||||
},
|
||||
workflowHistoryRoute(): { name: string; params: { workflowId: string } } {
|
||||
return {
|
||||
name: VIEWS.WORKFLOW_HISTORY,
|
||||
params: {
|
||||
workflowId: this.currentWorkflowId,
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async onSaveButtonClick() {
|
||||
@@ -389,7 +409,7 @@ export default defineComponent({
|
||||
|
||||
const saved = await this.saveCurrentWorkflow({ tags });
|
||||
this.$telemetry.track('User edited workflow tags', {
|
||||
workflow_id: this.currentWorkflowId as string,
|
||||
workflow_id: this.currentWorkflowId,
|
||||
new_tag_count: tags.length,
|
||||
});
|
||||
|
||||
@@ -690,4 +710,9 @@ $--header-spacing: 20px;
|
||||
.disabledShareButton {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.workflowHistoryButton {
|
||||
margin-left: var(--spacing-l);
|
||||
color: var(--color-text-dark);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user