From 7c86d2996c277d856bc28e81ff6ec806229c8e6a Mon Sep 17 00:00:00 2001 From: eliasdoehne Date: Fri, 25 May 2018 23:49:25 +0200 Subject: [PATCH] Updated app version; Show correct version ID in html template --- src/stellarisdashboard/dash_server.py | 9 +++++---- src/stellarisdashboard/templates/layout.html | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/stellarisdashboard/dash_server.py b/src/stellarisdashboard/dash_server.py index 821f559..d840a0c 100644 --- a/src/stellarisdashboard/dash_server.py +++ b/src/stellarisdashboard/dash_server.py @@ -22,19 +22,20 @@ timeline_app.css.config.serve_locally = True timeline_app.scripts.config.serve_locally = True +VERSION_ID = "v0.1.3" @flask_app.route("/") @flask_app.route("/checkversion//") def index_page(version=None): show_old_version_notice = False if version is not None: - show_old_version_notice = version != "v0.1.0" + show_old_version_notice = version != VERSION_ID games = [dict(country=country, game_name=g) for g, country in models.get_available_games_dict().items()] return render_template( "index.html", games=games, show_old_version_notice=show_old_version_notice, - version=version, + version=VERSION_ID, ) @@ -45,7 +46,7 @@ def index_page(version=None): def history_page(game_name=None, version=None): show_old_version_notice = False if version is not None: - show_old_version_notice = version != "v0.1.0" + show_old_version_notice = version != VERSION_ID if game_name is None: game_name = "" @@ -67,7 +68,7 @@ def history_page(game_name=None, version=None): wars=wars, leaders=leaders, show_old_version_notice=show_old_version_notice, - version=version, + version=VERSION_ID, ) diff --git a/src/stellarisdashboard/templates/layout.html b/src/stellarisdashboard/templates/layout.html index e93d639..082df2d 100644 --- a/src/stellarisdashboard/templates/layout.html +++ b/src/stellarisdashboard/templates/layout.html @@ -8,11 +8,12 @@ {%if show_old_version_notice%}

You may be using an old version of the stellaris dashboard program. - You can get the current version on Github. - You are on version {{ version }}. + You can get the current version on Github. + You are on version {{ version }}.

{%endif%} {% block body %}{% endblock %} Go to Game Selection - \ No newline at end of file + +