amosnbn commited on
Commit
8adbc36
·
1 Parent(s): 92d5872
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -446,7 +446,9 @@ def index():
446
 
447
  @app.get("/about")
448
  def about_page():
449
- return render_template("about.html")
 
 
450
 
451
  @app.get("/history")
452
  def api_history():
@@ -483,4 +485,4 @@ def api_translate():
483
  return jsonify({"ok": False, "error": f"{type(e).__name__}: {e}"}), 500
484
 
485
  if __name__ == "__main__":
486
- app.run(host="0.0.0.0", port=int(os.getenv("PORT", "7860")), debug=False)
 
446
 
447
  @app.get("/about")
448
  def about_page():
449
+ # Kirim status login ke template about
450
+ logged_in = bool(session.get("uid"))
451
+ return render_template("about.html", logged_in=logged_in)
452
 
453
  @app.get("/history")
454
  def api_history():
 
485
  return jsonify({"ok": False, "error": f"{type(e).__name__}: {e}"}), 500
486
 
487
  if __name__ == "__main__":
488
+ app.run(host="0.0.0.0", port=int(os.getenv("PORT", "7860")), debug=False)