mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix bug when no updates
This commit is contained in:
parent
4abb2e7daa
commit
37d11ff71f
|
@ -4,7 +4,7 @@
|
||||||
v-if="drawer"
|
v-if="drawer"
|
||||||
:direction="drawerDirection"
|
:direction="drawerDirection"
|
||||||
:before-close="closeDialog"
|
:before-close="closeDialog"
|
||||||
:visible="dialogVisible"
|
:visible="true"
|
||||||
:size="drawerWidth"
|
:size="drawerWidth"
|
||||||
>
|
>
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
|
|
|
@ -28,6 +28,9 @@ const module: Module<IUiState, IRootState> = {
|
||||||
isPageLoading: true,
|
isPageLoading: true,
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
isVersionsOpen: (state: IUiState) => {
|
||||||
|
return state.modals[VERSIONS_MODAL_KEY].open;
|
||||||
|
},
|
||||||
isModalOpen: (state: IUiState) => {
|
isModalOpen: (state: IUiState) => {
|
||||||
return (name: string) => state.modals[name].open;
|
return (name: string) => state.modals[name].open;
|
||||||
},
|
},
|
||||||
|
|
|
@ -2239,12 +2239,14 @@ export default mixins(
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.$store.dispatch('versions/fetchVersions');
|
await this.$store.dispatch('versions/fetchVersions');
|
||||||
const currentVersion: IVersion | undefined = this.$store.getters['versions/currentVersion'];
|
const currentVersion: IVersion | undefined = this.$store.getters['versions/currentVersion'];
|
||||||
if (currentVersion && currentVersion.hasSecurityIssue) {
|
const nextVersions: IVersion[] = this.$store.getters['versions/nextVersions'];
|
||||||
|
if (currentVersion && currentVersion.hasSecurityIssue && nextVersions.length) {
|
||||||
const fixVersion = currentVersion.securityIssueFixVersion;
|
const fixVersion = currentVersion.securityIssueFixVersion;
|
||||||
let message = `Please update to latest version.`;
|
let message = `Please update to latest version.`;
|
||||||
if (fixVersion) {
|
if (fixVersion) {
|
||||||
message = `Please update to version ${fixVersion} or higher.`;
|
message = `Please update to version ${fixVersion} or higher.`;
|
||||||
}
|
}
|
||||||
|
|
||||||
message = `${message}<br/><a class="primary-color">More info</a>`;
|
message = `${message}<br/><a class="primary-color">More info</a>`;
|
||||||
this.$showWarning('Critical Update', message, {
|
this.$showWarning('Critical Update', message, {
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
|
|
Loading…
Reference in a new issue