Add 1 files
Browse files- index.html +152 -4
index.html
CHANGED
|
@@ -59,6 +59,16 @@
|
|
| 59 |
.recording-animation {
|
| 60 |
animation: pulse 1.5s infinite;
|
| 61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
</style>
|
| 63 |
</head>
|
| 64 |
<body class="bg-gray-900 text-gray-100 h-screen flex flex-col overflow-hidden">
|
|
@@ -74,10 +84,10 @@
|
|
| 74 |
<button id="theme-toggle" class="text-gray-400 hover:text-white transition-colors">
|
| 75 |
<i class="fas fa-moon"></i>
|
| 76 |
</button>
|
| 77 |
-
<button class="text-gray-400 hover:text-white transition-colors">
|
| 78 |
<i class="fas fa-cog"></i>
|
| 79 |
</button>
|
| 80 |
-
<button class="text-gray-400 hover:text-white transition-colors">
|
| 81 |
<i class="fas fa-user"></i>
|
| 82 |
</button>
|
| 83 |
</div>
|
|
@@ -164,7 +174,7 @@
|
|
| 164 |
|
| 165 |
<!-- 文件选择模态框 -->
|
| 166 |
<div id="file-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 167 |
-
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md">
|
| 168 |
<div class="flex justify-between items-center mb-4">
|
| 169 |
<h3 class="text-lg font-medium text-white">选择文件</h3>
|
| 170 |
<button id="close-file-modal" class="text-gray-400 hover:text-white">
|
|
@@ -196,7 +206,7 @@
|
|
| 196 |
|
| 197 |
<!-- 语音录制模态框 -->
|
| 198 |
<div id="voice-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 199 |
-
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md">
|
| 200 |
<div class="flex justify-between items-center mb-4">
|
| 201 |
<h3 class="text-lg font-medium text-white">语音输入</h3>
|
| 202 |
<button id="close-voice-modal" class="text-gray-400 hover:text-white">
|
|
@@ -231,6 +241,101 @@
|
|
| 231 |
</div>
|
| 232 |
</div>
|
| 233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
<script>
|
| 235 |
// 自动调整输入框高度
|
| 236 |
function autoResize(textarea) {
|
|
@@ -540,6 +645,49 @@
|
|
| 540 |
`${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
|
| 541 |
}
|
| 542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
// 辅助函数:格式化文件大小
|
| 544 |
function formatFileSize(bytes) {
|
| 545 |
if (bytes === 0) return '0 Bytes';
|
|
|
|
| 59 |
.recording-animation {
|
| 60 |
animation: pulse 1.5s infinite;
|
| 61 |
}
|
| 62 |
+
|
| 63 |
+
/* 模态框动画 */
|
| 64 |
+
@keyframes modalFadeIn {
|
| 65 |
+
from { opacity: 0; transform: translateY(-20px); }
|
| 66 |
+
to { opacity: 1; transform: translateY(0); }
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.modal-animation {
|
| 70 |
+
animation: modalFadeIn 0.3s ease-out;
|
| 71 |
+
}
|
| 72 |
</style>
|
| 73 |
</head>
|
| 74 |
<body class="bg-gray-900 text-gray-100 h-screen flex flex-col overflow-hidden">
|
|
|
|
| 84 |
<button id="theme-toggle" class="text-gray-400 hover:text-white transition-colors">
|
| 85 |
<i class="fas fa-moon"></i>
|
| 86 |
</button>
|
| 87 |
+
<button id="settings-button" class="text-gray-400 hover:text-white transition-colors">
|
| 88 |
<i class="fas fa-cog"></i>
|
| 89 |
</button>
|
| 90 |
+
<button id="user-button" class="text-gray-400 hover:text-white transition-colors">
|
| 91 |
<i class="fas fa-user"></i>
|
| 92 |
</button>
|
| 93 |
</div>
|
|
|
|
| 174 |
|
| 175 |
<!-- 文件选择模态框 -->
|
| 176 |
<div id="file-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 177 |
+
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md modal-animation">
|
| 178 |
<div class="flex justify-between items-center mb-4">
|
| 179 |
<h3 class="text-lg font-medium text-white">选择文件</h3>
|
| 180 |
<button id="close-file-modal" class="text-gray-400 hover:text-white">
|
|
|
|
| 206 |
|
| 207 |
<!-- 语音录制模态框 -->
|
| 208 |
<div id="voice-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 209 |
+
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md modal-animation">
|
| 210 |
<div class="flex justify-between items-center mb-4">
|
| 211 |
<h3 class="text-lg font-medium text-white">语音输入</h3>
|
| 212 |
<button id="close-voice-modal" class="text-gray-400 hover:text-white">
|
|
|
|
| 241 |
</div>
|
| 242 |
</div>
|
| 243 |
|
| 244 |
+
<!-- 设置模态框 -->
|
| 245 |
+
<div id="settings-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 246 |
+
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md modal-animation">
|
| 247 |
+
<div class="flex justify-between items-center mb-4">
|
| 248 |
+
<h3 class="text-lg font-medium text-white">设置</h3>
|
| 249 |
+
<button id="close-settings-modal" class="text-gray-400 hover:text-white">
|
| 250 |
+
<i class="fas fa-times"></i>
|
| 251 |
+
</button>
|
| 252 |
+
</div>
|
| 253 |
+
<div class="space-y-4">
|
| 254 |
+
<div>
|
| 255 |
+
<label class="block text-gray-300 mb-2">语言</label>
|
| 256 |
+
<select class="w-full bg-gray-700 border border-gray-600 rounded-lg py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 257 |
+
<option>简体中文</option>
|
| 258 |
+
<option>English</option>
|
| 259 |
+
<option>Español</option>
|
| 260 |
+
<option>日本語</option>
|
| 261 |
+
</select>
|
| 262 |
+
</div>
|
| 263 |
+
<div>
|
| 264 |
+
<label class="block text-gray-300 mb-2">回答长度</label>
|
| 265 |
+
<select class="w-full bg-gray-700 border border-gray-600 rounded-lg py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 266 |
+
<option>简短</option>
|
| 267 |
+
<option selected>中等</option>
|
| 268 |
+
<option>详细</option>
|
| 269 |
+
</select>
|
| 270 |
+
</div>
|
| 271 |
+
<div class="flex items-center justify-between">
|
| 272 |
+
<span class="text-gray-300">历史记录</span>
|
| 273 |
+
<label class="relative inline-flex items-center cursor-pointer">
|
| 274 |
+
<input type="checkbox" class="sr-only peer" checked>
|
| 275 |
+
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-800 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
|
| 276 |
+
</label>
|
| 277 |
+
</div>
|
| 278 |
+
<div class="flex items-center justify-between">
|
| 279 |
+
<span class="text-gray-300">阅读模式</span>
|
| 280 |
+
<label class="relative inline-flex items-center cursor-pointer">
|
| 281 |
+
<input type="checkbox" class="sr-only peer">
|
| 282 |
+
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-800 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
|
| 283 |
+
</label>
|
| 284 |
+
</div>
|
| 285 |
+
</div>
|
| 286 |
+
<div class="mt-6 flex justify-end space-x-3">
|
| 287 |
+
<button id="cancel-settings" class="px-4 py-2 rounded-lg border border-gray-600 text-gray-300 hover:bg-gray-700">
|
| 288 |
+
取消
|
| 289 |
+
</button>
|
| 290 |
+
<button id="save-settings" class="px-4 py-2 rounded-lg bg-blue-600 text-white hover:bg-blue-700">
|
| 291 |
+
保存设置
|
| 292 |
+
</button>
|
| 293 |
+
</div>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
|
| 297 |
+
<!-- 用户信息模态框 -->
|
| 298 |
+
<div id="user-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 299 |
+
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md modal-animation">
|
| 300 |
+
<div class="flex justify-between items-center mb-4">
|
| 301 |
+
<h3 class="text-lg font-medium text-white">用户信息</h3>
|
| 302 |
+
<button id="close-user-modal" class="text-gray-400 hover:text-white">
|
| 303 |
+
<i class="fas fa-times"></i>
|
| 304 |
+
</button>
|
| 305 |
+
</div>
|
| 306 |
+
<div class="flex flex-col items-center mb-6">
|
| 307 |
+
<div class="w-20 h-20 bg-blue-600 rounded-full flex items-center justify-center mb-3">
|
| 308 |
+
<i class="fas fa-user text-3xl text-white"></i>
|
| 309 |
+
</div>
|
| 310 |
+
<h4 class="text-white font-medium">访客用户</h4>
|
| 311 |
+
<p class="text-gray-400 text-sm">未登录</p>
|
| 312 |
+
</div>
|
| 313 |
+
<div class="space-y-3">
|
| 314 |
+
<button class="w-full flex items-center justify-between px-4 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors">
|
| 315 |
+
<span class="text-gray-300">登录/注册</span>
|
| 316 |
+
<i class="fas fa-chevron-right text-gray-400"></i>
|
| 317 |
+
</button>
|
| 318 |
+
<button class="w-full flex items-center justify-between px-4 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors">
|
| 319 |
+
<span class="text-gray-300">订阅计划</span>
|
| 320 |
+
<i class="fas fa-chevron-right text-gray-400"></i>
|
| 321 |
+
</button>
|
| 322 |
+
<button class="w-full flex items-center justify-between px-4 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors">
|
| 323 |
+
<span class="text-gray-300">帮助中心</span>
|
| 324 |
+
<i class="fas fa-chevron-right text-gray-400"></i>
|
| 325 |
+
</button>
|
| 326 |
+
<button class="w-full flex items-center justify-between px-4 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors">
|
| 327 |
+
<span class="text-gray-300">反馈建议</span>
|
| 328 |
+
<i class="fas fa-chevron-right text-gray-400"></i>
|
| 329 |
+
</button>
|
| 330 |
+
</div>
|
| 331 |
+
<div class="mt-6">
|
| 332 |
+
<button id="logout-button" class="w-full px-4 py-2 rounded-lg border border-gray-600 text-gray-300 hover:bg-gray-700">
|
| 333 |
+
退出登录
|
| 334 |
+
</button>
|
| 335 |
+
</div>
|
| 336 |
+
</div>
|
| 337 |
+
</div>
|
| 338 |
+
|
| 339 |
<script>
|
| 340 |
// 自动调整输入框高度
|
| 341 |
function autoResize(textarea) {
|
|
|
|
| 645 |
`${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
|
| 646 |
}
|
| 647 |
|
| 648 |
+
// 设置功能
|
| 649 |
+
const settingsModal = document.getElementById('settings-modal');
|
| 650 |
+
const settingsButton = document.getElementById('settings-button');
|
| 651 |
+
const closeSettingsModal = document.getElementById('close-settings-modal');
|
| 652 |
+
const cancelSettings = document.getElementById('cancel-settings');
|
| 653 |
+
const saveSettings = document.getElementById('save-settings');
|
| 654 |
+
|
| 655 |
+
settingsButton.addEventListener('click', () => {
|
| 656 |
+
settingsModal.classList.remove('hidden');
|
| 657 |
+
});
|
| 658 |
+
|
| 659 |
+
closeSettingsModal.addEventListener('click', () => {
|
| 660 |
+
settingsModal.classList.add('hidden');
|
| 661 |
+
});
|
| 662 |
+
|
| 663 |
+
cancelSettings.addEventListener('click', () => {
|
| 664 |
+
settingsModal.classList.add('hidden');
|
| 665 |
+
});
|
| 666 |
+
|
| 667 |
+
saveSettings.addEventListener('click', () => {
|
| 668 |
+
alert('设置已保存');
|
| 669 |
+
settingsModal.classList.add('hidden');
|
| 670 |
+
});
|
| 671 |
+
|
| 672 |
+
// 用户功能
|
| 673 |
+
const userModal = document.getElementById('user-modal');
|
| 674 |
+
const userButton = document.getElementById('user-button');
|
| 675 |
+
const closeUserModal = document.getElementById('close-user-modal');
|
| 676 |
+
const logoutButton = document.getElementById('logout-button');
|
| 677 |
+
|
| 678 |
+
userButton.addEventListener('click', () => {
|
| 679 |
+
userModal.classList.remove('hidden');
|
| 680 |
+
});
|
| 681 |
+
|
| 682 |
+
closeUserModal.addEventListener('click', () => {
|
| 683 |
+
userModal.classList.add('hidden');
|
| 684 |
+
});
|
| 685 |
+
|
| 686 |
+
logoutButton.addEventListener('click', () => {
|
| 687 |
+
alert('您已退出登录');
|
| 688 |
+
userModal.classList.add('hidden');
|
| 689 |
+
});
|
| 690 |
+
|
| 691 |
// 辅助函数:格式化文件大小
|
| 692 |
function formatFileSize(bytes) {
|
| 693 |
if (bytes === 0) return '0 Bytes';
|