diff --git a/main.py b/main.py index a0b3514..850e9ad 100644 --- a/main.py +++ b/main.py @@ -71,15 +71,6 @@ def index(): if not os.path.exists(".git"): return render_template("index.html", account=account, plugins=plugins) - info = gitinfo.get_git_info() - if info is None: - return render_template("index.html", account=account, plugins=plugins) - branch = info['refs'] - commit = info['commit'] - if commit != latestVersion(branch): - logger.info("New version available") - plugins += render_template('components/dashboard-alert.html', name='Update', output='A new version of FireWallet is available') - alerts = get_alerts(account) for alert in alerts: output_html = alert['output'] @@ -1921,6 +1912,20 @@ def get_alerts(account:str) -> list: alerts = [] + info = gitinfo.get_git_info() + if info is not None: + branch = info['refs'] + commit = info['commit'] + if commit != latestVersion(branch): + logger.info("New version available") + alerts.append({ + "name": "Update Available", + "output": f"A new version of FireWallet is available. Changelog." + }) + + + + # Check if the node is connected if not account_module.hsdConnected(): alerts.append({