mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-11 15:50:40 -04:00
Rename things with client_auth_v3_ in the name because there is only one type of client_auth now that v2 is gone.
This commit is contained in:
parent
5ed2188156
commit
d86ce6c9af
8 changed files with 60 additions and 59 deletions
|
@ -24,12 +24,12 @@
|
|||
"gui_receive_stop_server_autostop_timer": "Stop Receive Mode ({} remaining)",
|
||||
"gui_receive_flatpak_data_dir": "Because you installed OnionShare using Flatpak, you must save files to a folder in ~/OnionShare.",
|
||||
"gui_copy_url": "Copy Address",
|
||||
"gui_copy_client_auth_v3": "Copy ClientAuth",
|
||||
"gui_copy_client_auth": "Copy ClientAuth",
|
||||
"gui_canceled": "Canceled",
|
||||
"gui_copied_url_title": "Copied OnionShare Address",
|
||||
"gui_copied_url": "OnionShare address copied to clipboard",
|
||||
"gui_copied_client_auth_v3_title": "Copied ClientAuth",
|
||||
"gui_copied_client_auth_v3": "ClientAuth private key copied to clipboard",
|
||||
"gui_copied_client_auth_title": "Copied ClientAuth",
|
||||
"gui_copied_client_auth": "ClientAuth private key copied to clipboard",
|
||||
"gui_show_url_qr_code": "Show QR Code",
|
||||
"gui_qr_code_dialog_title": "OnionShare QR Code",
|
||||
"gui_waiting_to_start": "Scheduled to start in {}. Click to cancel.",
|
||||
|
@ -171,7 +171,7 @@
|
|||
"mode_settings_public_checkbox": "Don't use a password",
|
||||
"mode_settings_autostart_timer_checkbox": "Start onion service at scheduled time",
|
||||
"mode_settings_autostop_timer_checkbox": "Stop onion service at scheduled time",
|
||||
"mode_settings_client_auth_v3_checkbox": "Use client authorization",
|
||||
"mode_settings_client_auth_checkbox": "Use client authorization",
|
||||
"mode_settings_share_autostop_sharing_checkbox": "Stop sharing after files have been sent (uncheck to allow downloading individual files)",
|
||||
"mode_settings_receive_data_dir_label": "Save files to",
|
||||
"mode_settings_receive_data_dir_browse_button": "Browse",
|
||||
|
|
|
@ -130,16 +130,16 @@ class ModeSettingsWidget(QtWidgets.QWidget):
|
|||
autostop_timer_layout.addWidget(self.autostop_timer_widget)
|
||||
|
||||
# Client auth (v3)
|
||||
self.client_auth_v3_checkbox = QtWidgets.QCheckBox()
|
||||
self.client_auth_v3_checkbox.clicked.connect(self.client_auth_v3_checkbox_clicked)
|
||||
self.client_auth_v3_checkbox.clicked.connect(self.update_ui)
|
||||
self.client_auth_v3_checkbox.setText(
|
||||
strings._("mode_settings_client_auth_v3_checkbox")
|
||||
self.client_auth_checkbox = QtWidgets.QCheckBox()
|
||||
self.client_auth_checkbox.clicked.connect(self.client_auth_checkbox_clicked)
|
||||
self.client_auth_checkbox.clicked.connect(self.update_ui)
|
||||
self.client_auth_checkbox.setText(
|
||||
strings._("mode_settings_client_auth_checkbox")
|
||||
)
|
||||
if self.settings.get("general", "client_auth"):
|
||||
self.client_auth_v3_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
self.client_auth_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
else:
|
||||
self.client_auth_v3_checkbox.setCheckState(QtCore.Qt.Unchecked)
|
||||
self.client_auth_checkbox.setCheckState(QtCore.Qt.Unchecked)
|
||||
|
||||
# Toggle advanced settings
|
||||
self.toggle_advanced_button = QtWidgets.QPushButton()
|
||||
|
@ -155,7 +155,7 @@ class ModeSettingsWidget(QtWidgets.QWidget):
|
|||
advanced_layout.addLayout(title_layout)
|
||||
advanced_layout.addLayout(autostart_timer_layout)
|
||||
advanced_layout.addLayout(autostop_timer_layout)
|
||||
advanced_layout.addWidget(self.client_auth_v3_checkbox)
|
||||
advanced_layout.addWidget(self.client_auth_checkbox)
|
||||
self.advanced_widget = QtWidgets.QWidget()
|
||||
self.advanced_widget.setLayout(advanced_layout)
|
||||
self.advanced_widget.hide()
|
||||
|
@ -242,9 +242,9 @@ class ModeSettingsWidget(QtWidgets.QWidget):
|
|||
else:
|
||||
self.autostop_timer_widget.hide()
|
||||
|
||||
def client_auth_v3_checkbox_clicked(self):
|
||||
def client_auth_checkbox_clicked(self):
|
||||
self.settings.set(
|
||||
"general", "client_auth", self.client_auth_v3_checkbox.isChecked()
|
||||
"general", "client_auth", self.client_auth_checkbox.isChecked()
|
||||
)
|
||||
|
||||
def toggle_advanced_clicked(self):
|
||||
|
|
|
@ -38,7 +38,7 @@ class ServerStatus(QtWidgets.QWidget):
|
|||
server_canceled = QtCore.Signal()
|
||||
button_clicked = QtCore.Signal()
|
||||
url_copied = QtCore.Signal()
|
||||
client_auth_v3_copied = QtCore.Signal()
|
||||
client_auth_copied = QtCore.Signal()
|
||||
|
||||
STATUS_STOPPED = 0
|
||||
STATUS_WORKING = 1
|
||||
|
@ -95,8 +95,8 @@ class ServerStatus(QtWidgets.QWidget):
|
|||
self.common.gui.css["server_status_url_buttons"]
|
||||
)
|
||||
self.copy_url_button.clicked.connect(self.copy_url)
|
||||
self.copy_client_auth_v3_button = QtWidgets.QPushButton(
|
||||
strings._("gui_copy_client_auth_v3")
|
||||
self.copy_client_auth_button = QtWidgets.QPushButton(
|
||||
strings._("gui_copy_client_auth")
|
||||
)
|
||||
self.show_url_qr_code_button = QtWidgets.QPushButton(
|
||||
strings._("gui_show_url_qr_code")
|
||||
|
@ -109,14 +109,14 @@ class ServerStatus(QtWidgets.QWidget):
|
|||
self.common.gui.css["server_status_url_buttons"]
|
||||
)
|
||||
|
||||
self.copy_client_auth_v3_button.setStyleSheet(
|
||||
self.copy_client_auth_button.setStyleSheet(
|
||||
self.common.gui.css["server_status_url_buttons"]
|
||||
)
|
||||
self.copy_client_auth_v3_button.clicked.connect(self.copy_client_auth_v3)
|
||||
self.copy_client_auth_button.clicked.connect(self.copy_client_auth)
|
||||
url_buttons_layout = QtWidgets.QHBoxLayout()
|
||||
url_buttons_layout.addWidget(self.copy_url_button)
|
||||
url_buttons_layout.addWidget(self.show_url_qr_code_button)
|
||||
url_buttons_layout.addWidget(self.copy_client_auth_v3_button)
|
||||
url_buttons_layout.addWidget(self.copy_client_auth_button)
|
||||
url_buttons_layout.addStretch()
|
||||
|
||||
url_layout = QtWidgets.QVBoxLayout()
|
||||
|
@ -214,9 +214,9 @@ class ServerStatus(QtWidgets.QWidget):
|
|||
self.show_url_qr_code_button.show()
|
||||
|
||||
if self.settings.get("general", "client_auth"):
|
||||
self.copy_client_auth_v3_button.show()
|
||||
self.copy_client_auth_button.show()
|
||||
else:
|
||||
self.copy_client_auth_v3_button.hide()
|
||||
self.copy_client_auth_button.hide()
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
|
@ -246,7 +246,7 @@ class ServerStatus(QtWidgets.QWidget):
|
|||
self.url_description.hide()
|
||||
self.url.hide()
|
||||
self.copy_url_button.hide()
|
||||
self.copy_client_auth_v3_button.hide()
|
||||
self.copy_client_auth_button.hide()
|
||||
self.show_url_qr_code_button.hide()
|
||||
|
||||
self.mode_settings_widget.update_ui()
|
||||
|
@ -445,14 +445,14 @@ class ServerStatus(QtWidgets.QWidget):
|
|||
|
||||
self.url_copied.emit()
|
||||
|
||||
def copy_client_auth_v3(self):
|
||||
def copy_client_auth(self):
|
||||
"""
|
||||
Copy the ClientAuth v3 private key line to the clipboard.
|
||||
Copy the ClientAuth private key line to the clipboard.
|
||||
"""
|
||||
clipboard = self.qtapp.clipboard()
|
||||
clipboard.setText(self.app.auth_string)
|
||||
|
||||
self.client_auth_v3_copied.emit()
|
||||
self.client_auth_copied.emit()
|
||||
|
||||
def get_url(self):
|
||||
"""
|
||||
|
|
|
@ -275,7 +275,7 @@ class Tab(QtWidgets.QWidget):
|
|||
self.share_mode.start_server_finished.connect(self.clear_message)
|
||||
self.share_mode.server_status.button_clicked.connect(self.clear_message)
|
||||
self.share_mode.server_status.url_copied.connect(self.copy_url)
|
||||
self.share_mode.server_status.client_auth_v3_copied.connect(self.copy_client_auth_v3)
|
||||
self.share_mode.server_status.client_auth_copied.connect(self.copy_client_auth)
|
||||
|
||||
self.change_title.emit(self.tab_id, strings._("gui_tab_name_share"))
|
||||
|
||||
|
@ -310,8 +310,8 @@ class Tab(QtWidgets.QWidget):
|
|||
self.receive_mode.start_server_finished.connect(self.clear_message)
|
||||
self.receive_mode.server_status.button_clicked.connect(self.clear_message)
|
||||
self.receive_mode.server_status.url_copied.connect(self.copy_url)
|
||||
self.receive_mode.server_status.client_auth_v3_copied.connect(
|
||||
self.copy_client_auth_v3
|
||||
self.receive_mode.server_status.client_auth_copied.connect(
|
||||
self.copy_client_auth
|
||||
)
|
||||
|
||||
self.change_title.emit(self.tab_id, strings._("gui_tab_name_receive"))
|
||||
|
@ -347,8 +347,8 @@ class Tab(QtWidgets.QWidget):
|
|||
self.website_mode.start_server_finished.connect(self.clear_message)
|
||||
self.website_mode.server_status.button_clicked.connect(self.clear_message)
|
||||
self.website_mode.server_status.url_copied.connect(self.copy_url)
|
||||
self.website_mode.server_status.client_auth_v3_copied.connect(
|
||||
self.copy_client_auth_v3
|
||||
self.website_mode.server_status.client_auth_copied.connect(
|
||||
self.copy_client_auth
|
||||
)
|
||||
|
||||
self.change_title.emit(self.tab_id, strings._("gui_tab_name_website"))
|
||||
|
@ -382,7 +382,7 @@ class Tab(QtWidgets.QWidget):
|
|||
self.chat_mode.start_server_finished.connect(self.clear_message)
|
||||
self.chat_mode.server_status.button_clicked.connect(self.clear_message)
|
||||
self.chat_mode.server_status.url_copied.connect(self.copy_url)
|
||||
self.chat_mode.server_status.client_auth_v3_copied.connect(self.copy_client_auth_v3)
|
||||
self.chat_mode.server_status.client_auth_copied.connect(self.copy_client_auth)
|
||||
|
||||
self.change_title.emit(self.tab_id, strings._("gui_tab_name_chat"))
|
||||
|
||||
|
@ -597,14 +597,15 @@ class Tab(QtWidgets.QWidget):
|
|||
strings._("gui_copied_url_title"), strings._("gui_copied_url")
|
||||
)
|
||||
|
||||
def copy_client_auth_v3(self):
|
||||
def copy_client_auth(self):
|
||||
"""
|
||||
When the v3 onion service ClientAuth private key gets copied to the clipboard, display this in the status bar.
|
||||
When the onion service's ClientAuth private key gets copied to
|
||||
the clipboard, display this in the status bar.
|
||||
"""
|
||||
self.common.log("Tab", "copy_client_auth_v3")
|
||||
self.common.log("Tab", "copy_client_auth")
|
||||
self.system_tray.showMessage(
|
||||
strings._("gui_copied_client_auth_v3_title"),
|
||||
strings._("gui_copied_client_auth_v3"),
|
||||
strings._("gui_copied_client_auth_title"),
|
||||
strings._("gui_copied_client_auth"),
|
||||
)
|
||||
|
||||
def clear_message(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue