Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Added Tab title, captcha non copyable and clickable card stats in admin panel successfully issue 531 #532

Merged
merged 1 commit into from
Jul 30, 2024
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 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;
}
Loading