Add app version display to login page and profile About card
Version is set via APP_VERSION in .env, defaulting to 1.0.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
# Application version shown on login and profile pages
|
||||||
|
APP_VERSION=1.0.0
|
||||||
|
|
||||||
# Secret key for signing session cookies — use a long random string in production
|
# Secret key for signing session cookies — use a long random string in production
|
||||||
SECRET_KEY=change-me-to-a-long-random-string
|
SECRET_KEY=change-me-to-a-long-random-string
|
||||||
|
|
||||||
|
|||||||
@@ -29,5 +29,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<p style="text-align:center; color:var(--text-muted); font-size:0.75rem; margin-top:1.5rem; opacity:0.6;">v{{ app_version }}</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -76,6 +76,14 @@
|
|||||||
{% include "partials/crop_modal.html" %}
|
{% include "partials/crop_modal.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card" style="margin-top:1.5rem;">
|
||||||
|
<h2 style="font-size:0.95rem; color:var(--text-muted); margin-bottom:0.75rem;">About</h2>
|
||||||
|
<div style="display:flex; justify-content:space-between; align-items:center;">
|
||||||
|
<span style="font-weight:500;">Skins & Pins</span>
|
||||||
|
<span style="color:var(--text-muted); font-size:0.85rem; font-family:monospace;">v{{ app_version }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="margin-top: 1.5rem;">
|
<div style="margin-top: 1.5rem;">
|
||||||
<a href="/logout" class="btn btn-ghost">Log out</a>
|
<a href="/logout" class="btn btn-ghost">Log out</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ from fastapi.templating import Jinja2Templates
|
|||||||
|
|
||||||
templates = Jinja2Templates(directory="app/templates")
|
templates = Jinja2Templates(directory="app/templates")
|
||||||
templates.env.globals["admin_email"] = os.getenv("ADMIN_EMAIL", "")
|
templates.env.globals["admin_email"] = os.getenv("ADMIN_EMAIL", "")
|
||||||
|
templates.env.globals["app_version"] = os.getenv("APP_VERSION", "1.0.0")
|
||||||
|
|||||||
Reference in New Issue
Block a user