Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design updates for SecureDrop 1.0.0, rev1 #4634

Merged
merged 4 commits into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@
/var/www/securedrop/static/i/font-awesome/refresh-blue.png r,
/var/www/securedrop/static/i/font-awesome/refresh-white.png r,
/var/www/securedrop/static/i/font-awesome/times-white.png r,
/var/www/securedrop/static/i/font-awesome/trash-black.png r,
/var/www/securedrop/static/i/font-awesome/white/exclamation-circle.svg r,
/var/www/securedrop/static/i/font-awesome/white/guard.svg r,
/var/www/securedrop/static/i/hand_with_fingerprint.png r,
Expand All @@ -281,7 +280,12 @@
/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/trash-x-out.png r,
/var/www/securedrop/static/i/trash-x-solid.png r,
/var/www/securedrop/static/i/un-star.png r,
/var/www/securedrop/static/i/x_icon-button_blue.png r,
/var/www/securedrop/static/i/x_icon-grimace_blue.png r,
/var/www/securedrop/static/i/x_icon-sd_blue.png r,
/var/www/securedrop/static/js/journalist.js r,
/var/www/securedrop/static/js/source.js r,
/var/www/securedrop/store.py r,
Expand Down
4 changes: 2 additions & 2 deletions securedrop/journalist_templates/_confirmation_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a href="#close" title="{{ gettext('Close') }}" class="close">X</a>
<h2>{{ modal_data.modal_header }}</h2>
<p>{{ modal_data.modal_body }}</p>
<a href="#close" id="{{ modal_data.cancel_id }}" title="{{ gettext('Cancel') }}" class="btn sd-button">{{ gettext('Cancel') }}</a>
<button type="submit" id="{{ modal_data.submit_id }}" name="action" value="delete" class="sd-button {{ modal_data.submit_btn_type }}">{{ modal_data.submit_btn_text }}</button>
<a href="#close" id="{{ modal_data.cancel_id }}" title="{{ gettext('Cancel') }}" class="btn">{{ gettext('CANCEL') }}</a>
<button type="submit" id="{{ modal_data.submit_id }}" name="action" value="delete" class="{{ modal_data.submit_btn_type }}">{{ modal_data.submit_btn_text }}</button>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<label for="otp_secret">{{ gettext('Change Secret') }}</label>
<input name="otp_secret" type="text" placeholder="{{ gettext('HOTP Secret') }}"><br>
</p>
<button class="sd-button" type="submit">{{ gettext('CONTINUE') }}</button>
<button type="submit">{{ gettext('CONTINUE') }}</button>
</form>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ <h1>{{ gettext('Enable YubiKey (OATH-HOTP)') }}</h1>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<label for="token">{{ gettext('Verification code') }}</label>
<input name="token" id="token" type="text" placeholder="123456">
<button type="submit" class="sd-button">{{ gettext('SUBMIT') }}</button>
<button type="submit">{{ gettext('SUBMIT') }}</button>
</form>
{% endblock %}
10 changes: 5 additions & 5 deletions securedrop/journalist_templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h1>{{ gettext('Admin Interface') }}</h1>

<form action="{{ url_for('admin.add_user') }}">
<button class="sd-button" type="submit" class="btn" id="add-user"><i class="fa fa-plus"></i>{{ gettext('ADD USER') }}</button>
<button type="submit" id="add-user"><i class="fa fa-plus"></i>{{ gettext('ADD USER') }}</button>
</form>

<hr class="no-line">
Expand All @@ -22,9 +22,9 @@ <h1>{{ gettext('Admin Interface') }}</h1>
{% for user in users %}
<tr class="user">
<td>{{ user.username }}</td>
<td><a href="/admin/edit/{{ user.id }}" class="plain" data-username="{{ user.username }}"><i class="fa fa-edit" title="{{ gettext('Edit user {username}').format(username=user.username) }}"></i></a></td>
<td><a href="/admin/edit/{{ user.id }}" class="plain edit-user-button" data-username="{{ user.username }}"><i class="fa fa-edit" title="{{ gettext('Edit user {username}').format(username=user.username) }}"></i></a></td>
{% if user.id == g.user.id %}
<td><i class="far fa-trash-alt"></i></button></td>
<td><i class="far fa-trash-alt disabled-delete-button"></i></td>
{% else %}
<td><button type="submit" class="plain delete-user" formaction="/admin/delete/{{ user.id }}" data-username="{{ user.username}}"><i class="far fa-trash-alt" title="{{ gettext('Delete user {username}').format(username=user.username) }}"></i></button></td>
{% endif %}
Expand All @@ -44,8 +44,8 @@ <h1>{{ gettext('Admin Interface') }}</h1>

