mirror of
https://github.com/simple-login/app.git
synced 2024-09-29 21:21:29 +02:00
Make sure to show intro to user only once
This commit is contained in:
parent
dee6d4959d
commit
3d10fab3a6
@ -346,15 +346,12 @@
|
|||||||
<script>
|
<script>
|
||||||
var clipboard = new ClipboardJS('.clipboard');
|
var clipboard = new ClipboardJS('.clipboard');
|
||||||
|
|
||||||
var introShown = store.get("introShown");
|
{% if show_intro %}
|
||||||
if ("yes" !== introShown) {
|
|
||||||
// only show intro when screen is big enough to show "developer" tab
|
// only show intro when screen is big enough to show "developer" tab
|
||||||
if (window.innerWidth >= 1024) {
|
if (window.innerWidth >= 1024) {
|
||||||
introJs().start();
|
introJs().start();
|
||||||
store.set("introShown", "yes")
|
|
||||||
}
|
}
|
||||||
}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
$(".delete-email").on("click", function (e) {
|
$(".delete-email").on("click", function (e) {
|
||||||
let alias = $(this).parent().find(".alias").val();
|
let alias = $(this).parent().find(".alias").val();
|
||||||
|
@ -175,6 +175,15 @@ def index():
|
|||||||
|
|
||||||
mailboxes = current_user.mailboxes()
|
mailboxes = current_user.mailboxes()
|
||||||
|
|
||||||
|
show_intro = False
|
||||||
|
if not current_user.intro_shown:
|
||||||
|
LOG.d("Show intro to %s", current_user)
|
||||||
|
show_intro = True
|
||||||
|
|
||||||
|
# to make sure not showing intro to user again
|
||||||
|
current_user.intro_shown = True
|
||||||
|
db.session.commit()
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"dashboard/index.html",
|
"dashboard/index.html",
|
||||||
client_users=client_users,
|
client_users=client_users,
|
||||||
@ -183,6 +192,7 @@ def index():
|
|||||||
query=query,
|
query=query,
|
||||||
AliasGeneratorEnum=AliasGeneratorEnum,
|
AliasGeneratorEnum=AliasGeneratorEnum,
|
||||||
mailboxes=mailboxes,
|
mailboxes=mailboxes,
|
||||||
|
show_intro=show_intro,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user