Skip to content

Commit

Permalink
feat: send activation mail after register
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal authored Jul 20, 2024
2 parents ff95f20 + 9817f1b commit d656874
Show file tree
Hide file tree
Showing 40 changed files with 387 additions and 468 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:
run: |
lftp -e "mirror --only-newer --parallel=100 -R ./client/dist/ /debateme.shubhamlal.in/" ${{ secrets.FTP_SERVER }}
- name: Upload backend
run: |
lftp -e "mirror --only-newer --parallel=100 -R ./server/ /debateme-api/" ${{ secrets.FTP_SERVER }}
# - name: Upload backend
# run: |
# lftp -e "mirror --only-newer --parallel=100 -R ./server/ /debateme-api/" ${{ secrets.FTP_SERVER }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
- MySQL

## ⭐ Contributors
<!-- <img src="https://contributors-img.web.app/image?repo=Shubham-Lal/DebateMe"/> -->
<img src='https://contributors-img.web.app/image?repo=Casuals4Fun/DebateMe'/>
26 changes: 13 additions & 13 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<!doctype html>
<html lang="en">
<html lang='en'>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset='UTF-8' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' />

<link rel="preload" as="font" href="/fonts/Onest/static/Onest-Regular.ttf" type="font/ttf" crossOrigin="anonymous" />
<link rel="preload" as="font" href="/fonts/Onest/static/Onest-Medium.ttf" type="font/ttf" crossOrigin="anonymous" />
<link rel="preload" as="font" href="/fonts/Onest/static/Onest-SemiBold.ttf" type="font/ttf" crossOrigin="anonymous" />
<link rel="preload" as="font" href="/fonts/Onest/static/Onest-Bold.ttf" type="font/ttf" crossOrigin="anonymous" />
<link rel="preload" as="image" href="/logo.png" type="image/png" />
<link rel='preload' as='font' href='/fonts/Onest/static/Onest-Regular.ttf' type='font/ttf' crossOrigin='anonymous' />
<link rel='preload' as='font' href='/fonts/Onest/static/Onest-Medium.ttf' type='font/ttf' crossOrigin='anonymous' />
<link rel='preload' as='font' href='/fonts/Onest/static/Onest-SemiBold.ttf' type='font/ttf' crossOrigin='anonymous' />
<link rel='preload' as='font' href='/fonts/Onest/static/Onest-Bold.ttf' type='font/ttf' crossOrigin='anonymous' />
<link rel='preload' as='image' href='/logo.png' type='image/png' />

<link rel="icon" href="/logo.png" type="image/png" />
<link rel='icon' href='/logo.png' type='image/png' />
<title>DebateMe</title>
<meta name="description" content="Your opinion is what matters." />
<meta name='description' content='Your opinion is what matters.' />

<link rel="stylesheet" href="/syncfusion.css">
<link rel='stylesheet' href='/syncfusion.css'>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<div id='root'></div>
<script type='module' src='/src/main.tsx'></script>
</body>

</html>
25 changes: 18 additions & 7 deletions client/public/theme/sun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

.card-break {
break-inside: avoid;
margin-bottom: 20px;
margin-bottom: 30px;
}

