mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
implement key features
This commit is contained in:
parent
003fbca951
commit
8b1af08c40
|
@ -552,6 +552,7 @@ export interface IVersion {
|
||||||
name: string;
|
name: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
icon: string;
|
icon: string;
|
||||||
|
defaults: INodeParameters;
|
||||||
iconData: {
|
iconData: {
|
||||||
type: string;
|
type: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<NodeIcon class="node-icon" :nodeType="nodeType" size="60" :style="nodeIconStyle" :shrink="true"/>
|
<NodeIcon class="node-icon" :nodeType="nodeType" size="60" :shrink="true" :disabled="this.data.disabled"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="node-description">
|
<div class="node-description">
|
||||||
<div class="node-name" :title="data.name">
|
<div class="node-name" :title="data.name">
|
||||||
|
@ -77,11 +77,6 @@ export default mixins(externalHooks, nodeBase, nodeHelpers, workflowHelpers).ext
|
||||||
isExecuting (): boolean {
|
isExecuting (): boolean {
|
||||||
return this.$store.getters.executingNode === this.data.name;
|
return this.$store.getters.executingNode === this.data.name;
|
||||||
},
|
},
|
||||||
nodeIconStyle (): object {
|
|
||||||
return {
|
|
||||||
color: this.data.disabled ? '#ccc' : this.data.color,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
nodeType (): INodeTypeDescription | null {
|
nodeType (): INodeTypeDescription | null {
|
||||||
return this.$store.getters.nodeType(this.data.type);
|
return this.$store.getters.nodeType(this.data.type);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template functional>
|
<template functional>
|
||||||
<div :class="{[$style['node-item']]: true, [$style.bordered]: props.bordered}">
|
<div :class="{[$style['node-item']]: true, [$style.bordered]: props.bordered}">
|
||||||
<NodeIcon :class="$style['node-icon']" :nodeType="props.nodeType" :style="{color: props.nodeType.defaults.color}" />
|
<NodeIcon :class="$style['node-icon']" :nodeType="props.nodeType" />
|
||||||
<div>
|
<div>
|
||||||
<div :class="$style.details">
|
<div :class="$style.details">
|
||||||
<span :class="$style.name">{{props.nodeType.displayName}}</span>
|
<span :class="$style.name">{{props.nodeType.displayName}}</span>
|
||||||
|
|
|
@ -26,16 +26,19 @@ export default Vue.extend({
|
||||||
'nodeType',
|
'nodeType',
|
||||||
'size',
|
'size',
|
||||||
'shrink',
|
'shrink',
|
||||||
|
'disabled',
|
||||||
],
|
],
|
||||||
computed: {
|
computed: {
|
||||||
iconStyleData (): object {
|
iconStyleData (): object {
|
||||||
|
const color = this.disabled ? '#ccc' : this.nodeType.defaults && this.nodeType.defaults.color;
|
||||||
if (!this.size) {
|
if (!this.size) {
|
||||||
return {};
|
return {color};
|
||||||
}
|
}
|
||||||
|
|
||||||
const size = parseInt(this.size, 10);
|
const size = parseInt(this.size, 10);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
color,
|
||||||
width: size + 'px',
|
width: size + 'px',
|
||||||
height: size + 'px',
|
height: size + 'px',
|
||||||
'font-size': Math.floor(parseInt(this.size, 10) * 0.6) + 'px',
|
'font-size': Math.floor(parseInt(this.size, 10) * 0.6) + 'px',
|
||||||
|
@ -98,6 +101,10 @@ export default Vue.extend({
|
||||||
&.full .icon {
|
&.full .icon {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.shrink .icon {
|
&.shrink .icon {
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
<div :class="$style.name">
|
<div :class="$style.name">
|
||||||
Version {{version.name}}
|
Version {{version.name}}
|
||||||
</div>
|
</div>
|
||||||
|
<el-tooltip class="item" effect="light" content=" " placement="top" v-if="version.hasSecurityIssue">
|
||||||
|
<div slot="content">This version has a security issue.<br/>It is listed here for completeness.</div>
|
||||||
|
<font-awesome-icon :class="$style['security-flag']" icon="exclamation-triangle"></font-awesome-icon>
|
||||||
|
</el-tooltip>
|
||||||
<el-tag type="danger" v-if="version.hasSecurityFix" size="small" :class="$style['security-update']">Security Update</el-tag>
|
<el-tag type="danger" v-if="version.hasSecurityFix" size="small" :class="$style['security-update']">Security Update</el-tag>
|
||||||
<el-tag v-if="version.hasBreakingChange" size="small" :class="$style['breaking-change']">Breaking Change</el-tag>
|
<el-tag v-if="version.hasBreakingChange" size="small" :class="$style['breaking-change']">Breaking Change</el-tag>
|
||||||
<div :class="$style.released">
|
<div :class="$style.released">
|
||||||
|
@ -14,6 +18,7 @@
|
||||||
<div v-html="version.description" :class="$style.description"></div>
|
<div v-html="version.description" :class="$style.description"></div>
|
||||||
<div :class="$style.nodes" v-if="version.nodes && version.nodes.length > 0">
|
<div :class="$style.nodes" v-if="version.nodes && version.nodes.length > 0">
|
||||||
<NodeIcon
|
<NodeIcon
|
||||||
|
:class="$style['node-icon']"
|
||||||
v-for="node in version.nodes"
|
v-for="node in version.nodes"
|
||||||
:key="node.name"
|
:key="node.name"
|
||||||
:nodeType="node"
|
:nodeType="node"
|
||||||
|
@ -95,6 +100,10 @@ export default Vue.extend({
|
||||||
max-height: 18px;
|
max-height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.node-icon {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.breaking-change {
|
.breaking-change {
|
||||||
background-color: rgba(255, 229, 100, 0.3);
|
background-color: rgba(255, 229, 100, 0.3);
|
||||||
color: #6B5900;
|
color: #6B5900;
|
||||||
|
@ -106,4 +115,8 @@ export default Vue.extend({
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.security-flag {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<section :class="$style['header-content']">
|
<section :class="$style['header-content']">
|
||||||
<p>You’re on {{ currentVersion.name }}, which was released <strong>{{currentReleaseDate}}</strong> and {{ nextVersions.length }} version{{nextVersions.length > 1 ? 's' : ''}} behind the latest and greatest n8n</p>
|
<p>You’re on {{ currentVersion.name }}, which was released <strong>{{currentReleaseDate}}</strong> and is {{ nextVersions.length }} version{{nextVersions.length > 1 ? 's' : ''}} behind the latest and greatest n8n</p>
|
||||||
|
|
||||||
<a :class="$style.update" :href="UPDATE_INFO_URL" v-if="UPDATE_INFO_URL" target="_blank">
|
<a :class="$style.update" :href="UPDATE_INFO_URL" v-if="UPDATE_INFO_URL" target="_blank">
|
||||||
<font-awesome-icon icon="info-circle"></font-awesome-icon>
|
<font-awesome-icon icon="info-circle"></font-awesome-icon>
|
||||||
|
|
Loading…
Reference in a new issue