Merge pull request #1143 from mig5/hide_qr_code_on_stop

Hide qr code on stop
This commit is contained in:
Micah Lee 2020-07-05 21:22:24 -07:00 committed by GitHub
commit 0e16d3b69e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -243,6 +243,7 @@ class ServerStatus(QtWidgets.QWidget):
self.url.hide()
self.copy_url_button.hide()
self.copy_hidservauth_button.hide()
self.show_url_qr_code_button.hide()
self.mode_settings_widget.update_ui()

View File

@ -29,7 +29,7 @@
"gui_copied_url": "OnionShare address copied to clipboard",
"gui_copied_hidservauth_title": "Copied HidServAuth",
"gui_copied_hidservauth": "HidServAuth line copied to clipboard",
"gui_show_url_qr_code": "Show QR code",
"gui_show_url_qr_code": "Show QR Code",
"gui_qr_code_dialog_title": "OnionShare QR Code",
"gui_qr_code_description": "Scan this QR code with a QR reader, such as the camera on your phone, in order to more easily share the OnionShare address with someone.",
"gui_waiting_to_start": "Scheduled to start in {}. Click to cancel.",

View File

@ -358,6 +358,11 @@ class GuiBaseTest(unittest.TestCase):
):
tab.get_mode().server_status.server_button.click()
self.assertEqual(tab.get_mode().server_status.status, 0)
self.assertFalse(tab.get_mode().server_status.show_url_qr_code_button.isVisible())
self.assertFalse(tab.get_mode().server_status.copy_url_button.isVisible())
self.assertFalse(tab.get_mode().server_status.url.isVisible())
self.assertFalse(tab.get_mode().server_status.url_description.isVisible())
self.assertFalse(tab.get_mode().server_status.copy_hidservauth_button.isVisible())
def web_server_is_stopped(self, tab):
"""Test that the web server also stopped"""