Skip to content

Commit 31139ac

Browse files
feat: trusted bot perks on edit page
1 parent a2d2d54 commit 31139ac

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

pages/bots/[id]/edit.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ const ManageBotPage: NextPage<ManageBotProps> = ({ bot, user, csrfToken, theme }
8787
url: bot.url,
8888
git: bot.git,
8989
discord: bot.discord,
90+
vanity: bot.vanity,
91+
banner: bot.banner,
92+
bg: bot.bg,
9093
_csrf: csrfToken,
9194
})}
9295
validationSchema={ManageBotSchema}
@@ -270,6 +273,38 @@ const ManageBotPage: NextPage<ManageBotProps> = ({ bot, user, csrfToken, theme }
270273
</Segment>
271274
</Label>
272275
<Divider />
276+
<h2 className='pt-2 text-2xl font-semibold text-koreanbots-green'>신뢰된 봇 특전 설정</h2>
277+
<span className='mt-1 text-sm text-gray-400'>신뢰된 봇의 혜택을 만나보세요. (커스텀 URL과 배너/배경 이미지는 이용약관 및 가이드라인을 준수해야하며 위반 시 신뢰된 봇 자격이 박탈될 수 있습니다.)</span>
278+
<Label
279+
For='vanity'
280+
label='한디리 커스텀 URL'
281+
labelDesc='고유한 커스텀 URL을 설정해주세요.'
282+
error={errors.vanity && touched.vanity ? errors.vanity : null}
283+
284+
>
285+
<div className='flex items-center'>
286+
koreanbots.dev/bots/
287+
<Input name='vanity' placeholder='koreanbots' />
288+
</div>
289+
290+
</Label>
291+
<Label
292+
For='banner'
293+
label='배너 URL'
294+
labelDesc='봇 목록의 카드에 표시되는 이미지입니다.'
295+
error={errors.banner && touched.banner ? errors.banner : null}
296+
>
297+
<Input name='banner' placeholder='https://koreanbots.dev' />
298+
</Label>
299+
<Label
300+
For='bg'
301+
label='배경 URL'
302+
labelDesc='봇 페이지 배경에 표시되는 이미지입니다.'
303+
error={errors.bg && touched.bg ? errors.bg : null}
304+
>
305+
<Input name='bg' placeholder='https://koreanbots.dev' />
306+
</Label>
307+
<Divider />
273308
<p className='mb-5 mt-2 text-base'>
274309
<span className='font-semibold text-red-500'> *</span> = 필수 항목
275310
</p>
@@ -278,6 +313,7 @@ const ManageBotPage: NextPage<ManageBotProps> = ({ bot, user, csrfToken, theme }
278313
<i className='far fa-save' /> 저장
279314
</>
280315
</Button>
316+
281317
</Form>
282318
)}
283319
</Formik>

0 commit comments

Comments
 (0)