<hr class="no-line">

<a href="{{ url_for('admin.manage_config') }}" class="btn sd-button" id="update-instance-config">
<i class="fas fa-pencil-alt"></i>{{ gettext('INSTANCE CONFIG') }}
<a href="{{ url_for('admin.manage_config') }}" class="btn" id="update-instance-config">
<i class="fas fa-pencil-alt"></i> {{ gettext('INSTANCE CONFIG') }}
</a>

<hr class="no-line">
Expand Down
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/admin_add_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
<span class="form-validation-error">{{ error }}</span><br>
{% endfor %}
</p>
<button type="submit" class="sd-button"><i class="fa fa-plus"></i>{{ gettext('ADD USER') }}</button>
<button type="submit"><i class="fa fa-plus"></i>{{ gettext('ADD USER') }}</button>
</form>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<label for="otp_secret">{{ gettext('Change Secret') }}</label>
<input name="otp_secret" type="text" placeholder="{{ gettext('HOTP Secret') }}"><br>
</p>
<button class="sd-button" type="submit">{{ gettext('CONTINUE') }}</button>
<button type="submit">{{ gettext('CONTINUE') }}</button>
</form>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ <h1>{{ gettext('Enable YubiKey (OATH-HOTP)') }}</h1>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<label for="token">{{ gettext('Verification code') }}</label>
<input name="token" id="token" type="text" placeholder="123456">
<button type="submit" class="sd-button">{{ gettext('SUBMIT') }}</button>
<button type="submit">{{ gettext('SUBMIT') }}</button>
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="container">
{% block header %}
<div id="header">
<a href="{{ url_for('main.index') }}"><img src="{{ url_for('main.select_logo') }}" class="logo small" alt="SecureDrop" width="250"></a>
<a href="{{ url_for('main.index') }}" class="no-bottom-border"><img src="{{ url_for('main.select_logo') }}" class="logo small" alt="SecureDrop" width="250"></a>
{% include 'locales.html' %}
{% if use_custom_header_image %}
<div class="powered">
Expand Down
24 changes: 13 additions & 11 deletions securedrop/journalist_templates/col.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a href="#change-codename-{{ source.journalist_designation }}" title="{{ gettext('Generate a new random codename for this source. We recommend doing this if the first random codename is difficult to say or remember. You can generate new random codenames as many times as you like.') }}" class="plain" id="regenerate-codename-btn"><span id="regenerate-codename-btn-label">{{ gettext('Change codename') }}</span></a>
<div id="change-codename-{{ source.journalist_designation }}" class="confirm-prompt">{{ gettext('Are you sure you want to generate a new codename?') }}
<a href="#regenerate-code">{{ gettext('Cancel') }}</a>
<button class="sd-button" type="submit">{{ gettext('CONFIRM') }}</button>
<button class="small" type="submit">{{ gettext('CONFIRM') }}</button>
</div>
</p>
</form>
Expand Down Expand Up @@ -48,7 +48,7 @@
<span title="{{ gettext('Read') }}" class="icon"><i class="fa fa-envelope-open"></i></span>
{% endif %}
<a class="file {% if not doc.downloaded and not doc.filename.endswith('reply.gpg') %}unread{% else %}read{% endif %}" href="{{ url_for('col.download_single_file', filesystem_id=filesystem_id, fn=doc.filename) }}">
<i class="fa fa-download"></i> <span class="filename">{{ doc.filename }}</span>
<span class="filename">{{ doc.filename }}</span>
</a>
<span class="info"><span title="{{ doc.size }} bytes">{{ doc.size|filesizeformat() }}</span></span>

Expand All @@ -72,7 +72,7 @@
"cancel_id": "cancel-selected-deletions",
"submit_id": "delete-selected",
"submit_btn_type": "danger",
"submit_btn_text": gettext('Delete')
"submit_btn_text": gettext('DELETE')
}
%}
{% include '_confirmation_modal.html' %}
Expand All @@ -88,15 +88,15 @@

