mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 03:42:16 +00:00
fix(editor): When cloud users click on "How to update your n8n version" auto-login them before redirecting to the dashboard (no-changelog) (#11467)
This commit is contained in:
@@ -1,27 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
import ModalDrawer from './ModalDrawer.vue';
|
||||
import TimeAgo from './TimeAgo.vue';
|
||||
import VersionCard from './VersionCard.vue';
|
||||
import { VERSIONS_MODAL_KEY } from '../constants';
|
||||
import { useVersionsStore } from '@/stores/versions.store';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import { usePageRedirectionHelper } from '@/composables/usePageRedirectionHelper';
|
||||
|
||||
const versionsStore = useVersionsStore();
|
||||
const pageRedirectionHelper = usePageRedirectionHelper();
|
||||
|
||||
const i18n = useI18n();
|
||||
|
||||
const nextVersions = computed(() => {
|
||||
return versionsStore.nextVersions;
|
||||
});
|
||||
|
||||
const currentVersion = computed(() => {
|
||||
return versionsStore.currentVersion;
|
||||
});
|
||||
|
||||
const infoUrl = computed(() => {
|
||||
return versionsStore.infoUrl;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -38,22 +27,22 @@ const infoUrl = computed(() => {
|
||||
</template>
|
||||
<template #content>
|
||||
<section :class="$style['description']">
|
||||
<p v-if="currentVersion">
|
||||
<p v-if="versionsStore.currentVersion">
|
||||
{{
|
||||
i18n.baseText('updatesPanel.youReOnVersion', {
|
||||
interpolate: { currentVersionName: currentVersion.name },
|
||||
interpolate: { currentVersionName: versionsStore.currentVersion.name },
|
||||
})
|
||||
}}
|
||||
<strong>
|
||||
<TimeAgo :date="currentVersion.createdAt" />
|
||||
<TimeAgo :date="versionsStore.currentVersion.createdAt" />
|
||||
</strong>
|
||||
{{ i18n.baseText('updatesPanel.andIs') }}
|
||||
<strong>
|
||||
{{
|
||||
i18n.baseText('updatesPanel.version', {
|
||||
interpolate: {
|
||||
numberOfVersions: nextVersions.length,
|
||||
howManySuffix: nextVersions.length > 1 ? 's' : '',
|
||||
numberOfVersions: versionsStore.nextVersions.length,
|
||||
howManySuffix: versionsStore.nextVersions.length > 1 ? 's' : '',
|
||||
},
|
||||
})
|
||||
}}
|
||||
@@ -61,15 +50,27 @@ const infoUrl = computed(() => {
|
||||
{{ i18n.baseText('updatesPanel.behindTheLatest') }}
|
||||
</p>
|
||||
|
||||
<n8n-link v-if="infoUrl" :to="infoUrl" :bold="true">
|
||||
<n8n-button
|
||||
v-if="versionsStore.infoUrl"
|
||||
:text="true"
|
||||
type="primary"
|
||||
size="large"
|
||||
:class="$style['link']"
|
||||
:bold="true"
|
||||
@click="pageRedirectionHelper.goToVersions()"
|
||||
>
|
||||
<font-awesome-icon icon="info-circle" class="mr-2xs" />
|
||||
<span>
|
||||
{{ i18n.baseText('updatesPanel.howToUpdateYourN8nVersion') }}
|
||||
</span>
|
||||
</n8n-link>
|
||||
</n8n-button>
|
||||
</section>
|
||||
<section :class="$style.versions">
|
||||
<div v-for="version in nextVersions" :key="version.name" :class="$style['versions-card']">
|
||||
<div
|
||||
v-for="version in versionsStore.nextVersions"
|
||||
:key="version.name"
|
||||
:class="$style['versions-card']"
|
||||
>
|
||||
<VersionCard :version="version" />
|
||||
</div>
|
||||
</section>
|
||||
@@ -102,6 +103,15 @@ const infoUrl = computed(() => {
|
||||
div {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.link {
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: var(--prim-color-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.versions {
|
||||
|
||||
Reference in New Issue
Block a user