mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat: Add Creator hub link to Templates page (#7721)
Replace the `New Blank Workflow` button with link to the new Creator Hub in the Templates page
This commit is contained in:
committed by
GitHub
parent
c9f6ea141b
commit
4dbae0e2e9
@@ -1,9 +1,11 @@
|
||||
<template>
|
||||
<button
|
||||
<component
|
||||
:is="element"
|
||||
:class="classes"
|
||||
:disabled="isDisabled"
|
||||
:aria-disabled="ariaDisabled"
|
||||
:aria-busy="ariaBusy"
|
||||
:href="href"
|
||||
aria-live="polite"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
@@ -14,13 +16,13 @@
|
||||
<span v-if="label || $slots.default">
|
||||
<slot>{{ label }}</slot>
|
||||
</span>
|
||||
</button>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import N8nIcon from '../N8nIcon';
|
||||
import N8nSpinner from '../N8nSpinner';
|
||||
import { useCssModule, computed, useAttrs } from 'vue';
|
||||
import { useCssModule, computed, useAttrs, watchEffect } from 'vue';
|
||||
|
||||
const $style = useCssModule();
|
||||
const $attrs = useAttrs();
|
||||
@@ -72,6 +74,21 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
element: {
|
||||
type: String,
|
||||
default: 'button',
|
||||
validator: (value: string) => ['button', 'a'].includes(value),
|
||||
},
|
||||
href: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.element === 'a' && !props.href) {
|
||||
console.error('n8n-button:href is required for link buttons');
|
||||
}
|
||||
});
|
||||
|
||||
const ariaBusy = computed(() => (props.loading ? 'true' : undefined));
|
||||
|
||||
Reference in New Issue
Block a user