<hr class="cut-out">
<hr class="no-line">
<h3><i class="fa fa-reply"></i> {{ gettext('Reply') }}</h3>
<h3>{{ gettext('Reply') }}</h3>
{% if source.has_key %}
<p>{{ gettext('You can write a secure reply to the person who submitted these documents:') }}</p>
<form action="{{ url_for('main.reply') }}" method="post" autocomplete="off">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="filesystem_id" value="{{ filesystem_id }}">
{{ form.message(id="reply-text-field", rows='10', cols='72', class="journalist-reply__input") }}
{{ form.message(id="reply-text-field", rows='10', class="journalist-reply__input") }}
<hr class="no-line">
<button id="reply-button" class="sd-button" type="submit">{{ gettext('SUBMIT') }}</button>
<button id="reply-button" class="button pull-right" type="submit">{{ gettext('SUBMIT') }}</button>
</form>
{% elif source.flagged %}
<p class="notification">{{ gettext("You've flagged this source for reply.") }}</p>
Expand All @@ -106,7 +106,7 @@ <h3><i class="fa fa-reply"></i> {{ gettext('Reply') }}</h3>
<form action="{{ url_for('main.flag') }}" method="post">
<input type="hidden" name="filesystem_id" value="{{ filesystem_id }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button id="flag-button" class="sd-button" type="submit">{{ gettext('FLAG THIS SOURCE FOR REPLY') }}</button>
<button id="flag-button" type="submit">{{ gettext('FLAG THIS SOURCE FOR REPLY') }}</button>
</form>
{% endif %}
<hr class="no-line">
Expand All @@ -117,9 +117,11 @@ <h3><i class="fa fa-reply"></i> {{ gettext('Reply') }}</h3>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="filesystem_id" value="{{ filesystem_id }}">
<input type="hidden" name="col_name" value="{{ source.journalist_designation }}">
<a href="#delete-collection-confirmation-modal" id="delete-collection-link">
<button type="button" class="sd-button danger"><i class="far fa-trash-alt"></i> {{ gettext('DELETE SOURCE AND SUBMISSIONS') }}</button>
</a>
<div class="center">
<a href="#delete-collection-confirmation-modal" id="delete-collection-link">
<button type="button" class="danger"><i class="far fa-trash-alt"></i> {{ gettext('DELETE SOURCE AND SUBMISSIONS') }}</button>
</a>
</div>

<!-- Confirmation modal for entire collection deletion -->
{% with %}
Expand All @@ -130,7 +132,7 @@ <h3><i class="fa fa-reply"></i> {{ gettext('Reply') }}</h3>
"cancel_id": "cancel-collection-deletions",
"submit_id": "delete-collection-button",
"submit_btn_type": "danger",
"submit_btn_text": gettext('Delete')
"submit_btn_text": gettext('DELETE')
}
%}
{% include '_confirmation_modal.html' %}
Expand Down
8 changes: 4 additions & 4 deletions securedrop/journalist_templates/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ <h2>{{ gettext('Alerts') }}</h2>
<p>{{ gettext('Send an encrypted email to verify if OSSEC alerts work correctly:') }}</p>

<p>
<a class="btn sd-button" href="{{ url_for('admin.ossec_test') }}" id="test-ossec-alert">
<i class="fa fa-bell"></i>{{ gettext('SEND TEST OSSEC ALERT') }}
<a class="btn" href="{{ url_for('admin.ossec_test') }}" id="test-ossec-alert">
<i class="fa fa-bell"></i> {{ gettext('SEND TEST OSSEC ALERT') }}
</a>
</p>

Expand All @@ -35,8 +35,8 @@ <h2>{{ gettext('Logo Image') }}</h2>
<h5>
{{ gettext('Recommended size: 500px * 450px') }}
</h5>
<button type="submit" class="sd-button" id="submit-logo-update">
<i class="fas fa-pencil-alt"></i>{{ gettext('UPDATE LOGO') }}
<button type="submit" id="submit-logo-update">
<i class="fas fa-pencil-alt"></i> {{ gettext('UPDATE LOGO') }}
</button>
{% include 'logo_upload_flashed.html' %}
</form>
Expand Down
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="filesystem_id" value="{{ filesystem_id }}" autocomplete="off">
<input type="hidden" name="confirm_delete" value="true">
<p><button class="sd-button" type="submit" name="action" value="delete" id="confirm-delete">{{ gettext('PERMANENTLY DELETE FILES') }}</button></p>
<p><button type="submit" name="action" value="delete" id="confirm-delete">{{ gettext('PERMANENTLY DELETE FILES') }}</button></p>
</form>

