diff options
-rw-r--r-- | newspipe/templates/about.html | 1 | ||||
-rw-r--r-- | newspipe/templates/about_more.html | 2 | ||||
-rw-r--r-- | newspipe/web/__init__.py | 11 | ||||
-rw-r--r-- | newspipe/web/views/views.py | 4 |
4 files changed, 7 insertions, 11 deletions
diff --git a/newspipe/templates/about.html b/newspipe/templates/about.html index 45703ea0..973c086e 100644 --- a/newspipe/templates/about.html +++ b/newspipe/templates/about.html @@ -12,6 +12,7 @@ <p>{{ _('Found a bug? Report it <a href="https://todo.sr.ht/~cedric/newspipe">here</a>.') }} {{ _('A documentation is available <a href="https://man.sr.ht/~cedric/newspipe">here</a>.') }}</p> <p><a href="{{ url_for('about_more') }}">{{ _('More information') }}</a> {{ _('about this instance.') }}</p> + <p><a href="{{ git_url }}">This fork's source</a></p> </div> </div> <br /> diff --git a/newspipe/templates/about_more.html b/newspipe/templates/about_more.html index 0df05852..6f01681f 100644 --- a/newspipe/templates/about_more.html +++ b/newspipe/templates/about_more.html @@ -5,7 +5,7 @@ <div class="col"> <h2>{{ _('Information about this instance') }}</h2> <ul class="list-group"> - <li class="list-group-item">{{ _('Newspipe version') }}: <em><a href="{{ version_url }}">{{newspipe_version}}</a></em></li> + <li class="list-group-item">{{ _('Newspipe version') }}: <em>{{newspipe_version}}</em></li> <li class="list-group-item">{{ _('Python version') }}: <em>{{python_version}}</em></li> <li class="list-group-item">{{ _('Registration') }}: <em>{{registration}}</em></li> <li class="list-group-item">{{ _('Number of users') }}: <em>{{nb_users}}</em></li> diff --git a/newspipe/web/__init__.py b/newspipe/web/__init__.py index 9cd78b88..cbda2235 100644 --- a/newspipe/web/__init__.py +++ b/newspipe/web/__init__.py @@ -10,11 +10,6 @@ import subprocess BASE_DIR = os.path.abspath(os.path.dirname(__file__)) -__version__ = ( - os.environ.get("PKGVER") - or subprocess.run( - ["git", "-C", BASE_DIR, "describe", "--tags"], stdout=subprocess.PIPE - ) - .stdout.decode() - .strip() -) +# bgstack15 +__version__ = "v9.5.1" +__git_url__ = "https://bgstack15.ddns.net/cgit/newspipe" diff --git a/newspipe/web/views/views.py b/newspipe/web/views/views.py index bb7bff2f..52d4e175 100644 --- a/newspipe/web/views/views.py +++ b/newspipe/web/views/views.py @@ -17,7 +17,7 @@ from newspipe.bootstrap import application from newspipe.bootstrap import talisman from newspipe.controllers import FeedController from newspipe.controllers import UserController -from newspipe.web import __version__ +from newspipe.web import __version__, __git_url__ from newspipe.web.lib.view_utils import etag_match logger = logging.getLogger(__name__) @@ -88,7 +88,7 @@ def popular(): @current_app.route("/about", methods=["GET"]) @etag_match def about(): - return render_template("about.html", contact=application.config["ADMIN_EMAIL"]) + return render_template("about.html", contact=application.config["ADMIN_EMAIL"], git_url=__git_url__) @current_app.route("/about/more", methods=["GET"]) |