2
2
from PySide6 .QtGui import QAction
3
3
from PySide6 .QtCore import Qt
4
4
import requests
5
+ import webbrowser
5
6
6
7
class LicenseDialog (QDialog ):
7
8
def __init__ (self , title , content , parent = None ):
@@ -54,6 +55,12 @@ def init_menu_bar(self):
54
55
github_action = QAction ("Github: https://github.com/Efeckc17" , self .main_window )
55
56
github_action .triggered .connect (self .show_github_info )
56
57
58
+ report_bug_action = QAction ("Report Bug" , self .main_window )
59
+ report_bug_action .triggered .connect (self .open_bug_report )
60
+
61
+ support_dev_action = QAction ("Support Development" , self .main_window )
62
+ support_dev_action .triggered .connect (self .open_support_page )
63
+
57
64
# Licenses submenu
58
65
licenses_menu = help_menu .addMenu ("Licenses" )
59
66
@@ -74,13 +81,27 @@ def init_menu_bar(self):
74
81
75
82
help_menu .addAction (mail_action )
76
83
help_menu .addAction (github_action )
84
+ help_menu .addAction (report_bug_action )
85
+ help_menu .addAction (support_dev_action )
77
86
78
87
def show_contact_info (self ):
79
88
QMessageBox .
information (
self .
main_window ,
"Contact" ,
"For support: [email protected] " )
80
89
81
90
def show_github_info (self ):
82
91
QMessageBox .information (self .main_window , "GitHub" , "https://github.com/Efeckc17" )
83
92
93
+ def open_bug_report (self ):
94
+ try :
95
+ webbrowser .open ("https://youtubego.org/bug-report.html" )
96
+ except Exception as e :
97
+ QMessageBox .warning (self .main_window , "Error" , f"Could not open bug report page: { str (e )} " )
98
+
99
+ def open_support_page (self ):
100
+ try :
101
+ webbrowser .open ("https://buymeacoffee.com/toxi360" )
102
+ except Exception as e :
103
+ QMessageBox .warning (self .main_window , "Error" , f"Could not open support page: { str (e )} " )
104
+
84
105
def show_youtubego_license (self ):
85
106
github_license_url = "https://raw.githubusercontent.com/Efeckc17/YoutubeGO/main/LICENSE"
86
107
try :
0 commit comments