<p><a href="/col/{{ filesystem_id }}">{{ gettext('Return to the list of documents for {source_name}…').format(source_name=source.journalist_designation) }}</a></p>
Expand Down
8 changes: 4 additions & 4 deletions securedrop/journalist_templates/edit_account.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2>{{ gettext('Change Name &amp; Admin Status') }}</h2>
<input name="is_admin" id="is-admin" type="checkbox" {% if user.is_admin %}checked{% endif %}>
<label for="is_admin">{{ gettext('Is Admin') }}</label>
</p>
<button class="sd-button" type="submit" id="update">{{ gettext('UPDATE') }}</button>
<button type="submit" id="update">{{ gettext('UPDATE') }}</button>
</form>
{% else %}
<h1>{{ gettext('Edit your account') }}</h1>
Expand All @@ -40,7 +40,7 @@ <h2>{{ gettext('Change Name') }}</h2>
{% set last_name = g.user.last_name or '' %}
<input name="last_name" id="last_name" value = "{{ last_name }}"">
</p>
<button class="sd-button" type="submit" id="change-name">{{ gettext('UPDATE') }}</button>
<button type="submit" id="change-name">{{ gettext('UPDATE') }}</button>
</form>
{% endif %}

Expand Down Expand Up @@ -72,7 +72,7 @@ <h2>{{ gettext('Reset Password') }}</h2>
<br>
<span id="password" class="password">{{ password }}</span>
</p>
<button class="sd-button btn" type="submit" id="reset-password"><i class="fas fa-sync"></i> {{ gettext('Reset Password') }}</button>
<button type="submit" id="reset-password"><i class="fas fa-sync"></i> {% filter upper %}{{ gettext('Reset Password') }}{% endfilter %}</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work with all locales/languages? We should explicitly test this as part of QA

</form>

<hr class="no-line">
Expand Down Expand Up @@ -105,7 +105,7 @@ <h2>{{ gettext('Reset Two-Factor Authentication') }}</h2>
<input name="uid" type="hidden" value="{{ user.id }}">
{% endif %}
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<button class="sd-button" id="button-reset-two-factor-{{ type }}" tooltip="{{ tooltip_text }}" type="submit" class="pull-right"><i class="fas fa-sync"></i> {{ button_text }}<span class="tooltip">{{ tooltip_text }}</span></button>
<button id="button-reset-two-factor-{{ type }}" tooltip="{{ tooltip_text }}" type="submit" class="pull-right"><i class="fas fa-sync"></i> {{ button_text }}<span class="tooltip">{{ tooltip_text }}</span></button>
</form>
{%- endmacro %}

Expand Down
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h1><span class="headline">{{ gettext('Sources') }}</span></h1>
"cancel_id": "cancel-collections-deletions",
"submit_id": "delete-collections",
"submit_btn_type": "danger",
"submit_btn_text": gettext('Delete')
"submit_btn_text": gettext('DELETE')
}
%}
{% include '_confirmation_modal.html' %}
Expand Down
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/locales.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% else %}
{% set url = '' %}
{% endif %}
<a href="{{ url }}" rel="nofollow">
<a href="{{ url }}" rel="nofollow" class="no-bottom-border">
<span>{{ g.locales[locale] }}</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>{{ gettext('Login to access the journalist interface') }}</h1>
<p><input class="login-password" id="login-form-password" type="password" name="password" placeholder="{{ gettext('Password') }}"></p>
<p class="show-password-checkbox-container"><label><input id="show-password-check" type="checkbox">Show password</label></p>
<p><input class="login-token" name="token" id="token" type="text" placeholder="{{ gettext('Two-factor Code') }}"></p>
<button class="sd-button" type="submit"><i class="far fa-arrow-alt-circle-right"></i> {{ gettext('LOG IN') }}</button>
<button type="submit">{{ gettext('LOG IN') }}</button>
</form>

{% endblock %}
6 changes: 0 additions & 6 deletions securedrop/sass/_base.sass
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
@import modules/doc-check
// Text link - make links purple in running text, possibly unnecessary.
@import modules/text-link
// Some kind of button possibly sd=standard button. Belongs in button module?
@import modules/sd-button
// Tooltips for showing informations
@import modules/tooltip
//variation on button for select all / none. In journalist interface only?
Expand Down Expand Up @@ -68,8 +66,6 @@
@import "modules/document-actions-button"
// Grid item - part of the grid. Doesnt seem to be used very much though.
@import "modules/grid-item"
// Option - might be unused. Delete?
@import "modules/option"
// Flexbox - support for flexbox layouts
@import "modules/flexbox"
// Logo - Small and large versions of the branding; can also be the journalist org brand (not SD).
Expand Down Expand Up @@ -116,7 +112,6 @@
+document-actions
+doc-check
+text-link
+sd-button
+tooltip
+select
+pull
Expand All @@ -138,7 +133,6 @@
+select-container
+document-actions-button
+grid-item
+option
+flexbox
+logo
+submissions
Expand Down
Loading