Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mitsi</title>
<script src="/config.js"></script>
Expand Down
7 changes: 7 additions & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

2 changes: 2 additions & 0 deletions src/assets/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import emptyChat from './empty-chat.svg';
import mitsiUi from './mitsi-ui.jpg';
import logo from './logo.svg';

export const Assets = {
emptyChat,
mitsiUi,
logo,
};
7 changes: 7 additions & 0 deletions src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions src/components/home/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { Video } from 'lucide-react';
import { Assets } from '@/assets';

const Footer = () => {
return (
<footer className="border-t border-white/10 bg-black/50 backdrop-blur-xl">
<div className="max-w-7xl mx-auto px-8 py-16">
<div className="flex flex-col md:flex-row justify-between items-center">
<div className="flex items-center space-x-3 mb-8 md:mb-0">
<div className="w-10 h-10 bg-gradient-to-bl from-white/15 to-white/1 backdrop-blur-xl rounded-xl flex items-center justify-center shadow-lg">
<Video className="w-6 h-6 text-white" />
</div>
<img src={Assets.logo} className="w-8 h-8" alt="Logo" />

<div>
<span className="text-xl font-light tracking-wider">Mitsi</span>
<span className="text-lg font-light tracking-wider">Mitsi</span>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions src/components/home/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import uniqid from 'uniqid';
import { Github, Video } from 'lucide-react';
import { Github } from 'lucide-react';
import { Button } from '../ui/button';
import { useCallback } from 'react';
import { useNavigate } from 'react-router-dom';
import { Assets } from '@/assets';
const Navbar = () => {
const navigate = useNavigate();
const roomId = uniqid.time();
Expand All @@ -21,9 +22,8 @@ const Navbar = () => {
<div className="flex items-center justify-between h-20">
<div className="flex items-center space-x-3">
<div className="relative">
<div className="w-10 h-10 bg-gradient-to-bl from-white/15 to-white/1 backdrop-blur-xl rounded-xl flex items-center justify-center shadow-lg">
<Video className="w-6 h-6 text-white" />
</div>
<img src={Assets.logo} className="w-8 h-8" alt="Logo" />

{/* <div className="absolute -top-1 -right-1 w-4 h-4 bg-green-400 rounded-full animate-pulse" /> */}
</div>
<div>
Expand Down
61 changes: 32 additions & 29 deletions src/components/room/join/join-header.tsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,53 @@
import { usePeerOthersValues, useRoomData } from '@/store/conf/hooks';
import { Info, Loader2 } from 'lucide-react';
import { Info } from 'lucide-react';
import { Badge } from '@/components/ui/badge';
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from '@/components/ui/tooltip';
import { Assets } from '@/assets';
import { useCopyToClipboard } from '@/hooks/use-copy';
import { BASE_URL } from '@/lib/constants';

const Header = () => {
const roomData = useRoomData();
const peerOthersList = usePeerOthersValues();
const { copied, copy } = useCopyToClipboard();

return (
<div className="text-center space-y-4">
{/* Enhanced Loading Spinner Icon */}
<div className="flex justify-center">
<div className="relative">
{/* Outer pulsing ring */}
<div className="absolute -inset-4 w-20 h-20 border border-blue-500/10 rounded-full animate-pulse delay-1000" />
<div className="absolute -inset-2 w-16 h-16 border border-blue-500/20 rounded-full animate-pulse delay-500" />

{/* Main spinner container */}
<div className="w-12 h-12 rounded-full border-2 border-blue-500/30 relative">
<div className="w-8 h-8 bg-blue-500 rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 flex items-center justify-center shadow-lg">
<Loader2 className="w-4 h-4 text-white animate-spin" />
</div>
</div>
</div>
</div>
<img src={Assets.logo} className="w-14 h-14 mx-auto" alt="Logo" />

<div className="space-y-2 relative">
<div className="flex justify-center">
<h1 className="text-2xl md:text-3xl lg:text-4xl font-semibold text-white">
{roomData?.roomId}
</h1>
<Tooltip>
<TooltipTrigger>
<sup>
<Info size={18} />
</sup>
</TooltipTrigger>
<TooltipContent>
<p>Meeting Id, Click to copy invitation</p>
</TooltipContent>
</Tooltip>
</div>
{roomData?.roomId && (
<div className="flex justify-center">
<h1
onClick={() => copy(`${BASE_URL}/${roomData.roomId}`)}
className="text-2xl md:text-3xl lg:text-4xl font-semibold text-white cursor-pointer"
>
{roomData.roomId}
</h1>
<Tooltip>
<TooltipTrigger>
<sup className=" cursor-pointer">
{copied ? (
<Badge className=" bg-green-700/30 text-white">
Copied
</Badge>
) : (
<Info size={18} />
)}
</sup>
</TooltipTrigger>
<TooltipContent>
<p>Meeting Invite, Click to copy</p>
</TooltipContent>
</Tooltip>
</div>
)}
<div className="text-gray-400 md:text-lg relative">
Setup your audio and video before joining
</div>
Expand Down
13 changes: 13 additions & 0 deletions src/hooks/use-copy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { useState } from 'react';

export const useCopyToClipboard = () => {
const [copied, setCopied] = useState(false);

const copy = async (text: string) => {
await navigator.clipboard.writeText(text);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
};

return { copied, copy };
};
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { MediaDeviceType } from '@/types';
import { MediaPermissionsErrorType } from 'mic-check';
export const HEARTBEAT_INTERVAL = 45000;

export const BASE_URL = window.location.origin;
export const APP_NAME = 'Mitsi';

export const DEVICE_ERRORS = {
Expand Down
Loading