diff --git a/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/files/usr.sbin.apache2 b/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/files/usr.sbin.apache2
index b559e7a28a..9480b35afc 100644
--- a/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/files/usr.sbin.apache2
+++ b/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/files/usr.sbin.apache2
@@ -215,7 +215,7 @@
/var/www/securedrop/source_templates/index.html r,
/var/www/securedrop/source_templates/locales.html r,
/var/www/securedrop/source_templates/login.html r,
- /var/www/securedrop/source_templates/logout_flashed_message.html r,
+ /var/www/securedrop/source_templates/logout.html r,
/var/www/securedrop/source_templates/lookup.html r,
/var/www/securedrop/source_templates/next_submission_flashed_message.html r,
/var/www/securedrop/source_templates/notfound.html r,
@@ -253,6 +253,7 @@
/var/www/securedrop/static/i/custom_logo.png rw,
/var/www/securedrop/static/i/delete_gray.png r,
/var/www/securedrop/static/i/delete_red.png r,
+ /var/www/securedrop/static/i/bang-stop.png r,
/var/www/securedrop/static/i/favicon.png r,
/var/www/securedrop/static/i/font-awesome/black/guard.svg r,
/var/www/securedrop/static/i/font-awesome/black/times.svg r,
@@ -290,6 +291,8 @@
/var/www/securedrop/static/i/tipbox/tipbox-hed-submit3.png r,
/var/www/securedrop/static/i/tipbox/tipbox-hed-user.png r,
/var/www/securedrop/static/i/tipbox/tipbox-logo.png r,
+ /var/www/securedrop/static/i/torbroom-black.png r,
+ /var/www/securedrop/static/i/torbroom-coral.png r,
/var/www/securedrop/static/i/trash-x-out.png r,
/var/www/securedrop/static/i/trash-x-solid.png r,
/var/www/securedrop/static/i/un-star.png r,
diff --git a/securedrop/sass/modules/_flash.sass b/securedrop/sass/modules/_flash.sass
index a061b6e620..e75b78417a 100644
--- a/securedrop/sass/modules/_flash.sass
+++ b/securedrop/sass/modules/_flash.sass
@@ -4,8 +4,8 @@
flex-flow: row nowrap
align-items: flex-start
border-radius: 10px
- padding: 10px
margin: 10px
+ padding: 10px
text-align: left
font-size: medium
@@ -38,11 +38,31 @@
i
color: #D62727
+ &.important-header
+ margin: auto 6px
+ color: $color_urgent_coral
+
&.important
- border: 1px solid #EBDCEB
- background: #FDFAFD
+ border-top: 1px solid #ece6e7
+ border-left: 6px solid $color_urgent_coral
+ border-bottom: 1px solid $color_urgent_coral
+ border-right: 1px solid #ece6e7
+ border-radius: 2px
+ margin-bottom: 30px
+ padding-left: 20px
+ padding-right: 8px
+ background-color: #FDFDFD
+ color: #383838
+ align-items: center
+
+ &:dir(rtl)
+ padding-left: 8px
+ padding-right: 20px
+ text-align: right
+ border-top: 1px solid #ece6e7
+ border-left: 1px solid #ece6e7
+ border-bottom: 1px solid $color_urgent_coral
+ border-right: 6px solid $color_urgent_coral
- strong
- color: #673466
p
color: #555555
diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py
index c1748c0166..a7644c56e3 100644
--- a/securedrop/source_app/main.py
+++ b/securedrop/source_app/main.py
@@ -296,8 +296,12 @@ def login():
@view.route('/logout')
def logout():
+ """
+ If a user is logged in, show them a logout page that prompts them to
+ click the New Identity button in Tor Browser to complete their session.
+ Otherwise redirect to the main Source Interface page.
+ """
if logged_in():
- msg = render_template('logout_flashed_message.html')
# Clear the session after we render the message so it's localized
# If a user specified a locale, save it and restore it
@@ -305,7 +309,8 @@ def logout():
session.clear()
session['locale'] = user_locale
- flash(Markup(msg), "important hide-if-not-tor-browser")
- return redirect(url_for('.index'))
+ return render_template('logout.html')
+ else:
+ return redirect(url_for('.index'))
return view
diff --git a/securedrop/source_templates/flashed.html b/securedrop/source_templates/flashed.html
index 8b8cff4a17..e6cd25b20d 100644
--- a/securedrop/source_templates/flashed.html
+++ b/securedrop/source_templates/flashed.html
@@ -7,6 +7,8 @@
{% elif category == 'error' %}
+ {% elif category == 'important' %}
+
{% endif %}
{{ message }}
diff --git a/securedrop/source_templates/logout.html b/securedrop/source_templates/logout.html
new file mode 100644
index 0000000000..3aa931ebef
--- /dev/null
+++ b/securedrop/source_templates/logout.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% block body %}
+ {{ gettext('LOG IN') }}
+
+
+
{{ gettext('Click the New Identity button in your Tor browser\'s toolbar. This will clear your Tor browser activity data on this device.').format(icon=url_for('static', filename='i/torbroom-black.png')) }}
+{% endblock %} diff --git a/securedrop/source_templates/logout_flashed_message.html b/securedrop/source_templates/logout_flashed_message.html deleted file mode 100644 index 3190d95486..0000000000 --- a/securedrop/source_templates/logout_flashed_message.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ gettext('You were logged out due to inactivity. Click the New Identity button in your Tor browser\'s toolbar before moving on. This will clear your Tor browser activity data on this device.').format(icon=url_for('static', filename='i/torbroom-coral.png')) }}