Skip to content

Commit

Permalink
Update alert feature
Browse files Browse the repository at this point in the history
  • Loading branch information
taedonn committed Jan 27, 2024
1 parent 44b98a8 commit 2c8d2c0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function Header (
user_id: user ? user.id : null,
id: pageParam,
action: "fetch-alerts",
admin: user.id === 1 ? true : false,
admin: user.id === 1 ? "true" : "false",
user_email: user.email,
user_auth: user.auth,
}
Expand Down
18 changes: 9 additions & 9 deletions src/pages/api/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
<p style="text-align: center; margin: 40px 0;">
<img src="https://fonts-archive.s3.ap-northeast-2.amazonaws.com/3d_love_sign.png" alt="아이콘" style="width: 140px;"/>
</p>
<p style="width: 320px; font-size: 14px; font-weight: 400; line-height: 2; color: #3A3A3A; word-break: keep-all; margin: 0 auto;">
<p style="width: 320px; max-width: 100%; font-size: 14px; font-weight: 400; line-height: 2; color: #3A3A3A; word-break: keep-all; margin: 0 auto;">
폰트 아카이브를 이용해 주셔서 감사합니다! 문의해주신 내용 검토 후 최대한 빠른 시일 내에 답변드리겠습니다. <br/><br/>
부득이하게 문의해주신 내용을 반영하기 어려울 경우, 관련 내용 첨부해서 답변 드리겠습니다. 감사합니다! <br/><br/>
- 태돈
Expand Down Expand Up @@ -139,22 +139,22 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
<p style="text-align: center; margin: 40px 0;">
<img src="https://fonts-archive.s3.ap-northeast-2.amazonaws.com/3d_gun_sign.png" alt="아이콘" style="width: 140px;"/>
</p>
<p style="width: 320px; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto;">
<p style="width: 320px; max-width: 100%; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto;">
제목
</p>
<div style="width: 320px; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px;">
<div style="width: 320px; max-width: 100%; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px;">
${title}
</div>
<p style="width: 320px; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto; margin-top: 40px;">
<p style="width: 320px; max-width: 100%; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto; margin-top: 40px;">
이메일
</p>
<div style="width: 320px; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px;">
<div style="width: 320px; max-width: 100%; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px;">
${email}
</div>
<p style="width: 320px; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto; margin-top: 40px;">
<p style="width: 320px; max-width: 100%; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto; margin-top: 40px;">
문의 유형
</p>
<div style="width: 320px; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px;">
<div style="width: 320px; max-width: 100%; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px;">
${
type === "font"
? "폰트 관련 제보"
Expand All @@ -163,10 +163,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
: "기타 문의 사항"
}
</div>
<p style="width: 320px; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto; margin-top: 40px;">
<p style="width: 320px; max-width: 100%; font-size: 14px; font-weight: bold; line-height: 2; margin: 0 auto; margin-top: 40px;">
문의 내용
</p>
<pre style="width: 320px; min-height: 120px; white-space: pre-wrap; word-break: break-all; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px; font-family: 'Roboto', 'Noto Sans KR', '맑은고딕', Malgun Gothic, '돋움', Dotum, Helvetica, 'Apple SD Gothic Neo', Sans-serif;">${content}</pre>
<pre style="width: 320px; max-width: 100%; min-height: 120px; white-space: pre-wrap; word-break: break-all; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 8px; box-sizing: border-box; font-size: 14px; background-color: #E9F0FE; border-radius: 6px; font-family: 'Roboto', 'Noto Sans KR', '맑은고딕', Malgun Gothic, '돋움', Dotum, Helvetica, 'Apple SD Gothic Neo', Sans-serif;">${content}</pre>
<div style="width: 100%; height: 1px; background-color: #D2D4DC; margin: 0 auto; margin-top: 48px;"></div>
<p style="width: 100%; font-size: 12px; font-weight: 400; line-height: 2.5; margin: 0 auto; margin-top: 28px; color: #5F6368;">
<a style="color: #067DF7;" target="_blank" href="https://fonts.taedonn.com">홈페이지</a> ·
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/user/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const cursor = id ?? "";
const cursorObj: any = cursor === "" ? undefined : { alert_id: parseInt(cursor as string, 10) };

const alerts = admin
const alerts = admin === "true"
? await prisma.fontsAlert.findMany({ // 관리자일 때
orderBy: [{ alert_id: "desc" }],
take: limit,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/user/findpw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
안녕하세요 <span style="font-weight: bold; color: #000;">${user.user_name}</span>님, <br/>
아래 임시 비밀번호를 통해 로그인 하실 수 있습니다.
</p>
<div style="width: 320px; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 20px; box-sizing: border-box; background-color: #E9F0FE; font-size: 14px; text-decoration: none; border-radius: 6px;">
<div style="width: 320px; max-width: 100%; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 20px; box-sizing: border-box; background-color: #E9F0FE; font-size: 14px; text-decoration: none; border-radius: 6px;">
${randomPw}
</div>
<div style="width: 100%; height: 1px; background-color: #D2D4DC; margin-top: 48px;"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/user/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
안녕하세요 <span style="font-weight: bold; color: #000;">${name}</span>님, <br/>
아래 버튼을 클릭해서 회원가입을 완료해 주세요.
</p>
<a style="width: 280px; display: block; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 20px; box-sizing: border-box; background-color: #1B73E7; font-size: 14px; font-weight: bold; text-align: center; color: #FFF; text-decoration: none; border-radius: 6px;" href="https://fonts.taedonn.com/confirm?token=${email_token}">
<a style="width: 280px; max-width: 100%; display: block; padding: 16px 20px; box-sizing: border-box; margin: 0 auto; margin-top: 20px; box-sizing: border-box; background-color: #1B73E7; font-size: 14px; font-weight: bold; text-align: center; color: #FFF; text-decoration: none; border-radius: 6px;" href="https://fonts.taedonn.com/confirm?token=${email_token}">
회원가입 완료하기
</a>
<div style="width: 100%; height: 1px; background-color: #D2D4DC; margin-top: 48px;"></div>
Expand Down

0 comments on commit 2c8d2c0

Please sign in to comment.