Introduce runtime-driven UI theming for the server browser - Expose PushUITheme() in F4TServerBrowserBridge and implement ColorToJson + PushUIThemeInternal to serialize HUD colors and invoke a JS hook. - Call PushUITheme on UI initialization and when the browser is shown so the webview receives current HUD colors. - Add frontend handler for "uiTheme" in app.js and a new components/theme.js that implements window.applyCoTheme to set CSS vars and tint the cursor SVG. - Update styles.css to use RGB component CSS variables (--co-r/--co-g/--co-b and background equivalents) so colors can be overridden at runtime. - Update index.html to include the new theme script and tweak cursor SVG stroke width; cursor asset updated as well. This enables the plugin to synchronize the in-game HUD colors with the browser UI dynamically.
93 lines
3.7 KiB
HTML
93 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Commonwealth Online</title>
|
|
<link rel="stylesheet" href="./styles.css">
|
|
</head>
|
|
<body>
|
|
<div class="co-root" id="coRoot">
|
|
<div class="co-panel" id="coPanel">
|
|
<svg class="co-panel-border co-panel-border-top" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1075.97 11" preserveAspectRatio="none" aria-hidden="true">
|
|
<polyline class="co-panel-border-line" points="0 10.97 0 0 1075.97 0 1075.97 10.5"/>
|
|
</svg>
|
|
<svg class="co-panel-border co-panel-border-bottom" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1075.97 11" preserveAspectRatio="none" aria-hidden="true">
|
|
<polyline class="co-panel-border-line" points="0 0.47 0 8.91 1075.97 8.97 1075.97 0.47"/>
|
|
</svg>
|
|
|
|
<div class="co-subpanel">
|
|
<nav class="co-nav-list"></nav>
|
|
|
|
<div class="co-subpanel-content">
|
|
<div class="co-tab-content">
|
|
<div class="co-tab-pane" data-pane="direct-connect">
|
|
<header class="co-subpanel-header">
|
|
<h2 class="co-subpanel-title">Direct Connect</h2>
|
|
</header>
|
|
<div class="co-direct-connect"></div>
|
|
</div>
|
|
|
|
<div class="co-tab-pane active" data-pane="server-browser">
|
|
<header class="co-subpanel-header">
|
|
<h2 class="co-subpanel-title" id="coSubpanelTitle">Servers</h2>
|
|
<div class="co-subpanel-meta">
|
|
<span id="coConnectionStatus">Online</span>
|
|
<span class="co-count" id="coServerCount"></span>
|
|
</div>
|
|
</header>
|
|
<div class="co-filters"></div>
|
|
<div class="co-server-list-wrap">
|
|
<div class="co-server-list"></div>
|
|
<div class="co-scroll-indicator" aria-hidden="true">»»</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="co-tab-pane" data-pane="favorites">
|
|
<header class="co-subpanel-header">
|
|
<h2 class="co-subpanel-title">Favorites</h2>
|
|
</header>
|
|
<div class="co-preview-area"></div>
|
|
<div class="co-server-list-wrap">
|
|
<div class="co-server-list co-favorites-list"></div>
|
|
<div class="co-scroll-indicator" aria-hidden="true">»»</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="co-tab-pane" data-pane="recent">
|
|
<header class="co-subpanel-header">
|
|
<h2 class="co-subpanel-title">Recent</h2>
|
|
</header>
|
|
<div class="co-preview-area"></div>
|
|
<div class="co-server-list-wrap">
|
|
<div class="co-server-list co-recent-list"></div>
|
|
<div class="co-scroll-indicator" aria-hidden="true">»»</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="co-action-bar">
|
|
<div class="co-prompts"></div>
|
|
</footer>
|
|
|
|
<div class="co-join-overlay hidden" id="coJoinOverlay">
|
|
<div class="co-spinner"></div>
|
|
<p id="coJoinMessage">Connecting...</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="./components/theme.js"></script>
|
|
<script src="./components/mock-data.js"></script>
|
|
<script src="./components/tabs.js"></script>
|
|
<script src="./components/filters.js"></script>
|
|
<script src="./components/server-list.js"></script>
|
|
<script src="./components/server-details.js"></script>
|
|
<script src="./components/controller-prompts.js"></script>
|
|
<script src="./components/direct-connect.js"></script>
|
|
<script src="./app.js"></script>
|
|
</body>
|
|
</html>
|