mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Fix pin data button disappearing after reload (#11198)
This commit is contained in:
committed by
GitHub
parent
fcf8629c6e
commit
3b2f63e248
@@ -255,6 +255,22 @@ export default defineComponent({
|
||||
}
|
||||
return this.nodeTypesStore.isTriggerNode(this.node.type);
|
||||
},
|
||||
showPinButton(): boolean {
|
||||
return Boolean(
|
||||
(this.canPinData || this.pinnedData.hasData.value || !!this.binaryData?.length) &&
|
||||
(this.rawInputData.length || this.pinnedData.hasData.value) &&
|
||||
!this.editMode.enabled,
|
||||
);
|
||||
},
|
||||
pinButtonDisabled(): boolean {
|
||||
return (
|
||||
this.pinnedData.hasData.value ||
|
||||
!this.rawInputData.length ||
|
||||
!!this.binaryData?.length ||
|
||||
this.isReadOnlyRoute ||
|
||||
this.readOnlyEnv
|
||||
);
|
||||
},
|
||||
canPinData(): boolean {
|
||||
if (this.node === null) {
|
||||
return false;
|
||||
@@ -1199,6 +1215,7 @@ export default defineComponent({
|
||||
size="small"
|
||||
underline
|
||||
bold
|
||||
data-test-id="ndv-unpin-data"
|
||||
@click.stop="onTogglePinData({ source: 'banner-link' })"
|
||||
>
|
||||
{{ $locale.baseText('runData.pindata.unpin') }}
|
||||
@@ -1269,13 +1286,8 @@ export default defineComponent({
|
||||
/>
|
||||
|
||||
<RunDataPinButton
|
||||
v-if="(canPinData || !!binaryData?.length) && rawInputData.length && !editMode.enabled"
|
||||
:disabled="
|
||||
(!rawInputData.length && !pinnedData.hasData.value) ||
|
||||
isReadOnlyRoute ||
|
||||
readOnlyEnv ||
|
||||
!!binaryData?.length
|
||||
"
|
||||
v-if="showPinButton"
|
||||
:disabled="pinButtonDisabled"
|
||||
:tooltip-contents-visibility="{
|
||||
binaryDataTooltipContent: !!binaryData?.length,
|
||||
pinDataDiscoveryTooltipContent:
|
||||
|
||||
Reference in New Issue
Block a user