Skip to content

Commit

Permalink
Show if tor support is enabled in /about
Browse files Browse the repository at this point in the history
  • Loading branch information
kmille committed Oct 22, 2024
1 parent f0ab6a3 commit 479df63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion freetar/backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import waitress
import os
from flask import Flask, render_template, request
from flask_minify import Minify

Expand All @@ -9,6 +10,8 @@
app = Flask(__name__)
Minify(app=app, html=True, js=True, cssless=True)

TOR_ENABLED = "FREETAR_ENABLE_TOR" in os.environ


@app.context_processor
def export_variables():
Expand Down Expand Up @@ -60,7 +63,8 @@ def show_favs():

@app.route("/about")
def show_about():
return render_template('about.html')
return render_template('about.html',
tor_enabled=TOR_ENABLED)


@app.errorhandler(403)
Expand Down
1 change: 1 addition & 0 deletions freetar/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<div>
<strong>freetar</strong> is an open source alternative front-end to ultimate-guitar.com<br>
Running version v{{ version }}<br>
Tor enabled: {{ tor_enabled }}<br>
License: <a href="https://github.com/kmille/freetar/blob/main/LICENSE">GPL 3.0</a><br>
Source Code: <a href="https://github.com/kmille/freetar">https://github.com/kmille/freetar</a><br>
Any problems? Wishes? Create an <a href="https://github.com/kmille/freetar/issues/new">issue</a>.<br>
Expand Down

0 comments on commit 479df63

Please sign in to comment.