2026-03-04 18:40:19 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<title>VideoCall - 连接界面</title>
|
|
|
|
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
|
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body class="h-screen w-screen flex flex-col text-white bg-grid relative">
|
2026-04-10 17:14:31 +08:00
|
|
|
|
<!-- 用户设置区域 -->
|
|
|
|
|
|
<div class="absolute top-4 right-4 z-10">
|
|
|
|
|
|
<button id="userSettingsBtn" class="flex items-center gap-2 glass px-3 py-2 rounded-full hover:bg-white/10 transition-colors">
|
|
|
|
|
|
<img id="userAvatar" src="/images/p1.png" class="w-8 h-8 rounded-full object-cover">
|
|
|
|
|
|
<span id="userName" class="text-sm font-medium">我</span>
|
|
|
|
|
|
<i class="fas fa-chevron-down text-xs text-gray-400"></i>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 设置菜单 -->
|
|
|
|
|
|
<div id="settingsMenu" class="hidden absolute top-full right-0 mt-2 glass rounded-xl shadow-lg w-48 z-20">
|
|
|
|
|
|
<div class="p-4 border-b border-white/10">
|
|
|
|
|
|
<h3 class="text-sm font-medium mb-2">个人设置</h3>
|
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<label class="block text-xs text-gray-400 mb-1">昵称</label>
|
|
|
|
|
|
<input type="text" id="nicknameInput" class="w-full bg-transparent border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="输入昵称">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<label class="block text-xs text-gray-400 mb-1">头像</label>
|
|
|
|
|
|
<div class="flex items-center gap-3">
|
|
|
|
|
|
<img id="avatarPreview" src="/images/p1.png" class="w-10 h-10 rounded-full object-cover">
|
|
|
|
|
|
<input type="file" id="avatarInput" accept="image/*" class="hidden" onchange="handleAvatarUpload(event)">
|
|
|
|
|
|
<button onclick="document.getElementById('avatarInput').click()" class="text-xs text-indigo-400 hover:text-indigo-300 transition-colors">更换头像</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<label class="block text-xs text-gray-400 mb-1">用户ID</label>
|
|
|
|
|
|
<div class="flex items-center gap-2">
|
2026-04-10 17:50:50 +08:00
|
|
|
|
<input type="text" id="userIdInput" class="w-full bg-transparent border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500" readonly>
|
2026-04-10 17:14:31 +08:00
|
|
|
|
<button onclick="copyUserId()" class="text-xs text-indigo-400 hover:text-indigo-300 transition-colors">复制</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="p-2">
|
|
|
|
|
|
<button onclick="saveSettings()" class="w-full px-4 py-2 text-sm text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg transition-colors">保存设置</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-03-04 18:40:19 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
============================================================
|
|
|
|
|
|
初始连接界面
|
|
|
|
|
|
============================================================
|
|
|
|
|
|
-->
|
|
|
|
|
|
<div class="h-full w-full flex items-center justify-center bg-black/90">
|
|
|
|
|
|
<div class="text-center max-w-md px-8">
|
|
|
|
|
|
<div class="w-24 h-24 bg-gradient-to-br from-indigo-500 to-purple-600 rounded-full flex items-center justify-center mx-auto mb-8 shadow-lg">
|
|
|
|
|
|
<i class="fas fa-video text-white text-4xl"></i>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h1 class="text-3xl font-bold text-white mb-2">VideoCall</h1>
|
|
|
|
|
|
<p class="text-gray-400 mb-8">一对一视频通话</p>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="space-y-4 mb-8">
|
|
|
|
|
|
<div class="glass rounded-xl p-4">
|
|
|
|
|
|
<label class="block text-sm font-medium text-gray-300 mb-2">连接ID</label>
|
|
|
|
|
|
<input type="text"
|
|
|
|
|
|
id="connectionIdInput"
|
|
|
|
|
|
placeholder="输入连接ID"
|
|
|
|
|
|
class="w-full bg-transparent border border-white/20 rounded-lg px-4 py-3 text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500"
|
|
|
|
|
|
autocomplete="off">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="text-xs text-gray-500">
|
|
|
|
|
|
连接ID是用于建立点对点通话的唯一标识,由发起方生成并分享给接收方。
|
|
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-03-04 21:44:17 +08:00
|
|
|
|
<div class="flex flex-col sm:flex-row gap-4 justify-center mb-6">
|
2026-03-04 18:40:19 +08:00
|
|
|
|
<button id="connectBtn" class="flex-1 px-6 py-3 bg-indigo-600 hover:bg-indigo-700 rounded-xl transition-colors flex items-center justify-center gap-2">
|
|
|
|
|
|
<i class="fas fa-phone"></i>
|
|
|
|
|
|
<span>加入通话</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button id="createCallBtn" class="flex-1 px-6 py-3 glass hover:bg-white/10 rounded-xl transition-colors flex items-center justify-center gap-2">
|
|
|
|
|
|
<i class="fas fa-plus"></i>
|
|
|
|
|
|
<span>创建通话</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2026-03-04 21:44:17 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 浏览全部ID按钮 -->
|
|
|
|
|
|
<button id="browseIdsBtn" class="w-full px-6 py-3 glass hover:bg-white/10 rounded-xl transition-colors flex items-center justify-center gap-2 mb-4">
|
|
|
|
|
|
<i class="fas fa-list"></i>
|
|
|
|
|
|
<span>浏览全部ID</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 连接ID列表 -->
|
|
|
|
|
|
<div id="connectionIdsList" class="glass rounded-xl p-4 mb-6 hidden">
|
|
|
|
|
|
<h3 class="text-sm font-medium text-gray-300 mb-2">可用的连接ID</h3>
|
|
|
|
|
|
<div id="idsContainer" class="max-h-40 overflow-y-auto space-y-2">
|
|
|
|
|
|
<!-- 连接ID将在这里动态生成 -->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-03-04 18:40:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 通知组件 -->
|
|
|
|
|
|
<div id="notification" class="fixed top-20 left-1/2 transform -translate-x-1/2 glass px-6 py-3 rounded-full flex items-center gap-3 opacity-0 pointer-events-none transition-all duration-300 z-50 translate-y-[-20px]">
|
|
|
|
|
|
<i class="fas fa-info-circle text-indigo-400"></i>
|
|
|
|
|
|
<span class="text-sm" id="notificationText">通知内容</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 引入模块化JavaScript文件 -->
|
|
|
|
|
|
<script type="module" src="connect.js"></script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|