refactor: 整理和优化代码
This commit is contained in:
@@ -144,8 +144,8 @@ button.disabled:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 选择器容器 */
|
/* 选择器容器 */
|
||||||
.resolution-selector,
|
.resolution-config,
|
||||||
.display-mode-selector {
|
.display-mode-config {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|||||||
1198
assets/main.js
1198
assets/main.js
File diff suppressed because it is too large
Load Diff
25
index.html
25
index.html
@@ -19,30 +19,23 @@
|
|||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button id="connect-button">连接设备</button>
|
<button id="connect-button">连接设备</button>
|
||||||
<button id="disconnect-button">断开连接</button>
|
<button id="disconnect-button">断开连接</button>
|
||||||
<button id="start-button">开始发送</button>
|
<button id="start-button">开始渲染</button>
|
||||||
<button id="stop-button">停止发送</button>
|
<button id="stop-button">停止渲染</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 配置 -->
|
<!-- 配置 -->
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
|
|
||||||
<!-- 分辨率 -->
|
<!-- 分辨率 -->
|
||||||
<div class="resolution-selector">
|
<div class="resolution-config">
|
||||||
<label for="resolution">分辨率:</label>
|
<label for="resolution-selector">分辨率:</label>
|
||||||
<select id="resolution">
|
<select id="resolution-selector"></select>
|
||||||
<option value="160x80" selected>160x80</option>
|
|
||||||
<option value="320x172">320x172</option>
|
|
||||||
<option value="320x240">320x240</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 显示模式 -->
|
<!-- 显示模式 -->
|
||||||
<div class="display-mode-selector">
|
<div class="display-mode-config">
|
||||||
<label for="display-mode">显示模式:</label>
|
<label for="display-mode-selector">显示模式:</label>
|
||||||
<select id="display-mode">
|
<select id="display-mode-selector"></select>
|
||||||
<option value="data" selected>文本数据</option>
|
|
||||||
<option value="spectrum">频谱分析</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +44,7 @@
|
|||||||
|
|
||||||
<!-- 画布容器 -->
|
<!-- 画布容器 -->
|
||||||
<div class="canvas-container">
|
<div class="canvas-container">
|
||||||
<canvas id="canvas-element" width="320" height="240"></canvas>
|
<canvas id="canvas-element"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user