diff --git a/chuan-next/src/app/HomePage.tsx b/chuan-next/src/app/HomePage.tsx
index f5e160e..9c039e9 100644
--- a/chuan-next/src/app/HomePage.tsx
+++ b/chuan-next/src/app/HomePage.tsx
@@ -10,7 +10,7 @@ import TextTransferWrapper from '@/components/TextTransferWrapper';
export default function HomePage() {
const searchParams = useSearchParams();
- const [activeTab, setActiveTab] = useState('message');
+ const [activeTab, setActiveTab] = useState('webrtc');
const [hasInitialized, setHasInitialized] = useState(false);
// 根据URL参数设置初始标签(仅首次加载时)
@@ -34,7 +34,7 @@ export default function HomePage() {
console.log('切换到对应标签页:', urlType);
setActiveTab(urlType);
} else {
- console.log('没有有效的type参数,保持默认标签页');
+ console.log('没有有效的type参数,使用默认标签页:webrtc(文件传输)');
}
setHasInitialized(true);
diff --git a/chuan-next/src/components/TextTransfer.tsx b/chuan-next/src/components/TextTransfer.tsx
index f05fbb7..d5b760c 100644
--- a/chuan-next/src/components/TextTransfer.tsx
+++ b/chuan-next/src/components/TextTransfer.tsx
@@ -752,6 +752,60 @@ export default function TextTransfer({
{/* 房间信息卡片 - 类似文件传输的布局 */}
+ {/* 已发送的图片 - 移到最上面 */}
+ {mode === 'send' && sentImages.length > 0 && (
+
+
+
+ 已发送的图片 ({sentImages.length})
+
+
+ {sentImages.map((img, index) => (
+
+

setPreviewImage(img)}
+ onError={(e) => {
+ console.error('图片加载失败:', img);
+ e.currentTarget.style.display = 'none';
+ }}
+ />
+ {/* 悬浮按钮组 */}
+
+
+
+
+
+ {/* 图片序号 */}
+
+ {index + 1}
+
+
+ ))}
+
+
+ )}
+
{/* 左上角状态提示 - 类似已选择文件的风格 */}
@@ -824,60 +878,6 @@ export default function TextTransfer({
)}
-
- {/* 发送方显示已发送的图片 */}
- {mode === 'send' && sentImages.length > 0 && (
-
-
-
- 已发送的图片 ({sentImages.length})
-
-
- {sentImages.map((img, index) => (
-
-

setPreviewImage(img)}
- onError={(e) => {
- console.error('图片加载失败:', img);
- e.currentTarget.style.display = 'none';
- }}
- />
- {/* 悬浮按钮组 */}
-
-
-
-
-
- {/* 图片序号 */}
-
- {index + 1}
-
-
- ))}
-
-
- )}
) : (