mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-11 13:15:28 +03:00
N8N-2677 Fixed Code Style inside Markdown, Added Redirection for N8N-Tags and Node Icon
This commit is contained in:
parent
e3ba876056
commit
166153f139
@ -175,7 +175,6 @@ export default {
|
||||
|
||||
ul, ol {
|
||||
margin-bottom: var(--spacing-s);
|
||||
padding: var(--spacing-4xs);
|
||||
padding-left: var(--spacing-m);
|
||||
font-size: var(--font-size-m);
|
||||
line-height: var(--font-line-height-xloose);
|
||||
@ -190,9 +189,11 @@ export default {
|
||||
line-height: var(--font-line-height-xloose);
|
||||
}
|
||||
|
||||
code {
|
||||
margin: var(--spacing-2xl) 0 var(--spacing-l);
|
||||
li > code,
|
||||
p > code {
|
||||
display: block;
|
||||
padding: var(--spacing-s);
|
||||
color: #555555;
|
||||
background-color: #f2f4f8;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template functional>
|
||||
<div :class="$style.tag" v-text="props.tag" />
|
||||
<div :class="$style.tag" v-text="props.tag" @click="(e) => listeners.click && listeners.click(e)" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@ -16,10 +16,11 @@ export default {
|
||||
<style lang="scss" module>
|
||||
.tag {
|
||||
width: fit-content;
|
||||
margin: 0 var(--spacing-4xs) var(--spacing-4xs) 0;
|
||||
margin: 0 var(--spacing-4xs) var(--spacing-4xs) 0;
|
||||
padding: var(--spacing-4xs);
|
||||
background-color: #dbdfe7;
|
||||
border-radius: var(--border-radius-base);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template functional>
|
||||
<div :class="$style.tags">
|
||||
<n8n-tag v-for="(tag, key) in props.tags" :key="'tag-' + key" :tag="tag.name" />
|
||||
<n8n-tag v-for="(tag, key) in props.tags" :key="'tag-' + key" :tag="tag.name" @click="props.clickButton(tag)"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -16,6 +16,9 @@ export default {
|
||||
tags: {
|
||||
type: Array,
|
||||
},
|
||||
clickButton: {
|
||||
type: Function,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -4,6 +4,7 @@
|
||||
:style="iconStyleData"
|
||||
@mouseover="showTooltip = true"
|
||||
@mouseleave="showTooltip = false"
|
||||
@click="clickButton(nodeType)"
|
||||
>
|
||||
<div :class="$style.tooltip">
|
||||
<n8n-tooltip placement="top" :manual="true" :value="showTooltip">
|
||||
@ -52,6 +53,9 @@ export default Vue.extend({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
clickButton: {
|
||||
type: Function,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
@ -10,6 +10,7 @@
|
||||
:key="node.name"
|
||||
:nodeType="node"
|
||||
:title="node.name"
|
||||
:clickButton="redirectToSearchPage"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -17,7 +18,7 @@
|
||||
|
||||
<template-block v-if="!loading" :title="$locale.baseText('template.details.categories')">
|
||||
<template v-slot:content>
|
||||
<n8n-tags :tags="template.categories" />
|
||||
<n8n-tags :tags="template.categories" :clickButton="redirectToCategory"/>
|
||||
</template>
|
||||
</template-block>
|
||||
|
||||
@ -50,6 +51,15 @@ import TemplateBlock from './TemplateBlock/TemplateBlock.vue';
|
||||
import NodeIcon from './NodeIcon/NodeIcon.vue';
|
||||
import { abbreviateNumber } from '../helpers';
|
||||
|
||||
interface ITag {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface INode {
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
loading: {
|
||||
@ -65,6 +75,12 @@ export default Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
abbreviateNumber,
|
||||
redirectToCategory(tag: ITag) {
|
||||
this.$router.push(`/templates?categoryId=${tag.id}`);
|
||||
},
|
||||
redirectToSearchPage(node: INode) {
|
||||
this.$router.push(`/templates?search=${node.displayName}`);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user