cleaning, prolly broke a lot but whatever

This commit is contained in:
Arjun Patel
2022-02-01 10:38:45 -08:00
parent 462139b930
commit 4073d526bd
54 changed files with 84 additions and 5402 deletions
@@ -0,0 +1,61 @@
import { Avatar } from "antd";
import { FaPaperPlane, FaRegTimesCircle } from "react-icons/fa";
import User from "@nirvana/common/models/user";
export default function SelectedUserRow(props: { user: User }) {
console.log(props);
return (
<>
<span className="flex flex-row items-center py-1 border-t">
<Avatar shape="square" size={"small"}>
A
</Avatar>
<span className="flex flex-col ml-2">
<span className="text-slate-400 text-xs">
{"[email protected]"}
</span>
<span className="text-orange-500 text-xs">
Not a valid Nirvana user.
</span>
</span>
<button className="p-2 rounded-full hover:cursor-pointer text-sky-500 ml-auto">
<FaPaperPlane className="ml-auto text-lg" />
</button>
</span>
<span className="flex flex-row items-center py-1 border-t">
<Avatar
src={"https://joeschmoe.io/api/v1/random"}
shape="square"
size={"small"}
/>
<span className="flex flex-col ml-2">
<span className="text-teal-500 font-bold">{"Joe Smoe"}</span>
<span className="text-slate-400 text-xs">{"[email protected]"}</span>
</span>
<button className="p-2 rounded-full hover:cursor-pointer text-orange-500 ml-auto">
<FaRegTimesCircle className="ml-auto text-lg" />
</button>
</span>
<span className="flex flex-row items-center py-1 border-t">
<Avatar
src={"https://joeschmoe.io/api/v1/2"}
shape="square"
size={"small"}
/>
<span className="flex flex-col ml-2">
<span className="text-teal-500 font-bold">{"Elon Musk"}</span>
<span className="text-slate-400 text-xs">{"[email protected]"}</span>
</span>
<button className="p-2 rounded-full hover:cursor-pointer text-orange-500 ml-auto">
<FaRegTimesCircle className="ml-auto text-lg" />
</button>
</span>
</>
);
}
@@ -0,0 +1,47 @@
import { IoPulseOutline, IoRemoveOutline } from "react-icons/io5";
import { UserStatus } from "../../models/user";
interface UserStatusPropsInterface {
status: UserStatus;
}
export default function UserStatusBubble(props: UserStatusPropsInterface) {
switch (props.status) {
case UserStatus.online:
return (
<span className="absolute top-0 right-0 w-3 h-3 bg-green-400 rounded-full z-20 border border-white"></span>
);
case UserStatus.busy:
return (
<span className="absolute top-0 right-0 w-3 h-3 bg-orange-400 rounded-full z-20 border border-white"></span>
);
case UserStatus.offline:
return (
<span className="absolute top-0 right-0 w-3 h-3 bg-gray-400 rounded-full z-20 border border-white"></span>
);
default:
return (
<span className="absolute top-0 right-0 w-3 h-3 bg-gray-400 rounded-full z-20 border border-white"></span>
);
}
}
// same as status pretty much but prolly less needed for all components
export function UserPulse(props: UserStatusPropsInterface) {
switch (props.status) {
case UserStatus.online:
return (
<IoPulseOutline className="text-green-500 text-2xl animate-pulse mx-2" />
);
case UserStatus.busy:
return (
<IoPulseOutline className="text-orange-400 text-2xl animate-pulse mx-2" />
);
case UserStatus.offline:
return <IoRemoveOutline className="text-gray-400 text-2xl mx-2" />;
default:
return (
<IoPulseOutline className="text-gray-400 text-2xl animate-pulse mx-2" />
);
}
}