-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Blackoutseeker/dev
Implement account deletion request page for users
- Loading branch information
Showing
48 changed files
with
2,868 additions
and
1,799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16.x] | ||
node: [20.x] | ||
|
||
steps: | ||
- name: Checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16.x] | ||
node: [20.x] | ||
|
||
steps: | ||
- name: Checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16.x] | ||
node: [20.x] | ||
|
||
steps: | ||
- name: Checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
/** @type {import('prettier').Config} */ | ||
module.exports = { | ||
semi: false, | ||
singleQuote: true, | ||
arrowParens: 'avoid', | ||
trailingComma: 'none', | ||
endOfLine: 'auto' | ||
endOfLine: 'auto', | ||
plugins: ['prettier-plugin-tailwindcss'] | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.messageWrapper { | ||
@apply flex justify-center items-center w-full h-screen; | ||
@apply flex h-screen w-full items-center justify-center; | ||
} | ||
|
||
.messageText { | ||
@apply text-white font-bold text-center text-3xl mx-5; | ||
@apply mx-5 text-center text-3xl font-bold text-white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
.bannerContainer { | ||
@apply flex flex-wrap justify-center items-center w-full; | ||
@apply flex w-full flex-wrap items-center justify-center; | ||
} | ||
|
||
.logoContainer { | ||
@apply flex flex-grow items-center; | ||
} | ||
|
||
.iconContainer { | ||
@apply relative min-w-[100px] min-h-[100px] md:w-[150px] md:h-[150px]; | ||
@apply relative min-h-[100px] min-w-[100px] md:h-[150px] md:w-[150px]; | ||
} | ||
|
||
.appNameText { | ||
@apply text-white font-bold text-2xl ml-10 md:text-3xl md:mx-10; | ||
@apply ml-10 text-2xl font-bold text-white md:mx-10 md:text-3xl; | ||
} | ||
|
||
.developmentContainer { | ||
@apply flex flex-col justify-center h-[150px] space-y-[15px]; | ||
@apply flex h-[150px] flex-col justify-center space-y-[15px]; | ||
} | ||
|
||
.developmentText { | ||
@apply text-white font-bold text-xl; | ||
@apply text-xl font-bold text-white; | ||
} | ||
|
||
.developmentLogo { | ||
@apply flex items-center space-x-[15px]; | ||
} | ||
|
||
.frameworkText { | ||
@apply text-white font-bold text-lg; | ||
@apply text-lg font-bold text-white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.phoneViewContainer { | ||
@apply relative flex justify-center min-w-[260px] bg-black border-secondary border-[1px] px-[20px]; | ||
@apply pt-[40px] pb-[60px] rounded-3xl; | ||
@apply relative flex min-w-[260px] justify-center border-[1px] border-secondary bg-black px-[20px]; | ||
@apply rounded-3xl pb-[60px] pt-[40px]; | ||
} | ||
|
||
.phoneButton { | ||
@apply absolute bottom-5 w-16 h-6 border-secondary border-[1px] rounded-full; | ||
@apply absolute bottom-5 h-6 w-16 rounded-full border-[1px] border-secondary; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
.screenshotContainer { | ||
@apply flex flex-col items-center my-5 md:flex-row md:space-x-10; | ||
@apply my-5 flex flex-col items-center md:flex-row md:space-x-10; | ||
} | ||
|
||
.screenshotReverseContainer { | ||
@apply flex flex-col justify-end items-center my-5; | ||
@apply md:flex-row-reverse md:space-x-reverse md:space-x-10; | ||
@apply my-5 flex flex-col items-center justify-end; | ||
@apply md:flex-row-reverse md:space-x-10 md:space-x-reverse; | ||
} | ||
|
||
.screenshotText { | ||
@apply text-white text-xl text-justify w-full mb-10; | ||
@apply mb-10 w-full text-justify text-xl text-white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
.sectionContainer { | ||
@apply flex flex-col my-5; | ||
@apply my-5 flex flex-col; | ||
} | ||
|
||
.title { | ||
@apply text-white font-bold text-3xl my-5; | ||
@apply my-5 text-3xl font-bold text-white; | ||
} | ||
|
||
.bodyText { | ||
@apply text-white text-2xl text-justify; | ||
@apply text-justify text-2xl text-white; | ||
} | ||
|
||
.motivationText { | ||
@apply text-white text-2xl text-justify italic; | ||
@apply text-justify text-2xl italic text-white; | ||
} | ||
|
||
.quote { | ||
@apply text-white font-bold text-[40px] text-justify; | ||
@apply text-justify text-[40px] font-bold text-white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/components/DeleteAccount/DeleteAccountForm/DeleteAccountForm.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.formWrapper { | ||
@apply flex h-full w-full items-center justify-center text-white; | ||
} | ||
|
||
.formContainer { | ||
@apply flex max-w-[350px] flex-1 flex-col items-center justify-center space-y-5; | ||
} | ||
|
||
.appHeader { | ||
@apply mb-5 flex w-full items-center space-x-5; | ||
} | ||
|
||
.appHeaderTextWrapper { | ||
@apply flex flex-col space-y-5 font-bold; | ||
} | ||
|
||
.appTitle { | ||
@apply text-xl font-bold; | ||
} | ||
|
||
.appSubtitle { | ||
@apply text-base; | ||
} | ||
|
||
.dataList { | ||
@apply list-disc px-5 text-base; | ||
} | ||
|
||
.formInput { | ||
@apply w-full rounded-[4px] border-[1px] border-secondary bg-transparent; | ||
@apply resize-none p-[14px] text-base text-white placeholder:text-secondary; | ||
} | ||
|
||
.counter { | ||
@apply w-full text-right text-sm text-secondary; | ||
} | ||
|
||
.submitButton { | ||
@apply w-full rounded-[4px] px-5 py-[14px] font-bold disabled:cursor-default disabled:bg-primary; | ||
@apply cursor-pointer bg-white text-base text-background disabled:text-secondary; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import type { FC, FormEvent } from 'react' | ||
import type { App } from '@models/app' | ||
import { useState } from 'react' | ||
import { formatEmailPlaceholder } from '@utils/format' | ||
import Image from 'next/image' | ||
import Styles from './DeleteAccountForm.module.css' | ||
|
||
interface DeleteAccountFormProps { | ||
app: App | ||
locale: string | undefined | ||
} | ||
|
||
export const DeleteAccountForm: FC<DeleteAccountFormProps> = ({ app }) => { | ||
const [email, setEmail] = useState<string>('') | ||
const [message, setMessage] = useState<string>('') | ||
|
||
const emailPlaceholder = formatEmailPlaceholder( | ||
app.delete?.emailPlaceholder ?? '' | ||
) | ||
|
||
const disabled = email.length <= 0 | ||
|
||
const onSubmit = (event: FormEvent) => { | ||
event.preventDefault() | ||
} | ||
|
||
const renderDataList = app.delete?.dataList.map(data => ( | ||
<li key={data}>{data}</li> | ||
)) | ||
|
||
return ( | ||
<div className={Styles.formWrapper}> | ||
<form className={Styles.formContainer} onSubmit={onSubmit}> | ||
<div className={Styles.appHeader}> | ||
<Image src={app.icon} width={100} height={100} alt={app.name} /> | ||
<div className={Styles.appHeaderTextWrapper}> | ||
<h1 className={Styles.appTitle}>{app.name}</h1> | ||
<h2 className={Styles.appSubtitle}>{app.delete?.author}</h2> | ||
</div> | ||
</div> | ||
<h2 className={Styles.appTitle}>{app.delete?.title}</h2> | ||
<input | ||
className={Styles.formInput} | ||
required | ||
type="email" | ||
placeholder={emailPlaceholder} | ||
value={email} | ||
onChange={({ currentTarget }) => { | ||
setEmail(currentTarget.value) | ||
}} | ||
/> | ||
<textarea | ||
className={Styles.formInput} | ||
maxLength={150} | ||
placeholder={app.delete?.messagePlaceholder} | ||
value={message} | ||
onChange={({ currentTarget }) => { | ||
setMessage(currentTarget.value) | ||
}} | ||
/> | ||
<span className={Styles.counter}>{message.length}/150</span> | ||
<h2 className={Styles.appTitle}>{app.delete?.listTitle}</h2> | ||
<ul className={Styles.dataList}>{renderDataList}</ul> | ||
<input | ||
className={Styles.submitButton} | ||
type="submit" | ||
value={app.delete?.submitButtonTitle} | ||
disabled={disabled} | ||
/> | ||
</form> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.