Use is_authenticated

This commit is contained in:
Carlos Quintana 2022-05-20 08:48:01 +02:00
parent e4d6f1f117
commit 39b5fa50d8
No known key found for this signature in database
GPG key ID: 15E73DCC410679F8
2 changed files with 3 additions and 4 deletions

View file

@ -1,10 +1,9 @@
from app.onboarding.base import onboarding_bp
from flask import render_template
from flask_login import current_user
@onboarding_bp.route("/", methods=["GET"])
def index():
return render_template(
"onboarding/index.html", is_user_logged_in=current_user is not None
"onboarding/index.html"
)

View file

@ -19,7 +19,7 @@
</div>
<div class="mt-8 text-center">
{% if is_user_logged_in %}
{% if current_user != None and current_user.is_authenticated %}
<h2 class="text-black-50" style="font-size:2rem">Performing the extension setup...</h2>
{% else %}
<a class="mx-6 p-4 text-decoration-none" style="background:black;color:white;" href="{{ url_for('auth.register', next=url_for('onboarding.setup_done')) }}">Create a new account</a>
@ -28,7 +28,7 @@
</div>
</div>
{% if is_user_logged_in %}
{% if current_user != None and current_user.is_authenticated %}
<script type="text/javascript">
setInterval(function() {
const data = { tag: "PERFORM_EXTENSION_SETUP" };