Use is_authenticated
This commit is contained in:
parent
e4d6f1f117
commit
39b5fa50d8
|
@ -1,10 +1,9 @@
|
||||||
from app.onboarding.base import onboarding_bp
|
from app.onboarding.base import onboarding_bp
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
from flask_login import current_user
|
|
||||||
|
|
||||||
|
|
||||||
@onboarding_bp.route("/", methods=["GET"])
|
@onboarding_bp.route("/", methods=["GET"])
|
||||||
def index():
|
def index():
|
||||||
return render_template(
|
return render_template(
|
||||||
"onboarding/index.html", is_user_logged_in=current_user is not None
|
"onboarding/index.html"
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-8 text-center">
|
<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>
|
<h2 class="text-black-50" style="font-size:2rem">Performing the extension setup...</h2>
|
||||||
{% else %}
|
{% 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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if is_user_logged_in %}
|
{% if current_user != None and current_user.is_authenticated %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
const data = { tag: "PERFORM_EXTENSION_SETUP" };
|
const data = { tag: "PERFORM_EXTENSION_SETUP" };
|
||||||
|
|
Loading…
Reference in a new issue