Cloud-first UX: default to Deepgram, gate start button, add room sharing
- Change default transcription mode from local to byok (cloud/Deepgram) - Move Transcription Mode selector to top of settings for visibility - Hide local-only settings (model, VAD, timing) when cloud mode selected - Disable Start button until API key (byok) or login (managed) is configured - Add room creation and share code flow to Shared Captions section - Add POST /api/create-room endpoint to Node.js sync server - Update default sync URL placeholder to caption.shadowdao.com Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -703,6 +703,36 @@ app.post('/api/send', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Create room explicitly (no transcription needed)
|
||||
app.post('/api/create-room', async (req, res) => {
|
||||
try {
|
||||
const { room, passphrase } = req.body;
|
||||
|
||||
if (!room || !passphrase) {
|
||||
return res.status(400).json({ error: 'Missing room or passphrase' });
|
||||
}
|
||||
|
||||
// Check if room already exists
|
||||
const existing = await loadRoom(room);
|
||||
if (existing) {
|
||||
const valid = await verifyPassphrase(room, passphrase);
|
||||
if (!valid) {
|
||||
return res.status(401).json({ error: 'Room exists with different passphrase' });
|
||||
}
|
||||
return res.json({ status: 'ok', room, created: false, message: 'Room already exists' });
|
||||
}
|
||||
|
||||
// Create the room (verifyPassphrase creates it if it doesn't exist)
|
||||
await verifyPassphrase(room, passphrase);
|
||||
|
||||
console.log(`[Room] Created room "${room}"`);
|
||||
res.json({ status: 'ok', room, created: true });
|
||||
} catch (err) {
|
||||
console.error('Error in /api/create-room:', err);
|
||||
res.status(500).json({ error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
// List transcriptions
|
||||
app.get('/api/list', async (req, res) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user