diff --git a/public/images/background.png b/public/images/background.png new file mode 100644 index 0000000..341ffad Binary files /dev/null and b/public/images/background.png differ diff --git a/src/components/views/LceLiveView.tsx b/src/components/views/LceLiveView.tsx index 71f4647..079fb10 100644 --- a/src/components/views/LceLiveView.tsx +++ b/src/components/views/LceLiveView.tsx @@ -32,7 +32,9 @@ const LceLiveView = memo(function LceLiveView() { const [incomingReqs, setIncomingReqs] = useState([]); const [outgoingReqs, setOutgoingReqs] = useState([]); const [invites, setInvites] = useState([]); - const [linkData, setLinkData] = useState(null); + const [linkData, setLinkData] = useState( + null, + ); const [linkError, setLinkError] = useState(null); const [isHosting, setIsHosting] = useState(false); const [hostStatus, setHostStatus] = useState(""); @@ -176,7 +178,12 @@ const LceLiveView = memo(function LceLiveView() { setHostStatus(`Hosting at ${endpoint.ip}:25565`); setInvitedFriends(new Set()); } catch (e: unknown) { - const msg = e instanceof Error ? e.message : typeof e === "string" ? e : "Unknown error"; + const msg = + e instanceof Error + ? e.message + : typeof e === "string" + ? e + : "Unknown error"; setErrorModal("STUN discovery failed: " + msg); setHostStatus(""); } finally { @@ -240,7 +247,8 @@ const LceLiveView = memo(function LceLiveView() { .then(() => setHostStatus("Relay active")) .catch((relayErr: unknown) => { const relayMsg = - relayErr instanceof Error ? relayErr.message + relayErr instanceof Error + ? relayErr.message : typeof relayErr === "string" ? relayErr : "Unknown error"; @@ -248,7 +256,12 @@ const LceLiveView = memo(function LceLiveView() { setHostStatus("Relay disconnected"); }); } catch (e: unknown) { - const msg = e instanceof Error ? e.message : typeof e === "string" ? e : "Unknown error"; + const msg = + e instanceof Error + ? e.message + : typeof e === "string" + ? e + : "Unknown error"; setErrorModal("Failed to send invite: " + msg); } }; @@ -379,7 +392,11 @@ const LceLiveView = memo(function LceLiveView() { showHostMethodPicker, ]); - const tabs: ("friends" | "requests" | "invites")[] = ["friends", "requests", "invites"]; + const tabs: ("friends" | "requests" | "invites")[] = [ + "friends", + "requests", + "invites", + ]; useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (errorModal) { @@ -564,7 +581,7 @@ const LceLiveView = memo(function LceLiveView() { data-index={idx} onMouseEnter={() => setFocusIndex(idx)} onClick={btn.onClick} - className={`flex-1 h-12 flex items-center justify-center text-xl font-bold uppercase tracking-widest outline-none border-none ${isFocused ? "text-[#FFFF55] mc-text-shadow z-10 relative drop-shadow-md" : "text-white mc-text-shadow hover:text-gray-200"}`} + className={`flex-1 h-12 flex items-center justify-center text-xl font-bold uppercase tracking-widest outline-none border-none transition-all ${isFocused ? "text-[#FFFF55] mc-text-shadow scale-[1.02] z-10 relative drop-shadow-md" : "text-white mc-text-shadow hover:text-gray-200"}`} style={{ backgroundImage: isFocused ? "url('/images/button_highlighted.png')" @@ -579,11 +596,6 @@ const LceLiveView = memo(function LceLiveView() { })} )} - {hostStatus && ( -
- {hostStatus} -
- )}
@@ -747,7 +759,6 @@ const LceLiveView = memo(function LceLiveView() {
); }; - return ( (
)} -
+
{renderContent()}
@@ -804,7 +831,7 @@ const LceLiveView = memo(function LceLiveView() { src="/images/lcelive.png" alt="LCELive" className="h-5 opacity-70 cursor-pointer" - onClick={() => TauriService.openUrl('https://lcelive.co.uk')} + onClick={() => TauriService.openUrl("https://lcelive.co.uk")} />
diff --git a/src/css/index.css b/src/css/index.css index e2c28c8..0a54cd6 100644 --- a/src/css/index.css +++ b/src/css/index.css @@ -49,6 +49,7 @@ image-rendering: pixelated; position: relative; transform: translateY(2px); + transition: all 0.1s ease; } .mc-lce-tab.active { @@ -90,6 +91,7 @@ position: relative; transform: translateY(4px); z-index: 1; + transition: all 0.15s ease; min-height: 40px; background-color: rgba(0, 0, 0, 0.3); } @@ -156,10 +158,12 @@ body { } @keyframes blink-caret { - 0%, 50% { + 0%, + 50% { opacity: 1; } - 51%, 100% { + 51%, + 100% { opacity: 0; } }