refactor(editor): Improve linting for component and prop names (no-changelog) (#8169)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-12-28 09:49:58 +01:00
committed by GitHub
parent 639afcd7a5
commit 68cff4c59e
304 changed files with 3428 additions and 3516 deletions

View File

@@ -1,5 +1,5 @@
<template>
<TemplatesView :goBackEnabled="true">
<TemplatesView :go-back-enabled="true">
<template #header>
<div v-if="!notFoundError" :class="$style.wrapper">
<div :class="$style.title">
@@ -12,7 +12,7 @@
<n8n-loading :loading="!collection || !collection.name" :rows="2" variant="h1" />
</div>
</div>
<div :class="$style.notFound" v-else>
<div v-else :class="$style.notFound">
<n8n-text color="text-base">{{
$locale.baseText('templates.collectionsNotFound')
}}</n8n-text>
@@ -21,7 +21,7 @@
<template v-if="!notFoundError" #content>
<div :class="$style.wrapper">
<div :class="$style.mainContent">
<div :class="$style.markdown" v-if="loading || (collection && collection.description)">
<div v-if="loading || (collection && collection.description)" :class="$style.markdown">
<n8n-markdown
:content="collection && collection.description"
:images="collection && collection.image"
@@ -74,12 +74,12 @@ import { useExternalHooks } from '@/composables/useExternalHooks';
export default defineComponent({
name: 'TemplatesCollectionView',
mixins: [workflowHelpers],
components: {
TemplateDetails,
TemplateList,
TemplatesView,
},
mixins: [workflowHelpers],
setup() {
const externalHooks = useExternalHooks();
@@ -112,6 +112,30 @@ export default defineComponent({
notFoundError: false,
};
},
watch: {
collection(collection: ITemplatesCollection) {
if (collection) {
setPageTitle(`n8n - Template collection: ${collection.name}`);
} else {
setPageTitle('n8n - Templates');
}
},
},
async mounted() {
this.scrollToTop();
if (this.collection && this.collection.full) {
this.loading = false;
return;
}
try {
await this.templatesStore.fetchCollectionById(this.collectionId);
} catch (e) {
this.notFoundError = true;
}
this.loading = false;
},
methods: {
scrollToTop() {
setTimeout(() => {
@@ -157,30 +181,6 @@ export default defineComponent({
}
},
},
watch: {
collection(collection: ITemplatesCollection) {
if (collection) {
setPageTitle(`n8n - Template collection: ${collection.name}`);
} else {
setPageTitle('n8n - Templates');
}
},
},
async mounted() {
this.scrollToTop();
if (this.collection && this.collection.full) {
this.loading = false;
return;
}
try {
await this.templatesStore.fetchCollectionById(this.collectionId);
} catch (e) {
this.notFoundError = true;
}
this.loading = false;
},
});
</script>