mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-14 13:41:25 -05:00
Merge branch 'persistent_url_label_tooltip' of https://github.com/mig5/onionshare into mig5-persistent_url_label_tooltip
This commit is contained in:
commit
f213769f89
@ -140,16 +140,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
# Status bar, zip progress bar
|
# Status bar, zip progress bar
|
||||||
self._zip_progress_bar = None
|
self._zip_progress_bar = None
|
||||||
|
|
||||||
# Persistent URL notification
|
|
||||||
self.persistent_url_label = QtWidgets.QLabel(strings._('persistent_url_in_use', True))
|
|
||||||
self.persistent_url_label.setStyleSheet('font-weight: bold; color: #333333;')
|
|
||||||
self.persistent_url_label.hide()
|
|
||||||
|
|
||||||
# Primary action layout
|
# Primary action layout
|
||||||
primary_action_layout = QtWidgets.QVBoxLayout()
|
primary_action_layout = QtWidgets.QVBoxLayout()
|
||||||
primary_action_layout.addWidget(self.server_status)
|
primary_action_layout.addWidget(self.server_status)
|
||||||
primary_action_layout.addWidget(self.filesize_warning)
|
primary_action_layout.addWidget(self.filesize_warning)
|
||||||
primary_action_layout.addWidget(self.persistent_url_label)
|
|
||||||
primary_action_layout.addWidget(self.downloads_container)
|
primary_action_layout.addWidget(self.downloads_container)
|
||||||
self.primary_action = QtWidgets.QWidget()
|
self.primary_action = QtWidgets.QWidget()
|
||||||
self.primary_action.setLayout(primary_action_layout)
|
self.primary_action.setLayout(primary_action_layout)
|
||||||
@ -409,9 +403,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
self.stop_server()
|
self.stop_server()
|
||||||
self.start_server_error(strings._('gui_server_started_after_timeout'))
|
self.start_server_error(strings._('gui_server_started_after_timeout'))
|
||||||
|
|
||||||
if self.settings.get('save_private_key'):
|
|
||||||
self.persistent_url_label.show()
|
|
||||||
|
|
||||||
def start_server_error(self, error):
|
def start_server_error(self, error):
|
||||||
"""
|
"""
|
||||||
If there's an error when trying to start the onion service
|
If there's an error when trying to start the onion service
|
||||||
@ -443,7 +434,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
# Remove ephemeral service, but don't disconnect from Tor
|
# Remove ephemeral service, but don't disconnect from Tor
|
||||||
self.onion.cleanup(stop_tor=False)
|
self.onion.cleanup(stop_tor=False)
|
||||||
self.filesize_warning.hide()
|
self.filesize_warning.hide()
|
||||||
self.persistent_url_label.hide()
|
|
||||||
self.stop_server_finished.emit()
|
self.stop_server_finished.emit()
|
||||||
|
|
||||||
self.set_server_active(False)
|
self.set_server_active(False)
|
||||||
|
@ -145,10 +145,15 @@ class ServerStatus(QtWidgets.QWidget):
|
|||||||
if self.status == self.STATUS_STARTED:
|
if self.status == self.STATUS_STARTED:
|
||||||
self.url_description.show()
|
self.url_description.show()
|
||||||
|
|
||||||
if self.settings.get('close_after_first_download'):
|
if self.settings.get('save_private_key'):
|
||||||
|
self.url_label.setText(strings._('gui_url_label_persistent', True))
|
||||||
|
self.url_label.setToolTip(strings._('gui_url_persistence_warning', True))
|
||||||
|
elif self.settings.get('close_after_first_download'):
|
||||||
self.url_label.setText(strings._('gui_url_label_one_time', True))
|
self.url_label.setText(strings._('gui_url_label_one_time', True))
|
||||||
|
self.url_label.setToolTip('')
|
||||||
else:
|
else:
|
||||||
self.url_label.setText(strings._('gui_url_label', True))
|
self.url_label.setText(strings._('gui_url_label', True))
|
||||||
|
self.url_label.setToolTip('')
|
||||||
self.url_label.show()
|
self.url_label.show()
|
||||||
|
|
||||||
self.url.setText('http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug))
|
self.url.setText('http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug))
|
||||||
|
@ -133,10 +133,11 @@
|
|||||||
"gui_server_timeout_expired": "The chosen timeout has already expired.\nPlease update the timeout and then you may start sharing.",
|
"gui_server_timeout_expired": "The chosen timeout has already expired.\nPlease update the timeout and then you may start sharing.",
|
||||||
"share_via_onionshare": "Share via OnionShare",
|
"share_via_onionshare": "Share via OnionShare",
|
||||||
"gui_save_private_key_checkbox": "Use a persistent address\n(unchecking will delete any saved address)",
|
"gui_save_private_key_checkbox": "Use a persistent address\n(unchecking will delete any saved address)",
|
||||||
"persistent_url_in_use": "This share is using a persistent address",
|
|
||||||
"gui_url_description": "<b>Anyone</b> with this link can <b>download</b> your files using <b>Tor Browser</b>:",
|
"gui_url_description": "<b>Anyone</b> with this link can <b>download</b> your files using <b>Tor Browser</b>:",
|
||||||
"gui_url_label": "Your Download Address",
|
"gui_url_label": "Your Download Address",
|
||||||
|
"gui_url_label_persistent": "Your <strong>Persistent</strong> Download Address <em>(what's this?)</em>",
|
||||||
"gui_url_label_one_time": "Your One-Time Download Address",
|
"gui_url_label_one_time": "Your One-Time Download Address",
|
||||||
|
"gui_url_persistence_warning": "Every share will have the same URL.<br><br>If you want to go back to using one-time URLs, turn off persistence in the Settings.",
|
||||||
"gui_status_indicator_stopped": "Ready to Share",
|
"gui_status_indicator_stopped": "Ready to Share",
|
||||||
"gui_status_indicator_working": "Starting...",
|
"gui_status_indicator_working": "Starting...",
|
||||||
"gui_status_indicator_started": "Sharing"
|
"gui_status_indicator_started": "Sharing"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user