mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 10:42:58 -03:00
After you start a server in a tab, you can't change legacy/client auth settings, because this would require changing the saved onion key
This commit is contained in:
parent
76d109747e
commit
de57a2ce55
2 changed files with 13 additions and 0 deletions
|
@ -185,6 +185,17 @@ class ModeSettingsWidget(QtWidgets.QWidget):
|
||||||
else:
|
else:
|
||||||
self.client_auth_checkbox.hide()
|
self.client_auth_checkbox.hide()
|
||||||
|
|
||||||
|
# If the server has been started in the past, prevent changing legacy option
|
||||||
|
if self.settings.get("onion", "private_key"):
|
||||||
|
if self.legacy_checkbox.isChecked():
|
||||||
|
# If using legacy, disable legacy and client auth options
|
||||||
|
self.legacy_checkbox.setEnabled(False)
|
||||||
|
self.client_auth_checkbox.setEnabled(False)
|
||||||
|
else:
|
||||||
|
# If using v3, hide legacy and client auth options
|
||||||
|
self.legacy_checkbox.hide()
|
||||||
|
self.client_auth_checkbox.hide()
|
||||||
|
|
||||||
def persistent_checkbox_clicked(self):
|
def persistent_checkbox_clicked(self):
|
||||||
self.settings.set("persistent", "enabled", self.persistent_checkbox.isChecked())
|
self.settings.set("persistent", "enabled", self.persistent_checkbox.isChecked())
|
||||||
self.settings.set("persistent", "mode", self.tab.mode)
|
self.settings.set("persistent", "mode", self.tab.mode)
|
||||||
|
|
|
@ -225,6 +225,8 @@ class ServerStatus(QtWidgets.QWidget):
|
||||||
self.copy_url_button.hide()
|
self.copy_url_button.hide()
|
||||||
self.copy_hidservauth_button.hide()
|
self.copy_hidservauth_button.hide()
|
||||||
|
|
||||||
|
self.mode_settings_widget.update_ui()
|
||||||
|
|
||||||
# Button
|
# Button
|
||||||
if (
|
if (
|
||||||
self.mode == self.common.gui.MODE_SHARE
|
self.mode == self.common.gui.MODE_SHARE
|
||||||
|
|
Loading…
Add table
Reference in a new issue