diff --git a/gui/__main__.py b/gui/__main__.py index b956d88..32dd16a 100755 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -4737,9 +4737,76 @@ class ResumePage(Page): parent_label.setPixmap(QPixmap(icon_path)) parent_label.show() self.labels_creados.append(parent_label) + location_text = profile_1.get("location", "") + location_info = self.connection_manager.get_location_info( + location_text) + operator_name = "" + if location_info and hasattr(location_info, 'operator') and location_info.operator: + operator_name = location_info.operator.name or "" - if connection_exists: + if operator_name != 'Simplified Privacy' and operator_name != "": + text_color = "white" + if self.connection_type != "system-wide": + text_color = "black" + image_name = "browser only.png" + image_path = os.path.join(self.btn_path, image_name) + label_background = QLabel(self) + label_background.setGeometry(10, 50, 535, 460) + label_background.setPixmap(QPixmap(image_path)) + label_background.setScaledContents(True) + label_background.show() + label_background.lower() + self.labels_creados.append(label_background) + l_img = QLabel(self) + l_img.setGeometry(30, 135, 150, 150) + pixmap_loc = QPixmap(os.path.join( + self.btn_path, f"icon_{location_text}.png")) + l_img.setPixmap(pixmap_loc) + l_img.setScaledContents(True) + l_img.show() + self.labels_creados.append(l_img) + + l_name = f"{location_info.country_name}, {location_info.name}" if location_info and hasattr( + location_info, 'country_name') else "" + o_name = operator_name + n_key = location_info.operator.nostr_public_key if location_info and hasattr( + location_info, 'operator') and location_info.operator else "" + + info_txt = QTextEdit(self) + info_txt.setGeometry(190, 130, 310, 250) + info_txt.setReadOnly(True) + info_txt.setFrameStyle(QFrame.Shape.NoFrame) + info_txt.setStyleSheet( + f"background: transparent; border: none; color: {text_color}; font-size: 19px;") + info_txt.setVerticalScrollBarPolicy( + Qt.ScrollBarPolicy.ScrollBarAlwaysOff) + info_txt.setHorizontalScrollBarPolicy( + Qt.ScrollBarPolicy.ScrollBarAlwaysOff) + info_txt.setWordWrapMode( + QtGui.QTextOption.WrapMode.WrapAtWordBoundaryOrAnywhere) + info_txt.setText(f"Location: {l_name}\n\nOperator: {o_name}") + info_txt.show() + self.labels_creados.append(info_txt) + + nostr_txt = QTextEdit(self) + nostr_txt.setGeometry(30, 310, 480, 170) + nostr_txt.setReadOnly(True) + nostr_txt.setFrameStyle(QFrame.Shape.NoFrame) + nostr_txt.setStyleSheet( + f"background: transparent; border: none; color: {text_color}; font-size: 21px;") + nostr_txt.setVerticalScrollBarPolicy( + Qt.ScrollBarPolicy.ScrollBarAlwaysOff) + nostr_txt.setHorizontalScrollBarPolicy( + Qt.ScrollBarPolicy.ScrollBarAlwaysOff) + nostr_txt.setWordWrapMode( + QtGui.QTextOption.WrapMode.WrapAnywhere) + nostr_txt.setText(f"Nostr: {n_key}") + nostr_txt.show() + self.labels_creados.append(nostr_txt) + + elif connection_exists: + print('inside connection_exists') if profile_1.get("connection", "") == "system-wide": image_path = os.path.join( self.btn_path, f"wireguard_{profile_1.get('location', '')}.png") diff --git a/gui/resources/images/hdtor_md_cu.png b/gui/resources/images/hdtor_md_cu.png index 4dde890..f99e2c9 100755 Binary files a/gui/resources/images/hdtor_md_cu.png and b/gui/resources/images/hdtor_md_cu.png differ diff --git a/gui/resources/images/icon_sg_02.png b/gui/resources/images/icon_sg_02.png index 45a45ad..db1c5fb 100755 Binary files a/gui/resources/images/icon_sg_02.png and b/gui/resources/images/icon_sg_02.png differ