Spaces:
Running
Running
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>パスワード再設定画面</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<form method="POST"> | |
<div class="container"> | |
<h2>パスワード再設定</h2> | |
<div> | |
<label for="">ユーザ名</label> | |
<input type="text" name="username" /> | |
<br /> | |
<br /> | |
<label for="">パスワード</label> | |
<input type="password" name="password" /> | |
<br /> | |
</div> | |
<div class="flex"> | |
<input | |
type="submit" | |
class="history-button" | |
id="loginButton" | |
onclick="showRecorder()" | |
value="パスワード再設定" | |
/> | |
</div> | |
</form> | |
</div> | |
<script> | |
// 会話データを表示 | |
async function displayTranscription() { | |
const transcriptionElement = document.getElementById("transcription"); | |
try { | |
// バックエンドからデータを取得(デモ用のURLを指定) | |
const response = await fetch("/api/transcription"); | |
if (!response.ok) throw new Error("データ取得に失敗しました。"); | |
const data = await response.json(); | |
// 会話内容を整形して表示 | |
const formattedText = data.conversations | |
.map((conv, index) => `【${conv.speaker}】 ${conv.text}`) | |
.join("\n"); | |
transcriptionElement.textContent = formattedText; | |
} catch (error) { | |
transcriptionElement.textContent = `エラー: ${error.message}`; | |
console.error("データ取得エラー:", error); | |
} | |
} | |
// 初期化処理 | |
displayTranscription(); | |
//画面遷移 | |
function showRecorder() { | |
// 録音画面へ遷移 | |
window.location.href = "/index"; | |
} | |
function showFeedback() { | |
// フィードバック画面へ遷移 | |
window.location.href = "/feedback"; | |
} | |
</script> | |
</body> | |
</html> | |