Update index.html
Browse files- index.html +9 -3
index.html
CHANGED
|
@@ -591,6 +591,9 @@
|
|
| 591 |
return `https://api.qrserver.com/v1/create-qr-code/?size=${size}&data=${encodeURIComponent(fullUrl)}`;
|
| 592 |
};
|
| 593 |
|
|
|
|
|
|
|
|
|
|
| 594 |
// Filter data by room
|
| 595 |
const filteredData = useMemo(() => {
|
| 596 |
if (!roomCode) return []; // Show nothing if no room created (or show all? let's show room specific)
|
|
@@ -638,11 +641,14 @@
|
|
| 638 |
</button>
|
| 639 |
<h3 className="text-2xl font-bold text-slate-800 mb-2">加入房間</h3>
|
| 640 |
<div className="text-6xl font-mono font-bold text-amber-600 tracking-widest mb-6 select-all">{roomCode}</div>
|
| 641 |
-
<div className="bg-white p-2 rounded-xl inline-block border-4 border-slate-100 mb-4">
|
| 642 |
-
<
|
|
|
|
|
|
|
| 643 |
</div>
|
| 644 |
<p className="text-slate-500 font-bold">請學生掃描 QR Code 或輸入上方代碼</p>
|
| 645 |
-
<div className="text-
|
|
|
|
| 646 |
</div>
|
| 647 |
</div>
|
| 648 |
)}
|
|
|
|
| 591 |
return `https://api.qrserver.com/v1/create-qr-code/?size=${size}&data=${encodeURIComponent(fullUrl)}`;
|
| 592 |
};
|
| 593 |
|
| 594 |
+
// 計算完整的房間連結網址
|
| 595 |
+
const fullRoomUrl = `${window.location.origin}${window.location.pathname}?room=${roomCode}`;
|
| 596 |
+
|
| 597 |
// Filter data by room
|
| 598 |
const filteredData = useMemo(() => {
|
| 599 |
if (!roomCode) return []; // Show nothing if no room created (or show all? let's show room specific)
|
|
|
|
| 641 |
</button>
|
| 642 |
<h3 className="text-2xl font-bold text-slate-800 mb-2">加入房間</h3>
|
| 643 |
<div className="text-6xl font-mono font-bold text-amber-600 tracking-widest mb-6 select-all">{roomCode}</div>
|
| 644 |
+
<div className="bg-white p-2 rounded-xl inline-block border-4 border-slate-100 mb-4 hover:border-amber-200 transition-colors shadow-inner">
|
| 645 |
+
<a href={fullRoomUrl} target="_blank" rel="noopener noreferrer" title="點擊開啟連結">
|
| 646 |
+
<img src={getQrUrl("500x500")} alt="Large Room QR" className="w-full max-w-[400px] h-auto aspect-square object-contain cursor-pointer hover:opacity-95 transition-opacity" />
|
| 647 |
+
</a>
|
| 648 |
</div>
|
| 649 |
<p className="text-slate-500 font-bold">請學生掃描 QR Code 或輸入上方代碼</p>
|
| 650 |
+
<div className="text-blue-500 text-sm mt-1 font-bold">(點擊 QR Code 可直接進入房間)</div>
|
| 651 |
+
<div className="text-slate-400 text-xs mt-4">點擊背景關閉</div>
|
| 652 |
</div>
|
| 653 |
</div>
|
| 654 |
)}
|