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

Update login screen to latest design. #789

Merged
merged 2 commits into from
Mar 3, 2020
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
9 changes: 8 additions & 1 deletion securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
QToolButton, QSizePolicy, QPlainTextEdit, QStatusBar, QGraphicsDropShadowEffect, QPushButton, \
QDialogButtonBox

from securedrop_client import __version__ as sd_version
from securedrop_client.db import DraftReply, Source, Message, File, Reply, User
from securedrop_client.storage import source_exists
from securedrop_client.export import ExportStatus, ExportError
Expand Down Expand Up @@ -1378,6 +1379,7 @@ class LoginDialog(QDialog):
border-radius: 0px;
height: 30px;
margin: 0px 0px 0px 0px;
padding-left: 5px;
}
'''

Expand Down Expand Up @@ -1459,6 +1461,10 @@ def __init__(self, parent):
application_version = QWidget()
application_version_layout = QHBoxLayout()
application_version.setLayout(application_version_layout)
application_version_label = QLabel(_("Workstation app v") + sd_version)
application_version_label.setAlignment(Qt.AlignHCenter)
application_version_label.setStyleSheet("QLabel {color: #9fddff;}")
application_version_layout.addWidget(application_version_label)

# Add widgets
layout.addWidget(self.error_bar)
Expand Down Expand Up @@ -1507,6 +1513,7 @@ def error(self, message):
Ensures the passed in message is displayed as an error message.
"""
self.setDisabled(False)
self.submit.setText(_("SIGN IN"))
self.error_bar.set_message(html.escape(message))

def validate(self):
Expand Down Expand Up @@ -1541,7 +1548,7 @@ def validate(self):
self.setDisabled(False)
self.error(_('Please use only numerals for the two-factor code.'))
return

self.submit.setText(_("SIGNING IN"))
self.controller.login(username, password, tfa_token)
else:
self.setDisabled(False)
Expand Down
124 changes: 52 additions & 72 deletions securedrop_client/resources/images/login_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.