Skip to content

Commit

Permalink
Merge pull request #532 from MeetDOD/issue-531
Browse files Browse the repository at this point in the history
Feat: Added Tab title, captcha non copyable and clickable card stats in admin panel successfully issue 531
  • Loading branch information
Ultimateutkarsh11 authored Jul 30, 2024
2 parents f2df509 + 61adcb9 commit 403014f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Style Share Admin</title>
</head>
<body>
<div id="root"></div>
Expand Down
Binary file added admin/src/assets/captcha.webp
Binary file not shown.
3 changes: 2 additions & 1 deletion admin/src/components/CaptchaAdmin.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, useEffect } from 'react';
import { IoMdRefresh } from "react-icons/io";
import "../styles/captcha.css"

const CaptchaAdmin = ({ onChange }: { onChange: (isValid: boolean) => void }) => {
const [captchaText, setCaptchaText] = useState('');
Expand Down Expand Up @@ -33,7 +34,7 @@ const CaptchaAdmin = ({ onChange }: { onChange: (isValid: boolean) => void }) =>
return (
<div className="mb-4 rounded-lg">
<div className="flex items-center justify-between mb-4 text-[#000435] bg-gray-100 dark:text-white dark:bg-blue-950 p-2 rounded-lg border border-[#5f67de] dark:border-white">
<span className="text-xl font-semibold italic line-through">{captchaText}</span>
<span className="captcha w-1/2 p-2.5 text-2xl font-bold border-2 border-black rounded-md select-none border-solid italic line-through">{captchaText}</span>
<button
type="button"
onClick={generateCaptcha}
Expand Down
12 changes: 6 additions & 6 deletions admin/src/components/StatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ const StatusCard = () => {
<Link to="/admin/posts" className="col-span-1">
{renderCard(<LiaNewspaperSolid size={40} />, stats?.totalPosts ?? null, 'Total Posts')}
</Link>
<div className="col-span-1">
<Link to="/admin/comments" className="col-span-1">
{renderCard(<FaComments size={40} />, stats?.totalComments ?? null, 'Total Comments')}
</div>
<div className="col-span-1">
</Link>
<Link to="/admin/reactions" className="col-span-1">
{renderCard(<MdAddReaction size={40} />, stats?.totalReactions ?? null, 'Total Reactions')}
</div>
</Link>
<Link to="/admin/contactmessages" className="col-span-1">
{renderCard(<SiGooglemessages size={40} />, stats?.contactMessages ?? null, 'Contact Messages')}
</Link>
<div className="col-span-1">
<Link to="/admin/favorites" className="col-span-1">
{renderCard(<RiHeartsFill size={40} />, stats?.favoritesPosts ?? null, 'Most Favorites')}
</div>
</Link>
</div>
</div>
</SkeletonTheme>
Expand Down
6 changes: 6 additions & 0 deletions admin/src/styles/captcha.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.captcha {
background: url("../assets/captcha.webp") repeat 0 0 !important;
color: rgb(108 110 113);
display: flex;
justify-content: center;
}

0 comments on commit 403014f

Please sign in to comment.