feat: add mobile web frontend with AudioWorklet recording
This commit is contained in:
48
web/index.html
Normal file
48
web/index.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!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>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<header>
|
||||
<h1>VoicePaste</h1>
|
||||
<div id="status" class="status disconnected">
|
||||
<span class="dot"></span>
|
||||
<span id="status-text">Connecting...</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section id="preview-section">
|
||||
<div id="preview" class="preview-box">
|
||||
<p id="preview-text" class="placeholder">Press and hold to speak</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="mic-section">
|
||||
<button id="mic-btn" disabled>
|
||||
<svg viewBox="0 0 24 24" width="48" height="48" fill="currentColor">
|
||||
<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>History</h2>
|
||||
<button id="clear-history" class="text-btn">Clear</button>
|
||||
</div>
|
||||
<ul id="history-list"></ul>
|
||||
<p id="history-empty" class="placeholder">No history yet</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user