Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'userId': {{ Session.id }},
'userName': {{ User.name | tojson }},
'userEmail': {{ User.email | tojson }},
'userVerified': {{ User.verified | tojson }},
'teamId': {{ Team.id | tojson }},
'teamName': {{ Team.name | tojson }},
'start': {{ Configs.start | tojson }},
Expand All @@ -46,6 +47,8 @@
{% endblock %}
</main>

{% include "components/snackbar.html" %}

<footer class="footer">
<div class="container text-center">
<a href="https://ctfd.io" class="text-secondary">
Expand Down
2 changes: 1 addition & 1 deletion templates/components/notifications.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div x-data>
<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11">
<div x-ref="toast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true">
<div x-ref="toast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true" data-bs-autohide="false">
<div class="toast-header">
<strong class="me-auto" x-text="$store.toast.title"></strong>
<small>just now</small>
Expand Down
15 changes: 15 additions & 0 deletions templates/components/snackbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% if can_send_mail() %}
<div
x-data
x-show="window.init.userId && !window.init.userVerified && localStorage.getItem('remind_email_verify') != window.init.userId && (!['/team', '/teams/join', '/teams/new'].includes(window.location.pathname) || window.init.teamId != null)"
class="alert alert-info alert-dismissible col-md-4 col-10 position-fixed text-center m-0"
style="bottom: 45px; left: 50%; transform: translateX(-50%); z-index: 1040; display: none;"
role="alert"
>
<small>
<strong>Email Unconfirmed</strong><br>
<span>To confirm your email address please <a href="{{ url_for('auth.confirm', flow='init') }}">click here</a>.</span>
</small>
<button type="button" class="btn-close" @click="localStorage.setItem('remind_email_verify', window.init.userId); $el.parentElement.style.display = 'none';" aria-label="Close"></button>
</div>
{% endif %}
42 changes: 25 additions & 17 deletions templates/confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,40 @@ <h1>
<div class="col-md-10 col-lg-8 col-xl-6 offset-md-1 offset-lg-2 offset-xl-3">
{% include "components/errors.html" %}

<h5 class="text-center">
{% trans %}We've sent a confirmation email to your email address.{% endtrans %}
</h5>

<br>

<h5 class="text-center">
{% trans %}Please click the link in that email to confirm your account.{% endtrans %}
</h5>

<br>

<h5 class="text-center">
{% trans %}If the email doesn’t arrive, check your spam folder or contact an administrator to manually verify your account.{% endtrans %}
</h5>
{% if request.args.get('flow') == "init" %}
<h5 class="text-center">
{% trans %}To send a confirmation email to your email address, please click the button below.{% endtrans %}
</h5>
<br>
<h5 class="text-center">
{% trans %}Please click the link in that email to confirm your account.{% endtrans %}
</h5>
<h5 class="text-center">
{% trans %}If the email doesn’t arrive, check your spam folder or contact an administrator to manually verify your account.{% endtrans %}
</h5>
{% else%}
<h5 class="text-center">
{% trans %}We've sent a confirmation email to your email address.{% endtrans %}
</h5>
<br>
<h5 class="text-center">
{% trans %}Please click the link in that email to confirm your account.{% endtrans %}
</h5>
<h5 class="text-center">
{% trans %}If the email doesn’t arrive, check your spam folder or contact an administrator to manually verify your account.{% endtrans %}
</h5>
{% endif %}

<hr>

{% with form = Forms.auth.ConfirmForm() %}
<form method="POST" action="{{ url_for('auth.confirm') }}">
<div class="row">
<div class="mb-3 col-md-6">
{{ form.submit(class="btn btn-primary w-100") }}
{{ form.submit(class="btn btn-primary w-100 p-2") }}
</div>
<div class="mb-3 col-md-6">
<a href="{{ url_for('views.settings') }}" class="btn btn-secondary w-100">
<a href="{{ url_for('views.settings') }}" class="btn btn-secondary w-100 p-2">
{% trans %}Change Email Address{% endtrans %}
</a>
</div>
Expand Down