From f90f45af9911ce07b129dbb208656f262c059bca Mon Sep 17 00:00:00 2001 From: yylyyl Date: Thu, 9 Nov 2023 15:52:44 -0500 Subject: [PATCH] update for demo site --- web/src/routes/System/updateStore.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/src/routes/System/updateStore.js b/web/src/routes/System/updateStore.js index 999b13f..69d965d 100644 --- a/web/src/routes/System/updateStore.js +++ b/web/src/routes/System/updateStore.js @@ -89,6 +89,21 @@ const checkNow = ab => { } updateActions.setChecking(); + if (process.env.REACT_APP_CONTAINERUP_DEMO) { + return new Promise((resolve) => { + setTimeout(() => { + resolve({ + demo: { + version: process.env.REACT_APP_CONTAINERUP_VERSION + '-new', + image: 'quay.io/containerup/demo:latest', + changelog: 'This is for demo only!\nNo real update will be performed!', + compatible_version: 'v0.1.0' + } + }); + }, 1000); + }); + } + return dataModel.systemCheckUpdate(ab); }; @@ -118,6 +133,9 @@ export const getChannel = version => { if (forceChannel) { return forceChannel; } + if (process.env.REACT_APP_CONTAINERUP_DEMO) { + return 'demo'; + } if (version === 'dev') { return 'dev'; }