diff --git a/web/src/landing.css b/web/src/landing.css index c086b7d..0160a56 100644 --- a/web/src/landing.css +++ b/web/src/landing.css @@ -71,3 +71,19 @@ /* Edge-to-edge Android display overlays */ .phone-android{padding:5px}.phone-android .phone-sensor{position:absolute;z-index:6;top:10px;left:50%;width:auto;height:auto;transform:translateX(-50%)}.phone-android .phone-sensor span{width:8px;height:8px;background:#020405;box-shadow:0 0 0 1px #000,0 1px 3px #000,inset 0 0 0 2px #142933}.phone-android .phone-sensor span:after{width:2px;height:2px;margin:3px;background:#338db2}.phone-android .phone-home{z-index:6;bottom:9px;width:28%;height:3px;background:#d6e1e599;filter:drop-shadow(0 1px 1px #000)}.screens .phone-android img{border-radius:12px!important} @media(max-width:600px){.phone-android{padding:4px}.phone-android .phone-sensor{top:7px}.phone-android .phone-sensor span{width:6px;height:6px}.phone-android .phone-sensor span:after{width:2px;height:2px;margin:2px}.phone-android .phone-home{bottom:6px;height:2px}.screens .phone-android img{border-radius:9px!important}} + +/* Animated three-step connection */ +.quick-connect{border-bottom:1px solid #ffffff0d}.connect-layout{display:grid;grid-template-columns:.8fr 1.2fr;gap:34px;align-items:stretch}.connect-steps{display:flex;flex-direction:column;gap:10px}.connect-steps article{display:flex;align-items:center;gap:18px;flex:1;padding:20px 22px;background:#0a161e;border:1px solid #ffffff0f;border-radius:12px}.connect-steps article>span{color:#35cff8;font:700 11px Inter,sans-serif}.connect-steps article div{display:flex;flex-direction:column;gap:6px}.connect-steps strong{font-size:14px}.connect-steps small{color:#718792;line-height:1.5}.connect-demo{position:relative;padding:24px;background:linear-gradient(145deg,#0e1e28,#071119);border:1px solid #42d8fa35;border-radius:16px;box-shadow:0 28px 70px #0007;overflow:hidden}.connect-demo:after{content:"";position:absolute;width:260px;height:260px;right:-120px;bottom:-150px;border-radius:50%;background:#25cdf617}.demo-window-bar{display:flex;align-items:center;gap:6px;margin:-6px 0 24px;color:#607884;font-size:10px}.demo-window-bar i{width:7px;height:7px;border-radius:50%;background:#314650}.demo-window-bar span{margin-left:7px}.connect-demo label{position:relative;z-index:1;display:block;margin-top:13px}.connect-demo label small{display:block;margin-bottom:7px;color:#718995;font-size:10px;text-transform:uppercase;letter-spacing:.1em}.fake-input{height:48px;display:flex;align-items:center;padding:0 14px;background:#050b10;border:1px solid #ffffff15;border-radius:9px;color:#c9d8df;font:500 13px ui-monospace,SFMono-Regular,Consolas,monospace;overflow:hidden}.typed-server{display:block;width:0;white-space:nowrap;overflow:hidden}.is-visible .typed-server{animation:type-server 9s 1s steps(19,end) infinite}.fake-input b{width:1px;height:19px;background:#48d7fa;animation:input-caret .75s step-end infinite}.connect-demo>button{position:relative;z-index:1;width:100%;height:46px;margin-top:17px;border:0;border-radius:9px;background:#26c6f3;color:#04141b;font-weight:800;cursor:pointer}.connect-demo>button span{margin-left:12px}.is-visible .connect-demo>button{animation:connect-button 9s 1s infinite}.connect-progress{position:relative;z-index:1;height:22px;display:flex;align-items:center;justify-content:center;margin-top:14px;color:#78909b;font-size:11px}.connect-progress i{width:6px;height:6px;margin-right:8px;border-radius:50%;background:#38d89e;box-shadow:0 0 10px #38d89e}.connect-progress span{position:absolute}.progress-connected{color:#53dda9;opacity:0}.is-visible .progress-connecting{animation:connecting-text 9s 1s infinite}.is-visible .progress-connected{animation:connected-text 9s 1s infinite}@keyframes type-server{0%,8%{width:0}34%,78%{width:19ch}88%,100%{width:0}}@keyframes input-caret{50%{opacity:0}}@keyframes connect-button{0%,38%{box-shadow:none;transform:none}43%{box-shadow:0 0 0 5px #29cbf21c;transform:translateY(1px)}48%,100%{box-shadow:none;transform:none}}@keyframes connecting-text{0%,48%{opacity:1}53%,100%{opacity:0}}@keyframes connected-text{0%,50%{opacity:0}55%,82%{opacity:1}88%,100%{opacity:0}} + +/* Live public GitHub stats */ +.github-live{padding:90px 0;background:linear-gradient(110deg,#07131b,#0a202a);border-block:1px solid #ffffff0d}.github-inner{display:grid;grid-template-columns:.8fr 1.2fr;gap:70px;align-items:center}.github-copy h2{font:600 clamp(32px,3.5vw,46px)/1.08 Inter,sans-serif;letter-spacing:-.04em;margin:13px 0}.github-copy p{color:#8196a2;line-height:1.7}.github-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.github-metrics article{min-height:155px;display:flex;flex-direction:column;justify-content:center;padding:22px;background:#08141c;border:1px solid #ffffff10;border-radius:13px}.github-metrics article>span{color:#35d0f8;font-size:16px}.github-metrics strong{margin:12px 0 6px;color:#e4f0f5;font-size:23px}.github-metrics small{color:#718792;font-size:10px;text-transform:uppercase;letter-spacing:.08em} + +/* Install method switcher */ +.install-tabs{width:min(700px,100%);display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:24px auto 8px;padding:5px;background:#050b10;border:1px solid #ffffff12;border-radius:11px}.install-tabs button{padding:10px 8px;border:0;border-radius:7px;background:transparent;color:#708792;font:700 11px Inter,sans-serif;cursor:pointer}.install-tabs button:hover{color:#d5e6ed}.install-tabs button.active{color:#53d9fb;background:#1bc8f216;box-shadow:inset 0 0 0 1px #3ed7fa2a}.command code{white-space:pre-wrap;overflow-wrap:anywhere} + +/* Browser compatibility */ +.browser-check{border-top:1px solid #ffffff0d}.browser-table{border:1px solid #ffffff10;border-radius:14px;overflow:hidden}.browser-table article{display:grid;grid-template-columns:44px 1fr 160px 1.4fr;align-items:center;gap:16px;min-height:78px;padding:14px 20px;background:#0a151d;border-bottom:1px solid #ffffff0d}.browser-table article:last-child{border-bottom:0}.browser-logo{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;color:#061117;font-weight:900;background:linear-gradient(145deg,#38d5fa,#38da9c)}.browser-1{background:linear-gradient(145deg,#f5c84d,#ec6a42)}.browser-2{background:linear-gradient(145deg,#9272ff,#4a9df5)}.browser-3{background:linear-gradient(145deg,#55dafa,#4c7fff)}.browser-table strong{font-size:14px}.browser-table b{justify-self:start;padding:6px 9px;border-radius:99px;background:#35d29b12;color:#53dca8;font-size:10px}.browser-table article:last-child b{background:#f2b84a12;color:#efc469}.browser-table small{color:#718792;line-height:1.45} + +@media(max-width:900px){.connect-layout,.github-inner{grid-template-columns:1fr}.github-inner{gap:35px}.github-metrics{grid-template-columns:repeat(3,1fr)}.browser-table article{grid-template-columns:44px 1fr 130px}.browser-table small{grid-column:2/-1}} +@media(max-width:600px){.connect-layout{gap:18px}.connect-demo{padding:18px}.github-live{padding:70px 0}.github-metrics{grid-template-columns:1fr}.github-metrics article{min-height:110px}.install-tabs{grid-template-columns:1fr 1fr}.browser-table article{grid-template-columns:38px 1fr;gap:10px;padding:16px}.browser-table b{grid-column:2}.browser-table small{grid-column:2}} +@media(prefers-reduced-motion:reduce){.typed-server{width:19ch}.is-visible .typed-server,.fake-input b,.is-visible .connect-demo>button,.is-visible .progress-connecting,.is-visible .progress-connected{animation:none}.progress-connecting{display:none}.progress-connected{opacity:1}} diff --git a/web/src/landing.tsx b/web/src/landing.tsx index df77ba0..75d662d 100644 --- a/web/src/landing.tsx +++ b/web/src/landing.tsx @@ -19,13 +19,16 @@ const copy = { nav: ["Features", "Architektur", "Installation"], client: "Client öffnen", hero: ["Direkt im Browser.", "Dein vertrauter Voice-Client, neu gedacht fürs Web. Ohne Installation, ohne Cloud-Zwang – einfach Tab öffnen und verbinden."], demo: "Live Demo starten", github: "Auf GitHub ansehen", demoNote: "Die Demo nutzt simulierte Daten – ganz ohne echten Server.", built: "Gebaut mit", featureKicker: "ALLES, WAS DU BRAUCHST", featureTitle: "Voice-Chat ohne Kompromisse.", featureIntro: "Die Funktionen, die du von einem Desktop-Client erwartest – in einer modernen, offenen Web-App.", + stepsKicker: "SO EINFACH GEHT'S", stepsTitle: "Server eingeben. Verbunden.", stepsText: "WebSpeak3 ist nicht an einen bestimmten Server gebunden. Öffne den Client, gib eine beliebige erreichbare Adresse ein und leg los.", steps: [["01", "Client öffnen", "Keine Installation und kein Konto nötig."], ["02", "Serveradresse eingeben", "Zum Beispiel voice.teamspeak.com."], ["03", "Direkt verbinden", "Voice, Chat und Channels stehen sofort bereit."]], connecting: "Verbindung wird hergestellt", connected: "Verbunden", nickname: "Nickname", connectNow: "Verbinden", features: [["voice", "Voice ohne Umwege", "Opus-Audio mit geringer Latenz, Sprachaktivierung, Gerätewahl und anpassbarer Empfindlichkeit."],["chat", "Chat, der alles bündelt", "Channel-, Server- und private Chats in übersichtlichen Tabs – inklusive Server-Events."],["tree", "Live Channel Tree", "Channels, Nutzer, Status, Länderflaggen und Wechsel in Echtzeit – vertraut, aber fürs Web gedacht."],["whisper", "Gezieltes Whispern", "Sprich mit einzelnen Clients oder ganzen Channels, ohne deinen aktuellen Raum zu stören."],["docker", "Self-hosted by design", "Ein Container für Web-App, Gateway und Connector. Deine Instanz, deine Regeln – mit freier Serverwahl."],["mobile", "Unterwegs verbunden", "Eine echte responsive Oberfläche für schmale Displays – nicht nur Desktop in klein."]] as const, privacyKicker: "PRIVATSPHÄRE EINGEBAUT", privacyTitle: ["Dein Web-Client.", "Freie Serverwahl."], privacyText: "Du hostest nur WebSpeak3 und sein Gateway selbst. Von dort verbindest du dich mit jedem erreichbaren TeamSpeak-Server – egal, wo er läuft oder wem er gehört.", privacyList: ["WebSpeak3 vollständig selbst hostbar", "Freie Wahl des TeamSpeak-Servers", "Am Zielserver ist keine Änderung nötig"], control: ["Kontrolle über", "deinen Client"], architectureKicker: "UNTER DER HAUBE", architectureTitle: "Vom Tab zu jedem Server.", architectureText: "Dein selbst gehostetes Gateway übersetzt WebSocket-Nachrichten in das echte TeamSpeak-Protokoll und verbindet dich mit dem gewünschten Server.", screenKicker: "FÜR JEDEN BILDSCHIRM", screenTitle: ["Desktop-Komfort.", "Mobile Freiheit."], screenText: "Dark oder Light, großer Monitor oder Smartphone: WebSpeak3 passt sich an, ohne Kernfunktionen zu verstecken.", statusKicker: "OFFEN ENTWICKELT", statusTitle: "Beta, aber schon ziemlich gesprächig.", statusText: "WebSpeak3 ist ein aktiver Prototyp. Diese Übersicht zeigt transparent, was heute bereits funktioniert und wo noch Feinschliff folgt.", statusLabels: ["Verfügbar", "In Arbeit", "Als Nächstes"], statusCards: [["Voice, Chat & Channel Tree", "Echte TS3/TS6-Verbindungen, Opus-Audio, Whisper, Chats und Live-Status."], ["Browser-Kompatibilität", "Audioausgabe und Mikrofonverhalten werden für weitere Browser und Geräte verfeinert."], ["Mehr Komfort", "Weitere Desktop-Client-Details, stabilere Randfälle und Community-Feedback."]], roadmap: "Roadmap und Issues ansehen", + githubKicker: "LIVE VON GITHUB", githubTitle: "Offen entwickelt. Öffentlich nachvollziehbar.", githubText: "Aktuelle Projektdaten direkt aus dem öffentlichen Repository.", githubLabels: ["GitHub Stars", "Aktueller Release", "Zuletzt aktualisiert"], githubFallback: "Beta", tourKicker: "LIVE ERKUNDEN", tourTitle: "Der Client, erklärt im Kontext.", tourText: "Wähle einen Bereich und sieh direkt, wo die wichtigsten Funktionen im WebSpeak3-Client sitzen.", tourItems: [["tree", "Channel Tree", "Channels, Nutzer und Status wechseln in Echtzeit."], ["chat", "Chat & Events", "Server-, Channel- und Direktnachrichten bleiben übersichtlich getrennt."], ["voice", "Voice Controls", "Mikrofon, Lautsprecher, Aktivierung und Pegel immer griffbereit."], ["whisper", "Whisper", "Gezielt einzelne Nutzer oder komplette Channels ansprechen."]], - installKicker: "IN MINUTEN STARTKLAR", installTitle: "Dein WebSpeak3. Jeder Server.", installText: "Hoste den Browser-Client mit Docker selbst und verbinde dich anschließend mit jedem erreichbaren TeamSpeak-Server.", installSteps: [["01", "WebSpeak3 starten", "Container laden und Port 8080 veröffentlichen."], ["02", "Browser öffnen", "WebSpeak3 lokal oder über deine Domain aufrufen."], ["03", "Server frei wählen", "Beliebige TS-Adresse und deinen Nickname eingeben – fertig."]], installGuide: "Installationsanleitung", copyCommand: "Befehl kopieren", copied: "Kopiert!", + installKicker: "IN MINUTEN STARTKLAR", installTitle: "Dein WebSpeak3. Jeder Server.", installText: "Hoste den Browser-Client selbst und verbinde dich anschließend mit jedem erreichbaren TeamSpeak-Server.", installSteps: [["01", "WebSpeak3 starten", "Passende Installationsart auswählen."], ["02", "Browser öffnen", "WebSpeak3 lokal oder über deine Domain aufrufen."], ["03", "Server frei wählen", "Beliebige TS-Adresse und deinen Nickname eingeben – fertig."]], installTabs: ["Docker Run", "Docker Compose", "Reverse Proxy", "Entwicklung"], installGuide: "Installationsanleitung", copyCommand: "Befehl kopieren", copied: "Kopiert!", + browserKicker: "BROWSER-CHECK", browserTitle: "Bereit für deinen Browser.", browserText: "WebSpeak3 nutzt moderne Web-Audio-APIs. Die Kernfunktionen laufen browserübergreifend; einzelne Gerätefunktionen können abweichen.", browserRows: [["Edge", "Voll unterstützt", "Empfohlen unter Windows"], ["Chrome / Chromium", "Voll unterstützt", "Desktop und Android"], ["Firefox", "Unterstützt", "Audioausgabe kann je nach System abweichen"], ["Safari", "Experimentell", "Web-Audio-Verhalten wird weiter verfeinert"]], faqKicker: "GUT ZU WISSEN", faqTitle: "Fragen, bevor du loslegst.", faqs: [["Bin ich an einen bestimmten TeamSpeak-Server gebunden?", "Nein. Du kannst jede erreichbare TS3- oder TS6-Serveradresse eingeben – unabhängig davon, wer den Server hostet oder wo er läuft."], ["Was muss ich selbst hosten?", "Nur WebSpeak3 mit Gateway und Connector. Der TeamSpeak-Server kann dein eigener, der eines Freundes oder ein beliebiger anderer erreichbarer Server sein."], ["Wo laufen meine Sprachdaten?", "Sie laufen über deine WebSpeak3-Instanz direkt zum ausgewählten TeamSpeak-Server – ohne eine zentrale WebSpeak3-Cloud."], ["Welche Browser werden unterstützt?", "Moderne Chromium- und Firefox-Browser sind das Hauptziel. Einzelne Audiofunktionen können je nach Browser und Gerät abweichen."], ["Benötigt WebSpeak3 Zugriff auf mein Mikrofon?", "Erst wenn du das Mikrofon aktivierst. Dann fragt der Browser wie üblich nach deiner Erlaubnis."], ["Ist das Projekt produktionsreif?", "WebSpeak3 ist aktuell als Beta beziehungsweise Prototyp gekennzeichnet. Teste deine gewünschte Umgebung daher vor einem breiten Einsatz."], ["Kann ich mithelfen?", "Ja. Fehlerberichte, Ideen und Beiträge sind über das öffentliche GitHub-Repository willkommen."]], disclaimer: "Ein unabhängiges Open-Source-Projekt. Nicht mit TeamSpeak Systems GmbH verbunden.", imageAlt: "WebSpeak3 Client im Dark Mode", }, @@ -33,13 +36,16 @@ const copy = { nav: ["Features", "Architecture", "Installation"], client: "Open client", hero: ["Right in your browser.", "The voice client you know, reimagined for the web. No installation, no cloud lock-in — just open a tab and connect."], demo: "Launch live demo", github: "View on GitHub", demoNote: "The demo uses simulated data — no real server required.", built: "Built with", featureKicker: "EVERYTHING YOU NEED", featureTitle: "Voice chat without compromise.", featureIntro: "Everything you expect from a desktop client — inside a modern, open web app.", + stepsKicker: "THAT SIMPLE", stepsTitle: "Enter a server. Connected.", stepsText: "WebSpeak3 is not tied to a particular server. Open the client, enter any reachable address and get started.", steps: [["01", "Open the client", "No installation or account required."], ["02", "Enter a server address", "For example voice.teamspeak.com."], ["03", "Connect directly", "Voice, chat and channels are ready right away."]], connecting: "Establishing connection", connected: "Connected", nickname: "Nickname", connectNow: "Connect", features: [["voice", "Voice without detours", "Low-latency Opus audio, voice activation, device selection and adjustable sensitivity."],["chat", "Chat that brings it together", "Channel, server and private chats in clear tabs — including live server events."],["tree", "Live channel tree", "Channels, users, status icons, country flags and switching in real time — familiar, built for the web."],["whisper", "Targeted whisper", "Talk to individual clients or entire channels without interrupting your current room."],["docker", "Self-hosted by design", "One container for the web app, gateway and connector. Your instance, your rules — with free choice of server."],["mobile", "Connected on the go", "A truly responsive interface for narrow screens — not merely a shrunken desktop UI."]] as const, privacyKicker: "PRIVACY BUILT IN", privacyTitle: ["Your web client.", "Your choice of server."], privacyText: "You only self-host WebSpeak3 and its gateway. From there, connect to any reachable TeamSpeak server — no matter where it runs or who hosts it.", privacyList: ["WebSpeak3 is fully self-hostable", "Free choice of TeamSpeak server", "No changes required on the target server"], control: ["Control over", "your client"], architectureKicker: "UNDER THE HOOD", architectureTitle: "From your tab to any server.", architectureText: "Your self-hosted gateway translates WebSocket messages into the real TeamSpeak protocol and connects you to the server you choose.", screenKicker: "FOR EVERY SCREEN", screenTitle: ["Desktop comfort.", "Mobile freedom."], screenText: "Dark or light, large display or smartphone: WebSpeak3 adapts without hiding core functionality.", statusKicker: "BUILT IN THE OPEN", statusTitle: "Beta, but already quite talkative.", statusText: "WebSpeak3 is an active prototype. This overview is transparent about what works today and where refinement is still underway.", statusLabels: ["Available", "In progress", "Up next"], statusCards: [["Voice, chat & channel tree", "Real TS3/TS6 connections, Opus audio, whisper, chats and live status."], ["Browser compatibility", "Audio output and microphone behavior are being refined across more browsers and devices."], ["More polish", "More desktop-client details, resilient edge cases and community feedback."]], roadmap: "View roadmap and issues", + githubKicker: "LIVE FROM GITHUB", githubTitle: "Built in the open. Publicly traceable.", githubText: "Current project data directly from the public repository.", githubLabels: ["GitHub stars", "Current release", "Last updated"], githubFallback: "Beta", tourKicker: "EXPLORE IT LIVE", tourTitle: "The client, explained in context.", tourText: "Choose an area to see exactly where WebSpeak3 keeps its most important features.", tourItems: [["tree", "Channel tree", "Channels, users and status update in real time."], ["chat", "Chat & events", "Server, channel and direct messages stay clearly separated."], ["voice", "Voice controls", "Microphone, speakers, activation and levels remain within reach."], ["whisper", "Whisper", "Talk directly to individual users or complete channels."]], - installKicker: "READY IN MINUTES", installTitle: "Your WebSpeak3. Any server.", installText: "Self-host the browser client with Docker, then connect to any reachable TeamSpeak server.", installSteps: [["01", "Start WebSpeak3", "Pull the container and publish port 8080."], ["02", "Open your browser", "Visit WebSpeak3 locally or through your domain."], ["03", "Choose any server", "Enter any TS address and your nickname — done."]], installGuide: "Installation guide", copyCommand: "Copy command", copied: "Copied!", + installKicker: "READY IN MINUTES", installTitle: "Your WebSpeak3. Any server.", installText: "Self-host the browser client, then connect to any reachable TeamSpeak server.", installSteps: [["01", "Start WebSpeak3", "Choose the installation method that fits."], ["02", "Open your browser", "Visit WebSpeak3 locally or through your domain."], ["03", "Choose any server", "Enter any TS address and your nickname — done."]], installTabs: ["Docker Run", "Docker Compose", "Reverse Proxy", "Development"], installGuide: "Installation guide", copyCommand: "Copy command", copied: "Copied!", + browserKicker: "BROWSER CHECK", browserTitle: "Ready for your browser.", browserText: "WebSpeak3 uses modern Web Audio APIs. Core features work across browsers; individual device features may vary.", browserRows: [["Edge", "Fully supported", "Recommended on Windows"], ["Chrome / Chromium", "Fully supported", "Desktop and Android"], ["Firefox", "Supported", "Audio output may vary by system"], ["Safari", "Experimental", "Web Audio behavior is still being refined"]], faqKicker: "GOOD TO KNOW", faqTitle: "Questions before you start.", faqs: [["Am I tied to a specific TeamSpeak server?", "No. Enter any reachable TS3 or TS6 server address, regardless of where it runs or who hosts it."], ["What do I need to self-host?", "Only WebSpeak3 with its gateway and connector. The TeamSpeak server can be yours, a friend's, or any other reachable server."], ["Where does my voice data go?", "It travels through your WebSpeak3 instance directly to the selected TeamSpeak server — without a central WebSpeak3 cloud."], ["Which browsers are supported?", "Modern Chromium and Firefox browsers are the main targets. Individual audio features may vary by browser and device."], ["Does WebSpeak3 need microphone access?", "Only when you enable the microphone. Your browser will then ask for permission as usual."], ["Is the project production-ready?", "WebSpeak3 is currently marked as a beta/prototype. Test your intended environment before rolling it out broadly."], ["Can I contribute?", "Yes. Bug reports, ideas and contributions are welcome through the public GitHub repository."]], disclaimer: "An independent open-source project. Not affiliated with TeamSpeak Systems GmbH.", imageAlt: "WebSpeak3 client in dark mode", }, @@ -58,6 +64,15 @@ function Icon({ name }: { name: string }) { return ; } +const installCommands = [ + "docker run -d -p 8080:8080 --name webspeak3 moepchi/webspeak3:latest", + "git clone https://github.com/Moepchi/webspeak3.git && cd webspeak3 && docker compose up -d", + "caddy reverse-proxy --from webspeak3.example.com --to localhost:8080", + "git clone https://github.com/Moepchi/webspeak3.git && cd webspeak3 && docker compose up --build", +] as const; + +type GitHubStats = { stars: number | null; release: string | null; updated: string | null }; + function Landing() { const [lang, setLang] = useState(() => { const saved = localStorage.getItem("webspeak3:landing-language"); @@ -68,9 +83,11 @@ function Landing() { const [activeTour, setActiveTour] = useState(0); const [copied, setCopied] = useState(false); const [phoneStyle] = useState(detectPhoneStyle); + const [installMethod, setInstallMethod] = useState(0); + const [githubStats, setGithubStats] = useState({ stars: null, release: null, updated: null }); - const copyDockerCommand = () => { - navigator.clipboard?.writeText("docker run -d -p 8080:8080 --name webspeak3 moepchi/webspeak3:latest"); + const copyInstallCommand = () => { + navigator.clipboard?.writeText(installCommands[installMethod]); setCopied(true); window.setTimeout(() => setCopied(false), 1800); }; @@ -83,6 +100,19 @@ function Landing() { : "WebSpeak3 – TeamSpeak 3 in Your Browser | Open Source"; }, [lang]); + useEffect(() => { + const controller = new AbortController(); + Promise.all([ + fetch("https://api.github.com/repos/Moepchi/webspeak3", { signal: controller.signal }).then(response => response.ok ? response.json() : null), + fetch("https://api.github.com/repos/Moepchi/webspeak3/releases/latest", { signal: controller.signal }).then(response => response.ok ? response.json() : null), + ]).then(([repo, release]) => setGithubStats({ + stars: typeof repo?.stargazers_count === "number" ? repo.stargazers_count : null, + release: typeof release?.tag_name === "string" ? release.tag_name : null, + updated: typeof repo?.pushed_at === "string" ? repo.pushed_at : null, + })).catch(() => undefined); + return () => controller.abort(); + }, []); + useEffect(() => { const elements = document.querySelectorAll(".reveal"); const observer = new IntersectionObserver( @@ -126,6 +156,8 @@ function Landing() {
{t.built}{["React","TypeScript","Vite","Node.js","Rust","Docker"].map(x=>{x})}
+
{t.stepsKicker}

{t.stepsTitle}

{t.stepsText}

{t.steps.map(([number, title, description]) =>
{number}
{title}{description}
)}
WebSpeak3
{t.connecting}…✓ {t.connected} · voice.teamspeak.com
+
{t.featureKicker}

{t.featureTitle}

{t.featureIntro}

{t.features.map(([icon,title,description],index)=>
0{index + 1}

{title}

{description}

{index === 0 && }
)}
@@ -135,13 +167,17 @@ function Landing() {
{t.statusKicker}

{t.statusTitle}

{t.statusText}

{t.statusCards.map(([title, description], index) =>
{t.statusLabels[index]}

{title}

{description}

)}
{t.roadmap} ↗
+
{t.githubKicker}

{t.githubTitle}

{t.githubText}

github.com/Moepchi/webspeak3 ↗
★{githubStats.stars === null ? "—" : githubStats.stars.toLocaleString(lang === "de" ? "de-DE" : "en-US")}{t.githubLabels[0]}
↗{githubStats.release ?? t.githubFallback}{t.githubLabels[1]}
↻{githubStats.updated ? new Intl.DateTimeFormat(lang === "de" ? "de-DE" : "en-US", { day: "2-digit", month: "short", year: "numeric" }).format(new Date(githubStats.updated)) : "—"}{t.githubLabels[2]}
+
{t.architectureKicker}

{t.architectureTitle}

{t.architectureText}

{[["Browser","React + Web Audio"],["Gateway","WebSocket · Node.js"],["Rust Connector","tsclientlib + Opus"],["TeamSpeak Server","TS3 / TS6 Protocol"]].map((x,i)=>
0{i+1}{x[0]}{x[1]}
{i<3&&}
)}
{t.screenKicker}

{t.screenTitle[0]}
{t.screenTitle[1]}

{t.screenText}

☾ Dark Mode☀ Light Mode⌁ Responsive
WebSpeak3 Desktop Client
WebSpeak3 Mobile Client
{t.tourKicker}

{t.tourTitle}

{t.tourText}

{t.imageAlt}/{t.tourItems.map((item, index) => )}
0{activeTour + 1}
{t.tourItems[activeTour][1]}

{t.tourItems[activeTour][2]}

{t.tourItems.map((item, index) => )}
-
{t.installKicker}

{t.installTitle}

{t.installText}

{t.installSteps.map(([number, title, description]) =>
{number}
{title}{description}
)}
$ docker run -d -p 8080:8080 --name webspeak3 moepchi/webspeak3:latest
+
{t.installKicker}

{t.installTitle}

{t.installText}

{t.installSteps.map(([number, title, description]) =>
{number}
{title}{description}
)}
{t.installTabs.map((label, index) => )}
$ {installCommands[installMethod]}
+ +
{t.browserKicker}

{t.browserTitle}

{t.browserText}

{t.browserRows.map(([browserName, status, note], index) =>
{browserName.slice(0, 1)}{browserName}{status}{note}
)}
{t.faqKicker}

{t.faqTitle}

{t.faqs.map(([question, answer], index) =>
0{index + 1}{question}+

{answer}

)}