@media screen and (max-width: 1880px) {
Expand Down
8 changes: 4 additions & 4 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export default function App() {
<>
<LeftSidebar isVisible={isScrollingUp} />
<button className='sidebar-btn left' onClick={() => setSidebar(!sidebar)}>
{sidebar ? <FaChevronLeft size={20} /> : <FaChevronRight size={20} />}
{sidebar ? <FaChevronRight size={20} /> : <FaChevronLeft size={20} />}
</button>
</>
<main id='main' ref={mainRef} className={`${expand ? 'expand' : ''} ${sidebar ? '' : 'w-full'}`}>
<main id='main' ref={mainRef} className={`${expand ? 'expand' : ''} ${sidebar ? 'w-full' : ''}`}>
<Routes>
<Route path='/' element={<HomePage />} />
<Route path='/auth' element={<AuthPage />} />isScrollingUp
Expand All @@ -76,15 +76,15 @@ export default function App() {
<>
<RightSidebar isVisible={isScrollingUp} />
<button className='sidebar-btn right' onClick={() => setSidebar(!sidebar)}>
{sidebar ? <FaChevronRight size={20} /> : <FaChevronLeft size={20} />}
{sidebar ? <FaChevronLeft size={20} /> : <FaChevronRight size={20} />}
</button>
</>

{authTab !== AuthTab.Closed && <AuthModal />}

<Toaster
duration={3000}
position="top-center"
position='top-center'
theme={(localStorage.getItem('theme') as Theme) || Theme.Dark}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/src/ProtectedRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ProtectedRoute: React.FC<ProtectedRouteProps> = ({ children }) => {
return <LoadingComponent />
}
else if (isAuthenticated === AuthStatus.Failed) {
return <Navigate to="/auth" replace />;
return <Navigate to='/auth' replace />;
}

return <>{children}</>;
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/button/toggle-theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const ToggleTheme = () => {
<div className='display' onClick={handleToggleTheme}>
<div className='toggle-btn'>
<div className='circle'>
<img src="/theme/moon.png" className="moon" />
<img src="/theme/sun.svg" className="sun" />
<img src='/theme/moon.png' className='moon' />
<img src='/theme/sun.svg' className='sun' />
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/card/claim-username.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ const ClaimUsername = () => {
};

return (
<form id='claim-username' className={sidebar ? '' : 'hide'} onSubmit={handleUsernameSubmit}>
<form id='claim-username' className={sidebar ? 'hide' : ''} onSubmit={handleUsernameSubmit}>
<p>Get Started</p>
<div className='username-input'>
<span className='domain'>debateme.app/</span>
<input
name='username'
placeholder='johndoe'
autoComplete="on"
autoComplete='on'
value={username}
onChange={handleUsernameChange}
onKeyPress={handleKeyPress}
className={isSubmitted && (!username || message.type === 'error') ? "shake" : ""}
style={{ border: isSubmitted && (!username || message.type === 'error') ? "2px dotted var(--username-color)" : "" }}
className={isSubmitted && (!username || message.type === 'error') ? 'shake' : ''}
style={{ border: isSubmitted && (!username || message.type === 'error') ? '2px dotted var(--username-color)' : '' }}
/>
</div>
<button className='submit-btn' disabled={loading}>
Expand Down
16 changes: 8 additions & 8 deletions client/src/components/card/closed-debate-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const ClosedDebateCard = () => {
}

return (
<div id='closed-card' className={sidebar ? '' : 'card-break'}>
<div className={`left ${sidebar ? '' : 'flex-unset'}`}>
<div id='closed-card' className={sidebar ? 'card-break' : ''}>
<div className={`left ${sidebar ? 'flex-unset' : ''}`}>
<h2 title='Sony is the best camera of all time. ↗' onClick={() => navigate('/')}>
Sony is the best camera of all time.
</h2>
Expand All @@ -26,15 +26,15 @@ const ClosedDebateCard = () => {
Fugiat repellat architecto pariatur fugit perspiciatis voluptas quidem autem.
</p>
</div>
<div className={`right ${sidebar ? '' : 'flex-unset'}`}>
<div className={`right ${sidebar ? 'flex-unset' : ''}`}>
<div className='user-info'>
<div className='debate-from'>
<img src="/user1.webp" alt="" loading="lazy" onClick={() => handleProfileClick('aniketdas')} />
<img src='/user1.webp' alt='' loading='lazy' onClick={() => handleProfileClick('aniketdas')} />
<p onClick={() => handleProfileClick('aniketdas')}>Aniket Das</p>
<p onClick={() => handleProfileClick('aniketdas')}>aniketdas</p>
</div>
<div className='debate-by'>
<img src="/user2.jpeg" alt="" loading="lazy" onClick={() => handleProfileClick('pratikprasad')} />
<img src='/user2.jpeg' alt='' loading='lazy' onClick={() => handleProfileClick('pratikprasad')} />
<p onClick={() => handleProfileClick('pratikprasad')}>Pratik Prasad</p>
<p onClick={() => handleProfileClick('pratikprasad')}>pratikprasad</p>
</div>
Expand All @@ -59,8 +59,8 @@ const ClosedDebateLoadingCard = () => {
const { sidebar } = useNavStore();

return (
<div id='closed-card-loading' className={sidebar ? '' : 'card-break'}>
<div className={`left ${sidebar ? '' : 'flex-unset'}`}>
<div id='closed-card-loading' className={sidebar ? 'card-break' : ''}>
<div className={`left ${sidebar ? 'flex-unset' : ''}`}>
<div className='topic'>
<LoadingSkeleton />
</div>
Expand All @@ -72,7 +72,7 @@ const ClosedDebateLoadingCard = () => {
<LoadingSkeleton />
</div>
</div>
<div className={`right ${sidebar ? '' : 'flex-unset'}`}>
<div className={`right ${sidebar ? 'flex-unset' : ''}`}>
<div className='user-info'>
<div className='debater'>
<LoadingSkeleton />
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/card/open-debate-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const OpenDebateCard = () => {
}

return (
<div id='open-card' className={sidebar ? '' : 'card-break'}>
<div id='open-card' className={sidebar ? 'card-break' : ''}>
<div className='debate-header'>
<h2 title='Artificial Intelligence – Is AI good for society or not? ↗' onClick={() => navigate('/')}>
Artificial Intelligence – Is AI good for society or not?
Expand All @@ -28,7 +28,7 @@ const OpenDebateCard = () => {
Fugiat repellat architecto pariatur fugit perspiciatis voluptas quidem autem.
</p>
<div className='user-info'>
<img src="/user.jpg" alt="" loading="lazy" onClick={() => handleProfileClick('julieroberts')} />
<img src='/user.jpg' alt='' loading='lazy' onClick={() => handleProfileClick('julieroberts')} />
<div className='user-detail'>
<p onClick={() => handleProfileClick('julieroberts')}>Julie Roberts</p>
<p onClick={() => handleProfileClick('julieroberts')}>julieroberts</p>
Expand Down Expand Up @@ -56,7 +56,7 @@ const OpenDebateLoadingCard = () => {
const { sidebar } = useNavStore();

return (
<div id='open-card-loading' className={sidebar ? '' : 'card-break'}>
<div id='open-card-loading' className={sidebar ? 'card-break' : ''}>
<div className='debate-header'>
<LoadingSkeleton />
<LoadingSkeleton />
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/loading/svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ interface Props {

const LoadingSVG: React.FC<Props> = ({ size, color }) => {
return (
<svg className="loading-spinner" width={size} height={size} viewBox={`0 0 16 16`} fill="none" data-view-component="true">
<circle cx="8" cy="8" r="7" stroke={color || "currentColor"} strokeOpacity="0.25" strokeWidth="2" vectorEffect="non-scaling-stroke" fill="none"></circle>
<path d="M15 8a7.002 7.002 0 00-7-7" stroke={color || "currentColor"} strokeWidth="2" strokeLinecap="round" vectorEffect="non-scaling-stroke"></path>
<svg className='loading-spinner' width={size} height={size} viewBox={`0 0 16 16`} fill='none' data-view-component='true'>
<circle cx='8' cy='8' r='7' stroke={color || 'currentColor'} strokeOpacity='0.25' strokeWidth='2' vectorEffect='non-scaling-stroke' fill='none'></circle>
<path d='M15 8a7.002 7.002 0 00-7-7' stroke={color || 'currentColor'} strokeWidth='2' strokeLinecap='round' vectorEffect='non-scaling-stroke'></path>
</svg>
)
}

const LoadingComponent = () => {
return (
<div className="loading-component">
<div className='loading-component'>
<LoadingSVG size={30} />
</div>
)
Expand Down
Loading

0 comments on commit d656874

Please sign in to comment.