Add label for licenses used, in Settings

This commit is contained in:
Miguel Jacq 2025-02-16 18:13:25 +11:00
parent a46ed5b973
commit b8905e84a9
No known key found for this signature in database
GPG Key ID: 59B3F0C24135C6A9
2 changed files with 8 additions and 0 deletions

View File

@ -99,6 +99,7 @@
"gui_settings_button_help": "Help",
"gui_settings_version_label": "You are using OnionShare {}",
"gui_settings_help_label": "Need help? See <a href='https://docs.onionshare.org'>docs.onionshare.org</a>",
"gui_settings_license_label": "OnionShare is licensed under the GPL v3.<br>Third-party licenses can be viewed here:<br><a href='https://github.com/onionshare/onionshare/tree/main/licenses'>https://github.com/onionshare/onionshare/tree/main/licenses</a>",
"settings_test_success": "Connected to the Tor controller.\n\nTor version: {}\nSupports ephemeral onion services: {}.\nSupports client authentication: {}.\nSupports next-gen .onion addresses: {}.",
"connecting_to_tor": "Connecting to the Tor network",
"update_available": "New OnionShare out. <a href='{}'>Click here</a> to get it.<br><br>You are using {} and the latest is {}.",

View File

@ -126,6 +126,11 @@ class SettingsTab(QtWidgets.QWidget):
help_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
help_label.setOpenExternalLinks(True)
license_label = QtWidgets.QLabel(strings._("gui_settings_license_label"))
license_label.setAlignment(QtCore.Qt.AlignHCenter)
license_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
license_label.setOpenExternalLinks(True)
# Buttons
self.save_button = QtWidgets.QPushButton(strings._("gui_settings_button_save"))
self.save_button.clicked.connect(self.save_clicked)
@ -146,6 +151,8 @@ class SettingsTab(QtWidgets.QWidget):
layout.addWidget(version_label)
layout.addWidget(help_label)
layout.addSpacing(20)
layout.addWidget(license_label)
layout.addSpacing(20)
layout.addLayout(buttons_layout)
layout.addStretch()