uibee 2.3.9 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
1
3
|
import { LoginPageProps } from 'uibee/components'
|
|
2
4
|
import { LogIn } from 'lucide-react'
|
|
3
|
-
import Link from 'next/link'
|
|
4
5
|
import Logo from '@components/logo/logo'
|
|
6
|
+
import Link from 'next/link'
|
|
5
7
|
|
|
6
|
-
export default function LoginPage({title, description, redirectURL, version, btg, handleSubmit}: LoginPageProps) {
|
|
8
|
+
export default function LoginPage({ title, description, redirectURL, version, btg, handleSubmit }: LoginPageProps) {
|
|
7
9
|
return (
|
|
8
10
|
<main className='w-full h-full flex items-center justify-center bg-login-800 p-8'>
|
|
9
11
|
<div
|
|
@@ -11,7 +13,7 @@ export default function LoginPage({title, description, redirectURL, version, btg
|
|
|
11
13
|
'flex flex-col justify-center items-center bg-login-600 px-4 py-12 rounded-xl w-full max-w-md gap-4 md:gap-6'
|
|
12
14
|
}
|
|
13
15
|
>
|
|
14
|
-
<div className='relative aspect-
|
|
16
|
+
<div className='relative aspect-3/1 w-full'>
|
|
15
17
|
<Logo className='object-contain px-6 sm:px-12' />
|
|
16
18
|
</div>
|
|
17
19
|
<h1 className='text-3xl font-extrabold text-login text-center tracking-tight'>
|
|
@@ -56,16 +58,17 @@ export default function LoginPage({title, description, redirectURL, version, btg
|
|
|
56
58
|
</button>
|
|
57
59
|
</form>
|
|
58
60
|
) : (
|
|
59
|
-
<Link
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
<Link
|
|
62
|
+
href={redirectURL}
|
|
63
|
+
className={`
|
|
64
|
+
flex items-center justify-center gap-2 w-full
|
|
65
|
+
max-w-xs py-3 px-6 rounded-xl bg-login font-bold
|
|
66
|
+
text-lg hover:bg-login/80 transition-all
|
|
67
|
+
duration-200 mb-2 mt-2 cursor-pointer
|
|
68
|
+
`}
|
|
69
|
+
>
|
|
70
|
+
Login
|
|
71
|
+
<LogIn className='w-6 h-6' />
|
|
69
72
|
</Link>
|
|
70
73
|
)}
|
|
71
74
|
<span className='text-sm mt-2'>v{version}</span>
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
+
import { removeCookies } from '@utils/cookies/cookies'
|
|
1
2
|
import { NextResponse } from 'next/server'
|
|
2
3
|
import type { AuthLogoutProps } from 'uibee/utils'
|
|
3
4
|
|
|
4
5
|
export default async function AuthLogout({ frontendURL }: AuthLogoutProps) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Remove all authentication cookies
|
|
8
|
-
const cookiesToRemove = [
|
|
6
|
+
removeCookies(
|
|
9
7
|
'access_token',
|
|
10
8
|
'user_id',
|
|
11
9
|
'user_name',
|
|
12
10
|
'user_nickname',
|
|
13
11
|
'user_email',
|
|
14
12
|
'user_groups'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
cookiesToRemove.forEach(cookieName => {
|
|
18
|
-
response.cookies.delete(cookieName)
|
|
19
|
-
})
|
|
13
|
+
)
|
|
20
14
|
|
|
15
|
+
const response = NextResponse.redirect(new URL('/', frontendURL))
|
|
21
16
|
return response
|
|
22
17
|
}
|