Files
voicepaste/web/index.html
imbytecat d0be096165 feat: 前端迁移至 TypeScript,集成 Biome 格式化与代码检查
- app.js → app.ts:添加完整类型标注、接口定义
- audio-processor.js → audio-processor.ts:AudioWorklet 类型化
- vite.config.js → vite.config.ts
- 添加 tsconfig.json、vite-env.d.ts
- 集成 Biome 默认配置(lint + format),通过全部检查
- package.json 添加 check/typecheck 脚本
- index.html 修复无障碍问题(button type、SVG title)
2026-03-01 05:40:26 +08:00

49 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>VoicePaste</title>
</head>
<body>
<div id="app">
<header>
<h1>VoicePaste</h1>
<div id="status" class="status disconnected">
<span class="dot"></span>
<span id="status-text">连接中…</span>
</div>
</header>
<section id="preview-section">
<div id="preview" class="preview-box">
<p id="preview-text" class="placeholder">按住说话…</p>
</div>
</section>
<section id="mic-section">
<button id="mic-btn" type="button" disabled>
<svg viewBox="0 0 24 24" width="48" height="48" fill="currentColor" aria-label="麦克风" role="img">
<title>麦克风</title>
<path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"/>
<path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/>
</svg>
</button>
</section>
<section id="history-section">
<div class="history-header">
<h2>历史记录</h2>
<button id="clear-history" type="button" class="text-btn">清空</button>
</div>
<ul id="history-list"></ul>
<p id="history-empty" class="placeholder">暂无记录</p>
</section>
</div>
<script type="module" src="app.ts"></script>
</body>
</html>