aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Jacq <mig@mig5.net>2021-08-31 14:52:27 +1000
committerMiguel Jacq <mig@mig5.net>2021-08-31 14:52:27 +1000
commitcf604f78f4f5734c9e53eee760bac3bc43a0512f (patch)
tree791ff63873e3b0ff54915ed9c0549fa4e712aac5
parent30b12cac5582f2468b11178e80ae27ae39f018db (diff)
downloadonionshare-cf604f78f4f5734c9e53eee760bac3bc43a0512f.tar.gz
onionshare-cf604f78f4f5734c9e53eee760bac3bc43a0512f.zip
Don't show private key
-rw-r--r--desktop/src/onionshare/main_window.py2
-rw-r--r--desktop/src/onionshare/tab/server_status.py15
-rw-r--r--desktop/tests/gui_base_test.py12
-rw-r--r--desktop/tests/test_gui_chat.py1
-rw-r--r--desktop/tests/test_gui_receive.py1
-rw-r--r--desktop/tests/test_gui_share.py1
-rw-r--r--desktop/tests/test_gui_website.py1
7 files changed, 4 insertions, 29 deletions
diff --git a/desktop/src/onionshare/main_window.py b/desktop/src/onionshare/main_window.py
index 2c24f19d..583c34fa 100644
--- a/desktop/src/onionshare/main_window.py
+++ b/desktop/src/onionshare/main_window.py
@@ -44,7 +44,7 @@ class MainWindow(QtWidgets.QMainWindow):
# Initialize the window
self.setMinimumWidth(1040)
- self.setMinimumHeight(780)
+ self.setMinimumHeight(740)
self.setWindowTitle("OnionShare")
self.setWindowIcon(QtGui.QIcon(GuiCommon.get_resource_path("images/logo.png")))
diff --git a/desktop/src/onionshare/tab/server_status.py b/desktop/src/onionshare/tab/server_status.py
index 2fc816a8..1ba033e2 100644
--- a/desktop/src/onionshare/tab/server_status.py
+++ b/desktop/src/onionshare/tab/server_status.py
@@ -125,16 +125,6 @@ class ServerStatus(QtWidgets.QWidget):
strings._("gui_client_auth_instructions")
)
- # The private key itself
- self.private_key = QtWidgets.QLabel()
- self.private_key.setFont(url_font)
- self.private_key.setWordWrap(True)
- self.private_key.setMinimumSize(self.private_key.sizeHint())
- self.private_key.setStyleSheet(self.common.gui.css["server_status_url"])
- self.private_key.setTextInteractionFlags(
- Qt.TextSelectableByMouse | Qt.TextSelectableByKeyboard
- )
-
# Copy ClientAuth button
self.copy_client_auth_button = QtWidgets.QPushButton(
strings._("gui_copy_client_auth")
@@ -176,7 +166,6 @@ class ServerStatus(QtWidgets.QWidget):
client_auth_layout = QtWidgets.QVBoxLayout()
client_auth_layout.addWidget(self.client_auth_instructions)
- client_auth_layout.addWidget(self.private_key)
client_auth_layout.addLayout(client_auth_buttons_layout)
# Add the widgets and URL/ClientAuth layouts
@@ -298,13 +287,10 @@ class ServerStatus(QtWidgets.QWidget):
if self.settings.get("general", "public"):
self.client_auth_instructions.hide()
- self.private_key.hide()
self.copy_client_auth_button.hide()
self.show_client_auth_qr_code_button.hide()
else:
self.client_auth_instructions.show()
- self.private_key.setText(self.app.auth_string)
- self.private_key.show()
self.copy_client_auth_button.show()
self.show_client_auth_qr_code_button.show()
@@ -334,7 +320,6 @@ class ServerStatus(QtWidgets.QWidget):
self.url.hide()
self.copy_url_button.hide()
self.show_url_qr_code_button.hide()
- self.private_key.hide()
self.client_auth_instructions.hide()
self.copy_client_auth_button.hide()
self.show_client_auth_qr_code_button.hide()
diff --git a/desktop/tests/gui_base_test.py b/desktop/tests/gui_base_test.py
index 83ad5fa3..6fb4fc32 100644
--- a/desktop/tests/gui_base_test.py
+++ b/desktop/tests/gui_base_test.py
@@ -282,13 +282,6 @@ class GuiBaseTest(unittest.TestCase):
"""Test that the URL instructions for sharing are showing"""
self.assertTrue(tab.get_mode().server_status.url_instructions.isVisible())
- def private_key_shown(self, tab):
- """Test that the Private Key is showing when not in public mode"""
- if not tab.settings.get("general", "public"):
- self.assertTrue(tab.get_mode().server_status.private_key.isVisible())
- else:
- self.assertFalse(tab.get_mode().server_status.private_key.isVisible())
-
def client_auth_instructions_shown(self, tab):
"""
Test that the Private Key instructions for sharing
@@ -396,14 +389,15 @@ class GuiBaseTest(unittest.TestCase):
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.url_instructions.isVisible())
- self.assertFalse(tab.get_mode().server_status.private_key.isVisible())
self.assertFalse(
tab.get_mode().server_status.client_auth_instructions.isVisible()
)
self.assertFalse(
tab.get_mode().server_status.copy_client_auth_button.isVisible()
)
-
+ self.assertFalse(
+ tab.get_mode().server_status.show_client_auth_qr_code_button.isVisible()
+ )
def web_server_is_stopped(self, tab):
"""Test that the web server also stopped"""
diff --git a/desktop/tests/test_gui_chat.py b/desktop/tests/test_gui_chat.py
index 786782f7..b3c72200 100644
--- a/desktop/tests/test_gui_chat.py
+++ b/desktop/tests/test_gui_chat.py
@@ -41,7 +41,6 @@ class TestChat(GuiBaseTest):
self.url_shown(tab)
self.have_copy_url_button(tab)
self.have_show_url_qr_code_button(tab)
- self.private_key_shown(tab)
self.client_auth_instructions_shown(tab)
self.have_show_client_auth_qr_code_button(tab)
self.server_status_indicator_says_started(tab)
diff --git a/desktop/tests/test_gui_receive.py b/desktop/tests/test_gui_receive.py
index ca69c957..8520c790 100644
--- a/desktop/tests/test_gui_receive.py
+++ b/desktop/tests/test_gui_receive.py
@@ -115,7 +115,6 @@ class TestReceive(GuiBaseTest):
self.have_copy_url_button(tab)
self.have_show_url_qr_code_button(tab)
self.client_auth_instructions_shown(tab)
- self.private_key_shown(tab)
self.have_show_client_auth_qr_code_button(tab)
self.server_status_indicator_says_started(tab)
diff --git a/desktop/tests/test_gui_share.py b/desktop/tests/test_gui_share.py
index d3536569..9cd140ec 100644
--- a/desktop/tests/test_gui_share.py
+++ b/desktop/tests/test_gui_share.py
@@ -186,7 +186,6 @@ class TestShare(GuiBaseTest):
self.url_shown(tab)
self.have_copy_url_button(tab)
self.have_show_url_qr_code_button(tab)
- self.private_key_shown(tab)
self.client_auth_instructions_shown(tab)
self.have_show_client_auth_qr_code_button(tab)
self.server_status_indicator_says_started(tab)
diff --git a/desktop/tests/test_gui_website.py b/desktop/tests/test_gui_website.py
index e736874a..52722c2f 100644
--- a/desktop/tests/test_gui_website.py
+++ b/desktop/tests/test_gui_website.py
@@ -51,7 +51,6 @@ class TestWebsite(GuiBaseTest):
self.have_copy_url_button(tab)
self.have_show_url_qr_code_button(tab)
self.client_auth_instructions_shown(tab)
- self.private_key_shown(tab)
self.have_show_client_auth_qr_code_button(tab)
self.server_status_indicator_says_started(tab)