fix(editor): Fix slots rendering of NodeCreator's NoResults component (#4721)

This commit is contained in:
OlegIvaniv 2022-11-25 12:45:36 +01:00 committed by GitHub
parent 55c201eb21
commit d8c2dffc37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,47 +43,40 @@
@selected="selected" @selected="selected"
/> />
</div> </div>
<no-results v-else :showRequest="filteredAllNodeTypes.length === 0" :show-icon="filteredAllNodeTypes.length === 0"> <no-results
v-else
:showRequest="filteredAllNodeTypes.length === 0"
:show-icon="filteredAllNodeTypes.length === 0"
>
<!-- There are results in other sub-categories/tabs --> <!-- There are results in other sub-categories/tabs -->
<template #title> <template v-if="filteredAllNodeTypes.length > 0" #title>
<p v-if="filteredAllNodeTypes.length === 0" v-text="$locale.baseText('nodeCreator.noResults.weDidntMakeThatYet')" />
<p v-else v-html="$locale.baseText('nodeCreator.noResults.clickToSeeResults')" />
</template>
<!-- Regular Search -->
<template v-if="filteredAllNodeTypes.length === 0" #action>
{{ $locale.baseText('nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe') }}
<n8n-link @click="selectHttpRequest" v-if="[REGULAR_NODE_FILTER, ALL_NODE_FILTER].includes(selectedType)">
{{ $locale.baseText('nodeCreator.noResults.httpRequest') }}
</n8n-link>
<template v-if="selectedType === ALL_NODE_FILTER">
{{ $locale.baseText('nodeCreator.noResults.or') }}
</template>
<no-results v-else :showRequest="filteredAllNodeTypes.length === 0" :show-icon="filteredAllNodeTypes.length === 0">
<!-- There are results in other sub-categories/tabs -->
<template #title>
<p v-html="$locale.baseText('nodeCreator.noResults.clickToSeeResults')" /> <p v-html="$locale.baseText('nodeCreator.noResults.clickToSeeResults')" />
<p v-if="filteredAllNodeTypes.length === 0" v-text="$locale.baseText('nodeCreator.noResults.weDidntMakeThatYet')" />
<p v-else v-html="$locale.baseText('nodeCreator.noResults.clickToSeeResults')" />
</template> </template>
<!-- Regular Search --> <!-- Regular Search -->
<template v-else #title>
<p v-text="$locale.baseText('nodeCreator.noResults.weDidntMakeThatYet')" />
</template>
<template v-if="filteredAllNodeTypes.length === 0" #action> <template v-if="filteredAllNodeTypes.length === 0" #action>
{{ $locale.baseText('nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe') }} {{ $locale.baseText('nodeCreator.noResults.dontWorryYouCanProbablyDoItWithThe') }}
<n8n-link @click="selectHttpRequest" v-if="[REGULAR_NODE_FILTER, ALL_NODE_FILTER].includes(selectedType)"> <n8n-link
@click="selectHttpRequest"
v-if="[REGULAR_NODE_FILTER, ALL_NODE_FILTER].includes(nodeCreatorStore.selectedType)"
>
{{ $locale.baseText('nodeCreator.noResults.httpRequest') }} {{ $locale.baseText('nodeCreator.noResults.httpRequest') }}
</n8n-link> </n8n-link>
<template v-if="selectedType === ALL_NODE_FILTER"> <template v-if="nodeCreatorStore.selectedType === ALL_NODE_FILTER">
{{ $locale.baseText('nodeCreator.noResults.or') }} {{ $locale.baseText('nodeCreator.noResults.or') }}
</template> </template>
<n8n-link @click="selectWebhook" v-if="[TRIGGER_NODE_FILTER, ALL_NODE_FILTER].includes(selectedType)"> <n8n-link
@click="selectWebhook"
v-if="[TRIGGER_NODE_FILTER, ALL_NODE_FILTER].includes(nodeCreatorStore.selectedType)"
>
{{ $locale.baseText('nodeCreator.noResults.webhook') }} {{ $locale.baseText('nodeCreator.noResults.webhook') }}
</n8n-link>
{{ $locale.baseText('nodeCreator.noResults.node') }} {{ $locale.baseText('nodeCreator.noResults.node') }}
</template> </n8n-link>
</no-results>
</template> </template>
</no-results> </no-results>
</div> </div>