Adapt extension setup
This commit is contained in:
parent
a224f4faa6
commit
8ac87217d2
|
@ -1,4 +1,5 @@
|
|||
from .views import (
|
||||
index,
|
||||
final,
|
||||
setup_done,
|
||||
)
|
||||
|
|
23
app/onboarding/views/setup_done.py
Normal file
23
app/onboarding/views/setup_done.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
import arrow
|
||||
from flask import make_response, render_template
|
||||
from flask_login import login_required
|
||||
|
||||
from app.config import URL
|
||||
from app.onboarding.base import onboarding_bp
|
||||
|
||||
|
||||
@onboarding_bp.route("/setup_done", methods=["GET", "POST"])
|
||||
@login_required
|
||||
def setup_done():
|
||||
response = make_response(render_template("onboarding/setup_done.html"))
|
||||
|
||||
response.set_cookie(
|
||||
"setup_done",
|
||||
value="true",
|
||||
expires=arrow.now().shift(days=30).datetime,
|
||||
secure=True if URL.startswith("https") else False,
|
||||
httponly=True,
|
||||
samesite="Lax",
|
||||
)
|
||||
|
||||
return response
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
<!-- Button container -->
|
||||
<div class="mt-8 text-center">
|
||||
<a class="mx-6 p-4 text-decoration-none" style="background:black;color:white;" href="{{ url_for('auth.register', next=url_for('onboarding.final')) }}">Create a new account</a>
|
||||
<a class="mx-6 p-4 text-decoration-none" style="background:white;color:black;border-radius: 2px;border:1px solid black;" href="{{ url_for('auth.login', next=url_for('onboarding.final')) }}">I already have an 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>
|
||||
<a class="mx-6 p-4 text-decoration-none" style="background:white;color:black;border-radius: 2px;border:1px solid black;" href="{{ url_for('auth.login', next=url_for('onboarding.setup_done')) }}">I already have an account</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
29
templates/onboarding/setup_done.html
Normal file
29
templates/onboarding/setup_done.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="flex-fill align-items-center mt-8">
|
||||
<!-- Image container -->
|
||||
<div class="mt-4 mb-4 text-center" style="display:block;">
|
||||
<a class="" href="{{ url_for('dashboard.index') }}">
|
||||
<picture>
|
||||
<source media="(max-width: 650px)" srcset="/static/logo.svg">
|
||||
<img src="/static/logo.svg" style="width: 24rem" alt="logo">
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Text container -->
|
||||
<div class="mt-8 mb-4 text-center">
|
||||
<h2 class="text-black-50" style="font-size:2rem">Performing the extension setup...</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
setTimeout(function() {
|
||||
const data = { tag: "PERFORM_EXTENSION_SETUP" };
|
||||
window.postMessage(data, "/");
|
||||
}, 300);
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in a new issue