209 lines
6.3 KiB
HTML
209 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>InsightFlow - 知识工作台</title>
|
|
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #0a0a0a;
|
|
color: #e0e0e0;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
.header {
|
|
height: 50px;
|
|
background: #111;
|
|
border-bottom: 1px solid #222;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 20px;
|
|
justify-content: space-between;
|
|
}
|
|
.header h1 {
|
|
font-size: 1.2rem;
|
|
background: linear-gradient(90deg, #00d4ff, #7b2cbf);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
.main {
|
|
display: flex;
|
|
height: calc(100vh - 50px);
|
|
}
|
|
.editor-panel {
|
|
width: 50%;
|
|
border-right: 1px solid #222;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.panel-header {
|
|
padding: 12px 20px;
|
|
background: #141414;
|
|
border-bottom: 1px solid #222;
|
|
font-size: 0.9rem;
|
|
color: #888;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
.transcript-content {
|
|
flex: 1;
|
|
padding: 20px;
|
|
overflow-y: auto;
|
|
line-height: 1.8;
|
|
font-size: 1rem;
|
|
}
|
|
.segment {
|
|
margin-bottom: 16px;
|
|
padding: 12px;
|
|
background: #141414;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.segment:hover {
|
|
background: #1a1a1a;
|
|
}
|
|
.speaker {
|
|
color: #00d4ff;
|
|
font-weight: 600;
|
|
font-size: 0.85rem;
|
|
margin-bottom: 4px;
|
|
}
|
|
.segment-text {
|
|
color: #e0e0e0;
|
|
}
|
|
.entity {
|
|
background: rgba(123, 44, 191, 0.3);
|
|
border-bottom: 2px solid #7b2cbf;
|
|
padding: 0 4px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
.entity:hover {
|
|
background: rgba(123, 44, 191, 0.5);
|
|
}
|
|
.graph-panel {
|
|
width: 50%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
#graph-svg {
|
|
flex: 1;
|
|
background: #0a0a0a;
|
|
}
|
|
.entity-list {
|
|
height: 200px;
|
|
border-top: 1px solid #222;
|
|
background: #111;
|
|
padding: 16px;
|
|
overflow-y: auto;
|
|
}
|
|
.entity-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
background: #1a1a1a;
|
|
border-radius: 6px;
|
|
margin-bottom: 8px;
|
|
cursor: pointer;
|
|
}
|
|
.entity-item:hover {
|
|
background: #222;
|
|
}
|
|
.entity-type-badge {
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
margin-right: 12px;
|
|
text-transform: uppercase;
|
|
}
|
|
.type-project { background: #7b2cbf; }
|
|
.type-tech { background: #00d4ff; color: #000; }
|
|
.type-person { background: #ff6b6b; }
|
|
.type-org { background: #4ecdc4; color: #000; }
|
|
.type-other { background: #666; }
|
|
.upload-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0,0,0,0.95);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 2000;
|
|
}
|
|
.upload-box {
|
|
border: 2px dashed #333;
|
|
border-radius: 16px;
|
|
padding: 60px;
|
|
text-align: center;
|
|
}
|
|
.upload-box:hover {
|
|
border-color: #00d4ff;
|
|
}
|
|
.btn {
|
|
background: linear-gradient(90deg, #00d4ff, #7b2cbf);
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 32px;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
margin-top: 20px;
|
|
}
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
.hidden { display: none !important; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h1>InsightFlow 知识工作台</h1>
|
|
<span style="color:#666;font-size:0.85rem;">连接音频与知识图谱</span>
|
|
</div>
|
|
|
|
<div class="main">
|
|
<div class="editor-panel">
|
|
<div class="panel-header">
|
|
<span>📄 转录文本</span>
|
|
<span style="font-size:0.8rem;color:#666;">点击实体高亮</span>
|
|
</div>
|
|
<div class="transcript-content" id="transcriptContent">
|
|
<p style="color:#666;text-align:center;margin-top:40px;">请上传音频文件开始分析</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="graph-panel">
|
|
<div class="panel-header">
|
|
<span>🔗 知识图谱</span>
|
|
<span style="font-size:0.8rem;color:#666;">拖拽节点查看关系</span>
|
|
</div>
|
|
<svg id="graph-svg"></svg>
|
|
<div class="entity-list" id="entityList">
|
|
<h3 style="margin-bottom:12px;color:#888;font-size:0.9rem;">项目实体</h3>
|
|
<p style="color:#666;font-size:0.85rem;">暂无实体数据</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="upload-overlay" id="uploadOverlay">
|
|
<div class="upload-box"
|
|
<h2 style="margin-bottom:10px;">上传音频开始分析</h2>
|
|
<p style="color:#666;">支持 MP3, WAV, M4A (最大 500MB)</p>
|
|
<input type="file" id="fileInput" accept="audio/*" hidden>
|
|
<button class="btn" onclick="document.getElementById('fileInput').click()">选择文件</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|