Skip to content

Commit

Permalink
add browser popup log.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-X-Net committed Aug 27, 2023
1 parent d5bf601 commit 2dc1837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/default/launcher/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def main():
if has_desktop and config.popup_webui == 1 and not restart_from_except and not no_popup:
host_port = config.control_port
import webbrowser
webbrowser.open("http://localhost:%s/" % host_port)
url = "http://localhost:%s/" % host_port
xlog.debug("Popup %s on startup", url)
webbrowser.open(url)

if has_desktop:
download_modules.start_download()
Expand Down
4 changes: 3 additions & 1 deletion code/default/launcher/win_tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def on_disable_proxy(self, widget=None, data=None):

def show_control_web(self, widget=None, data=None):
host_port = config.control_port
webbrowser.open("http://127.0.0.1:%s/" % host_port)
url = "http://127.0.0.1:%s/" % host_port
xlog.debug("Popup %s by tray", url)
webbrowser.open(url)
ctypes.windll.user32.ShowWindow(ctypes.windll.kernel32.GetConsoleWindow(), 0)

def on_quit(self, widget=None, data=None):
Expand Down

0 comments on commit 2dc1837

Please sign in to comment.