feat: improve UI
This commit is contained in:
@@ -8,16 +8,25 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header class="ledlab-header">
|
||||
<h1 class="ledlab-title">SPORE LEDLab</h1>
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
|
||||
</svg>
|
||||
</button>
|
||||
</header>
|
||||
<!-- Main Navigation -->
|
||||
<div class="main-navigation">
|
||||
<div class="nav-left">
|
||||
<button class="nav-tab active" data-view="stream">📺 Stream</button>
|
||||
<button class="nav-tab" data-view="settings">⚙️ Settings</button>
|
||||
</div>
|
||||
<div class="nav-right">
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="5"/>
|
||||
<path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<main class="ledlab-main">
|
||||
<!-- Stream View -->
|
||||
<div id="stream-view" class="view-content active">
|
||||
<main class="ledlab-main">
|
||||
<!-- Matrix Display Section -->
|
||||
<section class="matrix-section">
|
||||
<div class="matrix-header">
|
||||
@@ -45,53 +54,99 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Global Controls -->
|
||||
<div class="control-group">
|
||||
<h3 class="control-group-title">Global Settings</h3>
|
||||
<div class="global-controls">
|
||||
<div class="preset-control">
|
||||
<label class="preset-label">Frame Rate (FPS)</label>
|
||||
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
||||
<input type="range" class="preset-slider" id="fps-slider" min="1" max="60" step="1" value="20">
|
||||
<span class="preset-value" id="fps-value">20</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Preset Selection -->
|
||||
<div class="control-group">
|
||||
<h3 class="control-group-title">Animation Presets</h3>
|
||||
<select class="preset-select" id="preset-select">
|
||||
<option value="">Select a preset...</option>
|
||||
</select>
|
||||
<div class="preset-selector-wrapper">
|
||||
<select class="preset-select" id="preset-select">
|
||||
<option value="">Select a preset...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="preset-controls" id="preset-controls">
|
||||
<!-- Dynamic controls will be inserted here -->
|
||||
</div>
|
||||
<div class="btn-container">
|
||||
<button class="btn" id="start-btn">Start Streaming</button>
|
||||
<button class="btn btn-secondary" id="stop-btn" disabled>Stop Streaming</button>
|
||||
<button class="btn btn-primary" id="toggle-stream-btn" data-streaming="false">
|
||||
<span class="btn-icon">▶</span>
|
||||
<span class="btn-text">Start Streaming</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Matrix Configuration -->
|
||||
<div class="control-group">
|
||||
<h3 class="control-group-title">Matrix Configuration</h3>
|
||||
<!-- Hidden Matrix Configuration (used by navigation.js) -->
|
||||
<div class="control-group" style="display: none;">
|
||||
<div class="matrix-config">
|
||||
<div class="matrix-input">
|
||||
<label for="matrix-width">Width</label>
|
||||
<input type="number" id="matrix-width" min="1" max="32" value="16">
|
||||
</div>
|
||||
<div class="matrix-input">
|
||||
<label for="matrix-height">Height</label>
|
||||
<input type="number" id="matrix-height" min="1" max="32" value="16">
|
||||
</div>
|
||||
<button class="btn btn-small" id="apply-matrix-btn">Apply</button>
|
||||
<button id="apply-matrix-btn">Apply</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- Settings View -->
|
||||
<div id="settings-view" class="view-content">
|
||||
<div class="settings-section">
|
||||
<h2>⚙️ Settings</h2>
|
||||
|
||||
<div class="settings-group">
|
||||
<h3>Matrix Configuration</h3>
|
||||
<div class="matrix-config">
|
||||
<div class="matrix-input">
|
||||
<label for="settings-matrix-width">Width</label>
|
||||
<input type="number" id="settings-matrix-width" min="1" max="32" value="16">
|
||||
</div>
|
||||
<div class="matrix-input">
|
||||
<label for="settings-matrix-height">Height</label>
|
||||
<input type="number" id="settings-matrix-height" min="1" max="32" value="16">
|
||||
</div>
|
||||
<button class="btn btn-primary" id="settings-apply-matrix-btn">Apply Changes</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manual Control -->
|
||||
<div class="control-group">
|
||||
<h3 class="control-group-title">Manual Control</h3>
|
||||
<div class="settings-group">
|
||||
<h3>Test</h3>
|
||||
<div class="btn-container">
|
||||
<button class="btn btn-secondary" id="send-test-btn">Send Test Frame</button>
|
||||
<button class="btn btn-secondary" id="clear-matrix-btn">Clear Matrix</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div class="settings-group">
|
||||
<h3>About</h3>
|
||||
<p style="color: var(--text-secondary); line-height: 1.6;">
|
||||
SPORE LEDLab is a powerful tool for streaming animations to LED matrices connected to SPORE nodes.
|
||||
Create stunning visual effects with real-time parameter control and multi-node streaming capabilities.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Load JavaScript files -->
|
||||
<script src="scripts/constants.js"></script>
|
||||
<script src="scripts/theme-manager.js"></script>
|
||||
<script src="scripts/framework.js"></script>
|
||||
<script src="scripts/navigation.js"></script>
|
||||
<script src="scripts/matrix-display.js"></script>
|
||||
<script src="scripts/preset-controls.js"></script>
|
||||
<script src="scripts/node-discovery.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user