more improvements

This commit is contained in:
talksik
2022-01-19 04:04:47 -08:00
parent e408f7a221
commit cfab31dec2
3 changed files with 15 additions and 5 deletions
+4 -1
View File
@@ -128,7 +128,10 @@ export default function LinkCard(props: ILinkCardProps) {
onClick={() => window.open(props.link.link, "_blank")} onClick={() => window.open(props.link.link, "_blank")}
className="flex flex-row bg-gray-300 bg-opacity-25 py-5 px-3 items-center justify-start hover:cursor-pointer h-full" className="flex flex-row bg-gray-300 bg-opacity-25 py-5 px-3 items-center justify-start hover:cursor-pointer h-full"
> >
<LinkIcon className="text-4xl mr-2" linkType={props.link.type} /> <LinkIcon
className="text-4xl mr-2 shrink-0"
linkType={props.link.type}
/>
<span className="flex flex-col items-baseline mr-10 space-y-1"> <span className="flex flex-col items-baseline mr-10 space-y-1">
<span className="text-md font-bold text-white text-ellipsis overflow-hidden"> <span className="text-md font-bold text-white text-ellipsis overflow-hidden">
+3 -2
View File
@@ -5,6 +5,7 @@ import {
FaFileImage, FaFileImage,
FaFilePdf, FaFilePdf,
FaGithubSquare, FaGithubSquare,
FaGlobe,
FaGoogleDrive, FaGoogleDrive,
} from "react-icons/fa"; } from "react-icons/fa";
import Link, { LinkType } from "../models/link"; import Link, { LinkType } from "../models/link";
@@ -33,11 +34,11 @@ export default function LinkIcon(props: {
switch (linkType) { switch (linkType) {
case LinkType.default: case LinkType.default:
return <FaFileAlt {...rest} className={`${className} text-slate-300 `} />; return <FaGlobe {...rest} className={`${className} text-slate-300 `} />;
case LinkType.atlassian: case LinkType.atlassian:
return <FaAtlassian {...rest} className={`${className} text-sky-500 `} />; return <FaAtlassian {...rest} className={`${className} text-sky-500 `} />;
case LinkType.codePile: case LinkType.codePile:
return <FaFileCode {...rest} className={`${className} text-blue-500 `} />; return <FaFileCode {...rest} className={`${className} text-pink-200 `} />;
case LinkType.github: case LinkType.github:
return ( return (
<FaGithubSquare {...rest} className={`${className} text-gray-200 `} /> <FaGithubSquare {...rest} className={`${className} text-gray-200 `} />
+8 -2
View File
@@ -2,7 +2,7 @@ import { Divider, Select, Switch, Tooltip } from "antd";
const { Option } = Select; const { Option } = Select;
import Modal from "antd/lib/modal/Modal"; import Modal from "antd/lib/modal/Modal";
import { useState } from "react"; import { useEffect, useState } from "react";
import toast from "react-hot-toast"; import toast from "react-hot-toast";
import { useAuth } from "../../contexts/authContext"; import { useAuth } from "../../contexts/authContext";
import { import {
@@ -18,9 +18,15 @@ const sendService = new SendService();
export default function CreateOrUpdateLink() { export default function CreateOrUpdateLink() {
const { currUser } = useAuth(); const { currUser } = useAuth();
const { handleModalType, showModalType } = useKeyboardContext(); const { pastedLink, handleModalType, showModalType } = useKeyboardContext();
const { teamUsers, team } = useTeamDashboardContext(); const { teamUsers, team } = useTeamDashboardContext();
useEffect(() => {
if (pastedLink) {
setLink(pastedLink ?? "");
}
}, [pastedLink]);
function closeModal() { function closeModal() {
handleModalType(ShowModalType.na); handleModalType(ShowModalType.na);
} }