From c1facb23ada019fde74326c1a23dc57f01c1c1c4 Mon Sep 17 00:00:00 2001 From: Anas Mazouni Date: Fri, 10 Nov 2023 22:18:35 +0100 Subject: [PATCH] feat: ui improvements --- client/bun.lockb | Bin 163676 -> 180272 bytes client/components.json | 2 +- client/index.html | 4 +- client/package.json | 10 +- client/src/App.tsx | 172 +------------- client/src/components/molecules/chat.tsx | 106 +++++++++ client/src/components/molecules/header.tsx | 5 +- .../src/components/molecules/mode-toggle.tsx | 26 +++ .../src/components/molecules/name-dialog.tsx | 77 +++++++ client/src/components/pages/home.tsx | 26 +++ client/src/components/template/layout.tsx | 4 +- client/src/components/ui/button.tsx | 54 ++--- client/src/components/ui/dialog.tsx | 120 ++++++++++ client/src/components/ui/dropdown-menu.tsx | 203 ++++++++++++++++ client/src/components/ui/form.tsx | 176 ++++++++++++++ client/src/components/ui/input.tsx | 25 ++ client/src/components/ui/label.tsx | 24 ++ client/src/components/ui/textarea.tsx | 2 +- client/src/components/ui/toast.tsx | 66 ++---- client/src/lib/store.ts | 27 +++ client/src/{ => lib}/utils.ts | 0 client/src/providers/index.tsx | 7 +- client/src/providers/omegle-provider.tsx | 216 ++++++++++++++++++ client/src/types/index.ts | 9 + client/tailwind.config.js | 88 ++++--- server/index.ts | 31 ++- 26 files changed, 1177 insertions(+), 303 deletions(-) create mode 100644 client/src/components/molecules/chat.tsx create mode 100644 client/src/components/molecules/mode-toggle.tsx create mode 100644 client/src/components/molecules/name-dialog.tsx create mode 100644 client/src/components/pages/home.tsx create mode 100644 client/src/components/ui/dialog.tsx create mode 100644 client/src/components/ui/dropdown-menu.tsx create mode 100644 client/src/components/ui/form.tsx create mode 100644 client/src/components/ui/input.tsx create mode 100644 client/src/components/ui/label.tsx create mode 100644 client/src/lib/store.ts rename client/src/{ => lib}/utils.ts (100%) create mode 100644 client/src/providers/omegle-provider.tsx create mode 100644 client/src/types/index.ts diff --git a/client/bun.lockb b/client/bun.lockb index 69a4bf433a2c512403195ba33a3ab004131cdfe8..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p_r z^~~i>2)g&?s?$CDj#yW*#!br z>WiFnqlc_6(ePfFHKgM4g_*ZNn`tXgQXPNifuIE?2`pM_tJyukb(`uHk+mt|c=RaebLnqAB&$NIR%+om{ ze{7x}+1yIhTbf$c%I}=#d>!B^IbY?J6!Me@$MHqY+c)XQ;|P7PoAswc&)lplHiNQC zbZTaekM>^Kwej<9Kg8xWXMf6YvKMBrdZ)UGXzy)?hZlX8zp3xr{5K<-ZR8sj*XraV z?gywtCobK*YgcytR*Nh%nPDjt!F%ynxxVveO>26pOG%Dvtb8wcFCJRKHu_DW*nO_K z73X`OI&12VJ}W%n`F+JNMeQ#Dn-#j}qvJ^%W<2x7511&6B44g_DAYGeKwVQW53v5a zh1L90VBM%!x!h`<5N9fKstXzn+H09{NaS<>0{gz(!k6#- zwOfrJ=e${xvu=TYFWyRQ^z~DOk*`{j@_m^;ep>>y>XM)w_o&=1!^!vPF>7tfa-9)){UgVz* znfG}5`g)P&$~cWKs5PY0#TrRp$bV2&A^(lGqXu=H+3pj5So>be^^LXf_9$%ldyVk1 z$={xu1uyk1{cLMd^aG1)+ydVSez*B_QJs4qUH)XOZkJ#Mu6dhtc17g3rncE@&aQM} z_jwHC^Sazi&Zm6)8L5GKt#ra(Gjj8m1j{m)Ct3}4;ZQ3?cSy8agxW9PZ82`DzAMqX zVe?u}0g)ARrcTYvY>_!-CNBrpeO^I-O>2IgPM>Yn(Z^d`OZ9twthCLUeXV!OZoX%T iRlS_9oM`# - Vite + React + TS + MSN - an omegle clone + +
diff --git a/client/package.json b/client/package.json index 69e31e2..a634e87 100644 --- a/client/package.json +++ b/client/package.json @@ -10,19 +10,27 @@ "preview": "vite preview" }, "dependencies": { + "@hookform/resolvers": "^3.3.2", + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.1.5", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", + "lucide-react": "^0.292.0", "nanoid": "^5.0.3", "peerjs": "^1.5.1", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-hook-form": "^7.48.2", "react-use-websocket": "^4.5.0", "tailwind-merge": "^2.0.0", "tailwindcss": "^3.3.5", - "tailwindcss-animate": "^1.0.7" + "tailwindcss-animate": "^1.0.7", + "zod": "^3.22.4", + "zustand": "^4.4.6" }, "devDependencies": { "@types/node": "^20.9.0", diff --git a/client/src/App.tsx b/client/src/App.tsx index 8fbe465..6fb359e 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,179 +1,11 @@ -import Peer, { MediaConnection } from 'peerjs' -import { useEffect, useRef, useState } from 'react' -import useWebSocket from 'react-use-websocket' +import Home from './components/pages/home' import Layout from './components/template/layout' -import { Button } from './components/ui/button' -import { Textarea } from './components/ui/textarea' -import { useToast } from './components/ui/use-toast' -import { useUserMedia } from './hooks/useUserMedia' - -interface Message { - sender: string - message: string -} const App = () => { - const meRef = useRef(null) - const strangerRef = useRef(null) - const [id, setId] = useState(null) - const [strangerId, setStrangerId] = useState(null) - const [messages, setMessages] = useState([]) - const [message, setMessage] = useState('') - - const addMessage = (message: Message) => { - setMessages((messages) => [...messages, message]) - } - - const { toast } = useToast() - - const ws = useWebSocket('wss://omegle-server.lab.stormix.dev', { - onOpen: () => { - console.log('opened') - }, - shouldReconnect: () => true, - onMessage: (e) => { - const { data: raw } = e - const data = JSON.parse(raw) - - switch (data.type) { - case 'message': - addMessage({ - sender: data.payload.id, - message: data.payload.message - }) - break - case 'id': - setId(data.id) - break - case 'offer': - setStrangerId(data.payload) - toast({ - title: 'Stranger Found', - description: 'Calling ' + data.payload - }) - break - case 'error': - toast({ - title: 'Error', - description: data.payload, - variant: 'destructive' - }) - break - } - } - }) - - const [peer, setPeer] = useState(null) - const [call, setCall] = useState(null) - - const { stream } = useUserMedia({ - audio: true, - video: true - }) - - if (stream && meRef.current) { - meRef.current.srcObject = stream - } - - useEffect(() => { - if (stream && !peer && id) { - setPeer( - new Peer(id, { - host: 'peer.lab.stormix.dev', - port: 443, - path: '/', - debug: 3 - }) - ) - } - }, [peer, stream, id]) - - useEffect(() => { - if (peer) { - peer.on('open', (id) => { - console.log('My peer ID is: ' + id) - }) - - peer.on('call', (call) => { - if (!stream) return - setStrangerId(call.peer) - call.answer(stream) - call.on('stream', (remoteStream) => { - if (strangerRef.current) { - strangerRef.current.srcObject = remoteStream - } - }) - }) - } - }, [peer, stream]) - - useEffect(() => { - if (peer && strangerId) { - const call = peer.call(strangerId, stream as MediaStream) - call.on('stream', (remoteStream) => { - if (strangerRef.current) { - strangerRef.current.srcObject = remoteStream - } - }) - setCall(call) - } - }, [peer, stream, strangerId]) - - const startCall = () => { - ws.sendJsonMessage({ - id, - type: 'call' - }) - } - return ( <> -
-
-
-
-
-
-
-
-
- {messages.map((message, i) => ( -
- {message.sender}: - {message.message} -
- ))} -
-
-