Merge branch 'develop' into ci-builds

This commit is contained in:
Micah Lee 2022-05-25 21:32:17 -07:00
commit 053688c4b9
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
253 changed files with 152 additions and 44 deletions

View File

@ -10,6 +10,7 @@
body { body {
margin: 0; margin: 0;
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
background-color: #fafafa;
} }
.d-flex { .d-flex {
@ -21,15 +22,14 @@ body {
header { header {
border-bottom: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
background: #fcfcfc; background: #fff;
background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%); padding: 1rem;
padding: 0.8rem;
} }
header .logo { header .logo {
vertical-align: middle; vertical-align: middle;
width: 45px; width: 3rem;
height: 45px; height: 3rem;
} }
header h1 { header h1 {
@ -37,23 +37,26 @@ header h1 {
margin: 0 0 0 0.5rem; margin: 0 0 0 0.5rem;
vertical-align: middle; vertical-align: middle;
font-weight: normal; font-weight: normal;
font-size: 1.5rem; font-size: 1.375rem;
color: #666666; color: #333;
position: relative;
top: .125rem;
} }
header .information { header .information {
font-size: 1rem; font-size: .875rem;
} }
.button { .button {
color: #ffffff; color: #ffffff;
background-color: #4e064f; background-color: #4e064f;
padding: 10px; padding: .875rem 1rem;
border: 0; border: 0;
border-radius: 5px; border-radius: .25rem;
text-decoration: none; text-decoration: none;
margin-left: 1rem; margin-left: 1rem;
cursor: pointer; cursor: pointer;
font-weight: bold;
} }
a.button:visited { a.button:visited {
@ -102,6 +105,9 @@ ul.breadcrumbs li a:link, ul.breadcrumbs li a:visited {
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
border-collapse: collapse; border-collapse: collapse;
font-size: .875rem;
color: #333;
background-color: #fff;
} }
.file-list .heading { .file-list .heading {
@ -109,7 +115,9 @@ ul.breadcrumbs li a:link, ul.breadcrumbs li a:visited {
text-transform: uppercase; text-transform: uppercase;
font-weight: normal; font-weight: normal;
color: #666666; color: #666666;
padding: 0.5rem; padding: 0.75rem;
font-size: .75rem;
letter-spacing: .0625rem;
} }
.file-list div.d-flex { .file-list div.d-flex {
@ -119,16 +127,18 @@ ul.breadcrumbs li a:link, ul.breadcrumbs li a:visited {
.file-list div.d-flex div { .file-list div.d-flex div {
white-space: nowrap; white-space: nowrap;
padding: 0.5rem 0.8rem 0.5rem 0.8rem; padding: .625rem .75rem;
} }
.file-list div.d-flex div img { .file-list div.d-flex div img {
vertical-align: middle; vertical-align: middle;
margin-right: 0.5rem; margin-right: 0.5rem;
width: 1.25rem;
height: 1.25rem;
} }
.file-list div.d-flex div:last-child { .file-list div.d-flex div:last-child {
padding-right: 0.8rem; padding-right: 0.75rem;
flex-basis: 0; flex-basis: 0;
flex-grow: 1; flex-grow: 1;
} }
@ -146,6 +156,12 @@ ul.breadcrumbs li a:link, ul.breadcrumbs li a:visited {
} }
@media (max-width: 655px) { @media (max-width: 655px) {
.header {
padding: 0 1rem;
}
.file-list {
font-size: .9375rem;
}
.file-list div.d-flex { .file-list div.d-flex {
display: block; display: block;
} }
@ -153,17 +169,32 @@ ul.breadcrumbs li a:link, ul.breadcrumbs li a:visited {
max-width: 100%; max-width: 100%;
word-break: break-all; word-break: break-all;
white-space: normal; white-space: normal;
vertical-align: top;
} }
.file-list div.d-flex #size-header { .file-list div.d-flex #size-header {
display: none; display: none;
} }
.file-list div.d-flex div:last-child { .file-list div.d-flex div:last-child {
padding-left: 3.5rem; padding-left: 3.75rem;
font-size: 0.85rem; font-size: 0.75rem;
padding-top: 0; padding-top: 0;
margin-top: -.5rem;
color: #666;
} }
.d-flex .row div:first-of-type {
padding-bottom: 0;
}
}
@media (max-width: 500px) {
header .information { header .information {
padding: 1rem 0; width: 100%;
align-items: end;
}
.file-list div.d-flex div {
white-space: nowrap;
padding: .625rem 1rem;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -34,7 +34,7 @@
{% for info in dirs %} {% for info in dirs %}
<div class="d-flex"> <div class="d-flex">
<div> <div>
<img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" /> <img title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
<a href="{{ info.link }}"> <a href="{{ info.link }}">
<span>{{ info.basename }}</span> <span>{{ info.basename }}</span>
</a> </a>

View File

@ -551,6 +551,11 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.description_label.setWordWrap(True) self.description_label.setWordWrap(True)
# Detection preference # Detection preference
self.use_bridge = True
self.no_bridge = QtWidgets.QRadioButton(
strings._("gui_autoconnect_no_bridge")
)
self.no_bridge.toggled.connect(self._toggle_no_bridge)
self.detect_automatic_radio = QtWidgets.QRadioButton( self.detect_automatic_radio = QtWidgets.QRadioButton(
strings._("gui_autoconnect_bridge_detect_automatic") strings._("gui_autoconnect_bridge_detect_automatic")
) )
@ -560,6 +565,7 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
) )
self.detect_manual_radio.toggled.connect(self._detect_manual_toggled) self.detect_manual_radio.toggled.connect(self._detect_manual_toggled)
detect_layout = QtWidgets.QVBoxLayout() detect_layout = QtWidgets.QVBoxLayout()
detect_layout.addWidget(self.no_bridge)
detect_layout.addWidget(self.detect_automatic_radio) detect_layout.addWidget(self.detect_automatic_radio)
detect_layout.addWidget(self.detect_manual_radio) detect_layout.addWidget(self.detect_manual_radio)
@ -577,8 +583,12 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.country_combobox.setStyleSheet( self.country_combobox.setStyleSheet(
common.gui.css["autoconnect_countries_combobox"] common.gui.css["autoconnect_countries_combobox"]
) )
self.country_combobox.setIconSize(QtCore.QSize(26, 20))
for country_code in countries: for country_code in countries:
self.country_combobox.addItem(countries[country_code], country_code) icon = QtGui.QIcon(
GuiCommon.get_resource_path(os.path.join("images", "countries", f"{country_code.lower()}.png"))
)
self.country_combobox.addItem(icon, countries[country_code], country_code)
# Task label # Task label
self.task_label = QtWidgets.QLabel() self.task_label = QtWidgets.QLabel()
@ -588,18 +598,12 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
# Buttons # Buttons
self.connect_button = QtWidgets.QPushButton( self.connect_button = QtWidgets.QPushButton(
strings._("gui_autoconnect_bridge_start") strings._("gui_autoconnect_start")
) )
self.connect_button.clicked.connect(self._connect_clicked) self.connect_button.clicked.connect(self._connect_clicked)
self.connect_button.setFixedWidth(150) self.connect_button.setFixedWidth(150)
self.connect_button.setStyleSheet(common.gui.css["autoconnect_start_button"]) self.connect_button.setStyleSheet(common.gui.css["autoconnect_start_button"])
self.try_again_button = QtWidgets.QPushButton(
strings._("gui_autoconnect_try_again_without_a_bridge")
)
self.try_again_button.clicked.connect(self._try_again_clicked)
self.try_again_button.setStyleSheet(common.gui.css["autoconnect_start_button"])
self.configure_button = QtWidgets.QPushButton( self.configure_button = QtWidgets.QPushButton(
strings._("gui_autoconnect_configure") strings._("gui_autoconnect_configure")
) )
@ -628,7 +632,6 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
cta_layout = QtWidgets.QHBoxLayout() cta_layout = QtWidgets.QHBoxLayout()
cta_layout.addWidget(self.connect_button) cta_layout.addWidget(self.connect_button)
cta_layout.addWidget(self.try_again_button)
cta_layout.addWidget(self.configure_button) cta_layout.addWidget(self.configure_button)
cta_layout.addStretch() cta_layout.addStretch()
cta_widget = QtWidgets.QWidget() cta_widget = QtWidgets.QWidget()
@ -651,21 +654,24 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
def hide_buttons(self): def hide_buttons(self):
self.connect_button.hide() self.connect_button.hide()
self.try_again_button.hide()
self.configure_button.hide() self.configure_button.hide()
self.description_label.hide() self.description_label.hide()
self.error_label.hide() self.error_label.hide()
self.no_bridge.hide()
self.detect_automatic_radio.hide() self.detect_automatic_radio.hide()
self.detect_manual_radio.hide() self.detect_manual_radio.hide()
def show_buttons(self): def show_buttons(self):
self.connect_button.show() self.connect_button.show()
self.try_again_button.show()
self.description_label.show() self.description_label.show()
self.configure_button.show() self.configure_button.show()
self.no_bridge.show()
self.detect_automatic_radio.show() self.detect_automatic_radio.show()
self.detect_manual_radio.show() self.detect_manual_radio.show()
def _toggle_no_bridge(self):
self.use_bridge = not self.use_bridge
def _detect_automatic_toggled(self): def _detect_automatic_toggled(self):
self.country_combobox.setEnabled(False) self.country_combobox.setEnabled(False)
self.country_combobox.hide() self.country_combobox.hide()
@ -680,16 +686,11 @@ class AutoConnectUseBridgeWidget(QtWidgets.QWidget):
self.connection_status_label.setText( self.connection_status_label.setText(
strings._("gui_autoconnect_trying_to_connect_to_tor") strings._("gui_autoconnect_trying_to_connect_to_tor")
) )
self.connect_clicked.emit() print(self.use_bridge)
if not self.use_bridge:
def _try_again_clicked(self): self.try_again_clicked.emit()
self.connection_status_label.setText( else:
strings._("gui_autoconnect_trying_to_connect_to_tor") self.connect_clicked.emit()
)
self.country_combobox.setEnabled(False)
self.country_combobox.hide()
self.hide_buttons()
self.try_again_clicked.emit()
def _open_tor_settings(self): def _open_tor_settings(self):
self.open_tor_settings.emit() self.open_tor_settings.emit()

View File

@ -119,6 +119,9 @@ class MainWindow(QtWidgets.QMainWindow):
) )
) )
) )
sequence = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_H)
self.settings_button.setShortcut(sequence)
self.settings_button.setAccessibleName(strings._("gui_settings_window_title"))
self.settings_button.clicked.connect(self.open_settings) self.settings_button.clicked.connect(self.open_settings)
self.settings_button.setStyleSheet(self.common.gui.css["settings_button"]) self.settings_button.setStyleSheet(self.common.gui.css["settings_button"])
self.status_bar.addPermanentWidget(self.settings_button) self.status_bar.addPermanentWidget(self.settings_button)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Some files were not shown because too many files have changed in this diff Show More