UI improvements
This commit is contained in:
BIN
client/assets/turtleProfileImg.jpg
Normal file
BIN
client/assets/turtleProfileImg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
BIN
client/assets/turtleProfileImg2.jpg
Normal file
BIN
client/assets/turtleProfileImg2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
BIN
client/assets/turtleProfileImg3.jpg
Normal file
BIN
client/assets/turtleProfileImg3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
BIN
client/assets/turtleProfileImg3.webp
Normal file
BIN
client/assets/turtleProfileImg3.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -120,7 +120,7 @@ function AddGroupMember({ contact }: AddGroupMemberProps) {
|
|||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
className="m-2 p-1 rounded-md hover:bg-gray-800"
|
className="m-2 p-1 rounded-xl hover:bg-gray-800 border"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
(
|
(
|
||||||
document.getElementById('addMemberModal') as HTMLDialogElement
|
document.getElementById('addMemberModal') as HTMLDialogElement
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ const AttachmentPreview = ({ url }: { url: string }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative min-h-64 w-full">
|
<div className="relative min-h-64 w-full ">
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
<div className="absolute inset-0 flex items-center justify-center bg-gray-800 bg-opacity-50 rounded">
|
<div className="absolute inset-0 flex items-center justify-center bg-gray-800 bg-opacity-50 rounded">
|
||||||
<LoadingWheel />
|
<LoadingWheel />
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ function ContactForm({ InitializeContact, setContactsList }: ContactFormProps) {
|
|||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<form onSubmit={handleSubmit(submitContact)}>
|
<form onSubmit={handleSubmit(submitContact)}>
|
||||||
<input
|
<input
|
||||||
className="text-black bg-green-50 pl-2 shadow-lg rounded-md h-8 mb-2 mt-2"
|
className="text-white bg-gray-800 pl-2 shadow-lg rounded-xl h-8 mb-2 mt-2 placeholder:text-gray-400 outline-none border-gray-600 focus:outline-none focus:ring-0"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search for user"
|
placeholder="Search for user"
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import profile from '../../../assets/profile.svg';
|
|||||||
import CreateGroupButton from './CreateGroupButton.tsx';
|
import CreateGroupButton from './CreateGroupButton.tsx';
|
||||||
import AddGroupMember from './AddGroupMember.tsx';
|
import AddGroupMember from './AddGroupMember.tsx';
|
||||||
import { ContactsProps } from '../../pages/Chat.tsx';
|
import { ContactsProps } from '../../pages/Chat.tsx';
|
||||||
|
import { UsersRound } from 'lucide-react';
|
||||||
|
|
||||||
type ContactProfileProps = {
|
type ContactProfileProps = {
|
||||||
contact: ContactsProps | null;
|
contact: ContactsProps | null;
|
||||||
@@ -11,10 +12,13 @@ function ContactProfile({ contact }: ContactProfileProps) {
|
|||||||
return (
|
return (
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<div className="flex items-center p-2">
|
<div className="flex items-center p-2">
|
||||||
<img className="w-4 mr-2 invert" src={profile} alt="profile img" />
|
{contact?.type === 'group' ? (
|
||||||
<p>
|
<UsersRound className="w-5 mr-2" />
|
||||||
{contact?.user_id} {contact ? contact.username : null}
|
) : (
|
||||||
</p>
|
<img className="w-4 mr-2 invert" src={profile} alt="profile img" />
|
||||||
|
)}
|
||||||
|
|
||||||
|
<p>{contact ? contact.username : null}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-grow"></div>
|
<div className="flex-grow"></div>
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ function ContactsList({
|
|||||||
|
|
||||||
const ContactItem = ({ contact }: { contact: ContactsProps }) => (
|
const ContactItem = ({ contact }: { contact: ContactsProps }) => (
|
||||||
<li
|
<li
|
||||||
className="flex hover:bg-green-700 p-2 rounded cursor-pointer justify-between items-center min-h-[40px]"
|
className=" flex hover:bg-slate-700 p-2 rounded-2xl cursor-pointer justify-between items-center min-h-[40px]"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
initializeContact(contact);
|
initializeContact(contact);
|
||||||
updateContactStatus(contact, true);
|
updateContactStatus(contact, true);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ function CreateGroupButton() {
|
|||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
className="m-2 border p-1 rounded-md"
|
className="m-2 border p-1 rounded-xl"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
(
|
(
|
||||||
document.getElementById('createGroupModal') as HTMLDialogElement
|
document.getElementById('createGroupModal') as HTMLDialogElement
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ const MessageForm = ({ contact }: MessageFormProps) => {
|
|||||||
ref(e);
|
ref(e);
|
||||||
textareaRef.current = e;
|
textareaRef.current = e;
|
||||||
}}
|
}}
|
||||||
className={`ml-2 w-full overflow-y-hidden resize-none bg-gray-700 border-none text-white rounded-2xl p-2 min-h-[40px] max-h-96 placeholder:text-gray-400 placeholder:pl-2 focus:outline-none focus:ring-0
|
className={`ml-2 w-full overflow-y-hidden resize-none bg-gray-800 border-none text-white rounded-2xl p-2 min-h-[40px] max-h-96 placeholder:text-gray-400 focus:outline-none focus:ring-0
|
||||||
${isOverLimit ? 'border-2 border-red-500' : isNearLimit ? 'border-2 border-yellow-500' : ''} mx-auto`}
|
${isOverLimit ? 'border-2 border-red-500' : isNearLimit ? 'border-2 border-yellow-500' : ''} mx-auto`}
|
||||||
autoFocus={!!contact}
|
autoFocus={!!contact}
|
||||||
disabled={!contact}
|
disabled={!contact}
|
||||||
@@ -268,7 +268,7 @@ const MessageForm = ({ contact }: MessageFormProps) => {
|
|||||||
rows={1}
|
rows={1}
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
className={`absolute right-2 bottom-1 text-sm ${
|
className={`absolute right-2 bottom-1 text-sm text-gray-400 ${
|
||||||
isOverLimit
|
isOverLimit
|
||||||
? 'text-red-500 font-bold'
|
? 'text-red-500 font-bold'
|
||||||
: isNearLimit
|
: isNearLimit
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from '@/components/ui/context-menu';
|
} from '@/components/ui/context-menu';
|
||||||
import { UsernameType } from '@/utils/ProtectedRoutes.tsx';
|
import { UsernameType } from '@/utils/ProtectedRoutes.tsx';
|
||||||
import { useOutletContext } from 'react-router-dom';
|
import { useOutletContext } from 'react-router-dom';
|
||||||
|
import zdjecie from '../../../assets/turtleProfileImg3.webp';
|
||||||
type ParticipantsProps = {
|
type ParticipantsProps = {
|
||||||
user_id: string;
|
user_id: string;
|
||||||
username: string;
|
username: string;
|
||||||
@@ -239,8 +239,16 @@ function ParticipantsBar({
|
|||||||
(participant: ParticipantsProps) => (
|
(participant: ParticipantsProps) => (
|
||||||
<ContextMenu key={participant.user_id}>
|
<ContextMenu key={participant.user_id}>
|
||||||
<ContextMenuTrigger>
|
<ContextMenuTrigger>
|
||||||
<li className="p-2 hover:bg-gray-700 rounded-md flex items-center justify-between group">
|
<li className="p-2 hover:bg-slate-600 rounded-2xl flex items-center justify-between group bg-slate-700 m-2">
|
||||||
<span className="flex items-center gap-2">
|
<span className="flex items-center gap-2">
|
||||||
|
<div className="flex items-center justify-center w-8 h-8 overflow-hidden rounded-full bg-gray-100">
|
||||||
|
<img
|
||||||
|
src={zdjecie}
|
||||||
|
alt="Profile image"
|
||||||
|
className="h-full w-full object-cover"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{participant.username}
|
{participant.username}
|
||||||
{participant.isowner ? (
|
{participant.isowner ? (
|
||||||
<span className="flex items-center text-yellow-400 text-xs">
|
<span className="flex items-center text-yellow-400 text-xs">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import zdjecie from '../../../assets/profile.svg';
|
import zdjecie from '../../../assets/turtleProfileImg3.webp';
|
||||||
import logoutIcon from '../../../assets/logout.svg';
|
import logoutIcon from '../../../assets/logout.svg';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { useOutletContext } from 'react-router-dom';
|
import { useOutletContext } from 'react-router-dom';
|
||||||
@@ -19,10 +19,13 @@ function UserProfile() {
|
|||||||
className="flex items-center cursor-pointer"
|
className="flex items-center cursor-pointer"
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-center m-3 w-12 h-12 overflow-hidden">
|
<div className="flex items-center justify-center m-3 w-10 h-10 overflow-hidden rounded-full bg-gray-100">
|
||||||
<img src={zdjecie} alt="Profile image" className="w-8 h-8 invert" />
|
<img
|
||||||
|
src={zdjecie}
|
||||||
|
alt="Profile image"
|
||||||
|
className="h-full w-full object-cover"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="text-gray-200">
|
<div className="text-gray-200">
|
||||||
<p>{user.username}</p>
|
<p>{user.username}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import gif from "../../assets/404.gif";
|
import gif from '../../assets/404.gif';
|
||||||
function Lost() {
|
function Lost() {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center h-screen ">
|
<div className="flex items-center justify-center h-screen bg-[#121212]">
|
||||||
<img src={gif} alt="Lost" draggable="false" />
|
<img src={gif} alt="Lost" draggable="false" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user