mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
Merge pull request #388 from koreanbots/master
Bugs fixed, improved some
This commit is contained in:
commit
7c99da2969
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Korean
|
## Korean
|
||||||
|
|
||||||
[버그 바운티 프로그램](https://beta.koreanbots.dev/security)
|
[버그 바운티 프로그램](https://koreanbots.dev/security)
|
||||||
|
|
||||||
## English
|
## English
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ const BotCard: React.FC<BotCardProps> = ({ manage = false, bot }) => {
|
|||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
{manage ? (
|
{manage ? (
|
||||||
<Link href={`/bots${bot.id}/edit`}>
|
<Link href={`/bots/${bot.id}/edit`}>
|
||||||
<a className='py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'>
|
<a className='py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'>
|
||||||
관리하기
|
관리하기
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const TextArea: React.FC<TextAreaProps> = ({ name, placeholder, theme='auto', ma
|
|||||||
<div className='emoji-selector-button outline-none' onClick={() => setEmojiPickerHidden(false)} onKeyPress={() => setEmojiPickerHidden(false)} role='button' tabIndex={0} />
|
<div className='emoji-selector-button outline-none' onClick={() => setEmojiPickerHidden(false)} onKeyPress={() => setEmojiPickerHidden(false)} role='button' tabIndex={0} />
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
max && <span className={`absolute bottom-2 right-4${max < value.length ? ' text-red-400' : ''}`}>
|
max && <span className={`absolute bottom-2 right-4 ${max < value.length ? ' text-red-400' : ''}`}>
|
||||||
{max-value.length}
|
{max-value.length}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,6 +81,7 @@ const Search: React.FC = () => {
|
|||||||
className='relative z-10 flex mt-5 w-full text-black dark:text-gray-100 dark:bg-very-black bg-white rounded-lg'
|
className='relative z-10 flex mt-5 w-full text-black dark:text-gray-100 dark:bg-very-black bg-white rounded-lg'
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
type='search'
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
className='flex-grow pr-20 px-7 py-3 h-16 text-xl bg-transparent border-0 border-none outline-none shadow'
|
className='flex-grow pr-20 px-7 py-3 h-16 text-xl bg-transparent border-0 border-none outline-none shadow'
|
||||||
placeholder='검색...'
|
placeholder='검색...'
|
||||||
|
|||||||
@ -39,6 +39,7 @@ const Search:NextPage<SearchProps> = ({ data, query }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getServerSideProps = async(ctx: Context) => {
|
export const getServerSideProps = async(ctx: Context) => {
|
||||||
|
if(ctx.query.query && !ctx.query.q) ctx.query.q = ctx.query.query
|
||||||
if(!ctx.query?.q) {
|
if(!ctx.query?.q) {
|
||||||
ctx.res.statusCode = 301
|
ctx.res.statusCode = 301
|
||||||
ctx.res.setHeader('Location', '/')
|
ctx.res.setHeader('Location', '/')
|
||||||
@ -69,7 +70,8 @@ interface Context extends NextPageContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface URLQuery extends ParsedUrlQuery {
|
interface URLQuery extends ParsedUrlQuery {
|
||||||
q: string
|
q?: string
|
||||||
|
query?: string
|
||||||
page?: string
|
page?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
Loading…
x
Reference in New Issue
Block a user