Add clickable web display link to main UI

Added a clickable link in the status bar that opens the web display
in the default browser. This makes it easy for users to access the
OBS browser source without manually typing the URL.

Features:
- Shows "🌐 Open Web Display" link in green
- Tooltip shows the full URL
- Opens in default browser when clicked
- Reads host/port from config automatically

Location: Status bar, after user name
URL format: http://127.0.0.1:8080 (or configured host:port)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-26 08:58:24 -08:00
parent 0ba84e6ddd
commit aa8c294fdc

View File

@@ -151,6 +151,16 @@ class MainWindow(QMainWindow):
self.user_label = QLabel(f"User: {user_name}")
status_layout.addWidget(self.user_label)
# Web display link
web_host = self.config.get('web_server.host', '127.0.0.1')
web_port = self.config.get('web_server.port', 8080)
web_url = f"http://{web_host}:{web_port}"
self.web_link = QLabel(f'<a href="{web_url}">🌐 Open Web Display</a>')
self.web_link.setOpenExternalLinks(True)
self.web_link.setToolTip(f"Click to open {web_url} in browser (for OBS)")
self.web_link.setStyleSheet("QLabel { color: #4CAF50; }")
status_layout.addWidget(self.web_link)
status_layout.addStretch()
main_layout.addWidget(status_widget)