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