mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
removed old login announcement page and added new sign in button
This commit is contained in:
1
app/assets/images/logo-login.svg
Normal file
1
app/assets/images/logo-login.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 292.1 39.47"><path fill="#fff" d="M7.44 6.89h17.2v22.06H7.44z"/><path fill="#112e51" d="M53.45 5.28h-6.16v27.31h17.87v-5.38H53.45V5.28zm30.76-.19c-8.35 0-14.67 5.89-14.67 13.85s6.32 13.93 14.67 13.93 14.67-6 14.67-13.93S92.56 5.09 84.21 5.09zm.08 22.39a8.49 8.49 0 0 1-8.43-8.54 8.4 8.4 0 0 1 8.43-8.47 8.29 8.29 0 0 1 8.27 8.47 8.36 8.36 0 0 1-8.27 8.54zm35.36-17.05a11.43 11.43 0 0 1 7.49 3l3.47-4.41a17.21 17.21 0 0 0-11-4c-8.51 0-14.9 6-14.9 13.85s6.29 13.99 14.58 13.99a20.21 20.21 0 0 0 11.08-3.55V17.57h-10.11v4.82H125V26a12.42 12.42 0 0 1-5.34 1.48 8.52 8.52 0 1 1 0-17zm19.61-5.15h6.17v27.31h-6.17zm34.53 17.56L160.52 5.28h-5.61v27.31h5.89V15.07l13.22 17.52h5.62V5.28h-5.85v17.56zm17.47 2.85a3.39 3.39 0 0 0-3.47 3.56 3.47 3.47 0 1 0 6.94 0 3.36 3.36 0 0 0-3.47-3.56zm23.15-15.26a11.43 11.43 0 0 1 7.49 3l3.47-4.41a17.21 17.21 0 0 0-11-4c-8.51 0-14.9 6-14.9 13.85s6.28 13.93 14.55 13.93a20.21 20.21 0 0 0 11.08-3.55V17.57H215v4.82h4.77V26a12.42 12.42 0 0 1-5.34 1.48 8.52 8.52 0 1 1 0-17zm32.23-5.34C238.29 5.09 232 11 232 18.94s6.32 13.93 14.67 13.93 14.67-6 14.67-13.93S255 5.09 246.64 5.09zm.08 22.39a8.49 8.49 0 0 1-8.43-8.54 8.4 8.4 0 0 1 8.43-8.47 8.29 8.29 0 0 1 8.28 8.47 8.36 8.36 0 0 1-8.28 8.54zm39.02-22.2-7.49 20.6-7.45-20.6h-6.63l10.73 27.31h6.36L292.1 5.28h-6.36z"/><path fill="#e21d3e" d="m11.38 25.34 1.45-8.28a4.39 4.39 0 0 1 2.71-7.86V0H4.34A4.34 4.34 0 0 0 0 4.34v21.28a2.62 2.62 0 0 0 .26 1.16c.94 1.9 4.65 8 15.27 12.69V25.7a24.3 24.3 0 0 1-4.15-.36z"/><path fill="#b51e23" d="M26.72 0H15.53v9.19A4.39 4.39 0 0 1 18.28 17l1.45 8.32a24.29 24.29 0 0 1-4.2.36v13.79C26.14 34.8 29.86 28.68 30.8 26.79a2.62 2.62 0 0 0 .26-1.16V4.34A4.34 4.34 0 0 0 26.72 0z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -157,6 +157,19 @@ td.table-empty-message {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.usa-button svg {
|
||||||
|
margin-left: .5rem;
|
||||||
|
height: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-button.login-button--primary, .login-button.login-button--primary:hover {
|
||||||
|
color: #112e51;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #767676;
|
||||||
|
display: inline-flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.user-list-edit-link:active:before,
|
.user-list-edit-link:active:before,
|
||||||
.user-list-edit-link:focus:before {
|
.user-list-edit-link:focus:before {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from flask import abort, redirect, render_template, request, url_for
|
from flask import abort, current_app, redirect, render_template, request, url_for
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
|
|
||||||
from app import status_api_client
|
from app import status_api_client
|
||||||
@@ -9,6 +9,7 @@ from app.main import main
|
|||||||
from app.main.views.pricing import CURRENT_SMS_RATE
|
from app.main.views.pricing import CURRENT_SMS_RATE
|
||||||
from app.main.views.sub_navigation_dictionaries import features_nav, using_notify_nav
|
from app.main.views.sub_navigation_dictionaries import features_nav, using_notify_nav
|
||||||
from app.utils.user import user_is_logged_in
|
from app.utils.user import user_is_logged_in
|
||||||
|
from notifications_utils.url_safe_token import generate_token
|
||||||
|
|
||||||
login_dot_gov_url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
|
login_dot_gov_url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
|
||||||
|
|
||||||
@@ -17,12 +18,22 @@ login_dot_gov_url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
|
|||||||
def index():
|
def index():
|
||||||
if current_user and current_user.is_authenticated:
|
if current_user and current_user.is_authenticated:
|
||||||
return redirect(url_for("main.choose_account"))
|
return redirect(url_for("main.choose_account"))
|
||||||
|
token = generate_token(
|
||||||
|
str(request.remote_addr),
|
||||||
|
current_app.config["SECRET_KEY"],
|
||||||
|
current_app.config["DANGEROUS_SALT"],
|
||||||
|
)
|
||||||
|
url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
|
||||||
|
# handle unit tests
|
||||||
|
if url is not None:
|
||||||
|
url = url.replace("NONCE", token)
|
||||||
|
url = url.replace("STATE", token)
|
||||||
return render_template(
|
return render_template(
|
||||||
"views/signedout.html",
|
"views/signedout.html",
|
||||||
sms_rate=CURRENT_SMS_RATE,
|
sms_rate=CURRENT_SMS_RATE,
|
||||||
counts=status_api_client.get_count_of_live_services_and_organizations(),
|
counts=status_api_client.get_count_of_live_services_and_organizations(),
|
||||||
login_dot_gov_url=login_dot_gov_url,
|
login_dot_gov_url=login_dot_gov_url,
|
||||||
|
initial_signin_url=url,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Notify.gov
|
|||||||
<h1 class="font-serif-2xl usa-hero__heading">Reach people where they are with government-powered text messages</h1>
|
<h1 class="font-serif-2xl usa-hero__heading">Reach people where they are with government-powered text messages</h1>
|
||||||
<p class="font-sans-lg">Notify.gov is a text message service that helps federal, state, local, tribal and territorial governments more effectively communicate with the people they serve.</p>
|
<p class="font-sans-lg">Notify.gov is a text message service that helps federal, state, local, tribal and territorial governments more effectively communicate with the people they serve.</p>
|
||||||
<div class="usa-button-group margin-bottom-5">
|
<div class="usa-button-group margin-bottom-5">
|
||||||
<a class="usa-button usa-button--big margin-right-2" href="{{ url_for('main.sign_in' ) }}">Sign in</a>
|
<a class="usa-button login-button login-button--primary margin-right-2" href="{{ initial_signin_url }}">Sign in with <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 292.1 39.47"><path fill="#fff" d="M7.44 6.89h17.2v22.06H7.44z"/><path fill="#112e51" d="M53.45 5.28h-6.16v27.31h17.87v-5.38H53.45V5.28zm30.76-.19c-8.35 0-14.67 5.89-14.67 13.85s6.32 13.93 14.67 13.93 14.67-6 14.67-13.93S92.56 5.09 84.21 5.09zm.08 22.39a8.49 8.49 0 0 1-8.43-8.54 8.4 8.4 0 0 1 8.43-8.47 8.29 8.29 0 0 1 8.27 8.47 8.36 8.36 0 0 1-8.27 8.54zm35.36-17.05a11.43 11.43 0 0 1 7.49 3l3.47-4.41a17.21 17.21 0 0 0-11-4c-8.51 0-14.9 6-14.9 13.85s6.29 13.99 14.58 13.99a20.21 20.21 0 0 0 11.08-3.55V17.57h-10.11v4.82H125V26a12.42 12.42 0 0 1-5.34 1.48 8.52 8.52 0 1 1 0-17zm19.61-5.15h6.17v27.31h-6.17zm34.53 17.56L160.52 5.28h-5.61v27.31h5.89V15.07l13.22 17.52h5.62V5.28h-5.85v17.56zm17.47 2.85a3.39 3.39 0 0 0-3.47 3.56 3.47 3.47 0 1 0 6.94 0 3.36 3.36 0 0 0-3.47-3.56zm23.15-15.26a11.43 11.43 0 0 1 7.49 3l3.47-4.41a17.21 17.21 0 0 0-11-4c-8.51 0-14.9 6-14.9 13.85s6.28 13.93 14.55 13.93a20.21 20.21 0 0 0 11.08-3.55V17.57H215v4.82h4.77V26a12.42 12.42 0 0 1-5.34 1.48 8.52 8.52 0 1 1 0-17zm32.23-5.34C238.29 5.09 232 11 232 18.94s6.32 13.93 14.67 13.93 14.67-6 14.67-13.93S255 5.09 246.64 5.09zm.08 22.39a8.49 8.49 0 0 1-8.43-8.54 8.4 8.4 0 0 1 8.43-8.47 8.29 8.29 0 0 1 8.28 8.47 8.36 8.36 0 0 1-8.28 8.54zm39.02-22.2-7.49 20.6-7.45-20.6h-6.63l10.73 27.31h6.36L292.1 5.28h-6.36z"/><path fill="#e21d3e" d="m11.38 25.34 1.45-8.28a4.39 4.39 0 0 1 2.71-7.86V0H4.34A4.34 4.34 0 0 0 0 4.34v21.28a2.62 2.62 0 0 0 .26 1.16c.94 1.9 4.65 8 15.27 12.69V25.7a24.3 24.3 0 0 1-4.15-.36z"/><path fill="#b51e23" d="M26.72 0H15.53v9.19A4.39 4.39 0 0 1 18.28 17l1.45 8.32a24.29 24.29 0 0 1-4.2.36v13.79C26.14 34.8 29.86 28.68 30.8 26.79a2.62 2.62 0 0 0 .26-1.16V4.34A4.34 4.34 0 0 0 26.72 0z"/></svg></a>
|
||||||
if you are an existing pilot partner
|
if you are an existing pilot partner
|
||||||
</div>
|
</div>
|
||||||
<p class="font-sans-md">Currently we are only working with select pilot partners. If you are interested in using Notify.gov in the future, please contact <br><a href="mailto:tts-benefits-studio@gsa.gov">tts-benefits-studio@gsa.gov</a> to learn more.</p>
|
<p class="font-sans-md">Currently we are only working with select pilot partners. If you are interested in using Notify.gov in the future, please contact <br><a href="mailto:tts-benefits-studio@gsa.gov">tts-benefits-studio@gsa.gov</a> to learn more.</p>
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
{% extends "base.html" %}
|
|
||||||
{% from "components/page-footer.html" import page_footer %}
|
|
||||||
{% from "components/form.html" import form_wrapper %}
|
|
||||||
|
|
||||||
{% block per_page_title %}
|
|
||||||
{% if again %}
|
|
||||||
You need to sign in again
|
|
||||||
{% else %}
|
|
||||||
Sign in
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block maincolumn_content %}
|
|
||||||
|
|
||||||
<div class="grid-row margin-bottom-4">
|
|
||||||
<div class="tablet:grid-col-5">
|
|
||||||
{% if again %}
|
|
||||||
<h1 class="font-body-2xl margin-bottom-3">You need to sign in again</h1>
|
|
||||||
{% if other_device %}
|
|
||||||
<p>
|
|
||||||
We signed you out because you logged in to Notify on another device.
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<p>
|
|
||||||
We signed you out because you have not used Notify for a while.
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
<a class="usa-link usa-button" href="{{ initial_signin_url }}">Sign in with Login.gov</a>
|
|
||||||
{% else %}
|
|
||||||
<h1 class="font-body-2xl margin-bottom-3">Sign in</h1>
|
|
||||||
<p>Access your Notify.gov account by signing in with Login.gov:</p>
|
|
||||||
<a class="usa-link usa-button" href="{{ initial_signin_url }}">Sign in with Login.gov</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="tablet:grid-col-6 tablet:grid-offset-1 margin-top-2 padding-y-2 padding-x-4 bg-base-lightest">
|
|
||||||
<h2 class="font-body-lg">Effective April 16, 2024 Notify.gov requires you sign-in through Login.gov</h2>
|
|
||||||
<p>Why are we doing this?</p>
|
|
||||||
<ul class="usa-list">
|
|
||||||
<li><strong>Enhanced security:</strong> Login.gov is really secure and trustworthy</li>
|
|
||||||
<li><strong>One single source for signing in:</strong> You can use Login.gov for other services within the federal government</li>
|
|
||||||
<li><strong>2FA flexibility:</strong> Login.gov supports multiple methods for users to verify their identity.</li>
|
|
||||||
</ul>
|
|
||||||
<p>What do I need to do?</p>
|
|
||||||
<ul class="usa-list">
|
|
||||||
<li>If you have a Login.gov account, start using it to sign in to Notify today.</li>
|
|
||||||
<li>If you don’t have a Login.gov account, you must create one to continue to access Notify.</li>
|
|
||||||
</ul>
|
|
||||||
<div class="border-bottom border-base-lighter margin-y-4"></div>
|
|
||||||
<a class="usa-link usa-button usa-button--outline margin-bottom-3" href="{{ initial_signin_url }}">Create Login.gov account</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
Reference in New Issue
Block a user