feat: fix login
This commit is contained in:
parent
44d64361b0
commit
8064e1953d
|
|
@ -15,7 +15,7 @@ export default async function AuthLayout({
|
|||
const t = await getT();
|
||||
|
||||
return (
|
||||
<div className="dark !bg-black">
|
||||
<div className="dark !bg-black lbox">
|
||||
<ReturnUrlComponent />
|
||||
<div className="absolute start-0 top-0 z-[0] h-[100vh] w-[100vw] overflow-hidden bg-loginBg bg-contain bg-no-repeat bg-left-top" />
|
||||
<div className="relative z-[1] px-3 lg:pr-[100px] xs:mt-[70px] flex justify-center lg:justify-end items-center h-[100vh] w-[100vw] overflow-hidden">
|
||||
|
|
@ -64,7 +64,7 @@ export default async function AuthLayout({
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-[32px] w-full h-[660px] text-textColor">
|
||||
<div className="p-[32px] w-full h-[660px] text-textColor rbox">
|
||||
{children}
|
||||
</div>
|
||||
<div className="flex flex-1 flex-col">
|
||||
|
|
|
|||
|
|
@ -467,6 +467,14 @@ div div .set-font-family {
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
html[dir='rtl'] .rbox {
|
||||
direction: rtl !important;
|
||||
}
|
||||
|
||||
html[dir='rtl'] .lbox {
|
||||
direction: ltr !important;
|
||||
}
|
||||
|
||||
html[dir='rtl'] [dir='ltr'] {
|
||||
direction: rtl !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ export function Login() {
|
|||
</Button>
|
||||
</div>
|
||||
<p className="mt-4 text-sm">
|
||||
{t('don_t_have_an_account', "Don't Have An Account?")}
|
||||
{t('don_t_have_an_account', "Don't Have An Account?")}
|
||||
<Link href="/auth" className="underline cursor-pointer">
|
||||
{t('sign_up', 'Sign Up')}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -205,20 +205,20 @@ export function RegisterAfter({
|
|||
{t(
|
||||
'by_registering_you_agree_to_our',
|
||||
'By registering you agree to our'
|
||||
)}
|
||||
)}
|
||||
<a
|
||||
href={`https://postiz.com/terms`}
|
||||
className="underline hover:font-bold"
|
||||
>
|
||||
{t('terms_of_service', 'Terms of Service')}
|
||||
</a>
|
||||
{t('and', 'and')}
|
||||
</a>
|
||||
{t('and', 'and')}
|
||||
<a
|
||||
href={`https://postiz.com/privacy`}
|
||||
className="underline hover:font-bold"
|
||||
>
|
||||
{t('privacy_policy', 'Privacy Policy')}
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
<div className="text-center mt-6">
|
||||
<div className="w-full flex">
|
||||
|
|
@ -231,7 +231,7 @@ export function RegisterAfter({
|
|||
</Button>
|
||||
</div>
|
||||
<p className="mt-4 text-sm">
|
||||
{t('already_have_an_account', 'Already Have An Account?')}
|
||||
{t('already_have_an_account', 'Already Have An Account?')}
|
||||
<Link href="/auth/login" className="underline cursor-pointer">
|
||||
{t('sign_in', 'Sign In')}
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -131,9 +131,11 @@ export const SettingsPopup: FC<{
|
|||
{t('auto_post', 'Auto Post')}
|
||||
</Tabs.Tab>
|
||||
)}
|
||||
<Tabs.Tab value="signatures">
|
||||
{t('signatures', 'Signatures')}
|
||||
</Tabs.Tab>
|
||||
{user?.tier.current !== 'FREE' && (
|
||||
<Tabs.Tab value="signatures">
|
||||
{t('signatures', 'Signatures')}
|
||||
</Tabs.Tab>
|
||||
)}
|
||||
{!!user?.tier?.public_api && isGeneral && showLogout && (
|
||||
<Tabs.Tab value="api">{t('public_api', 'Public API')}</Tabs.Tab>
|
||||
)}
|
||||
|
|
@ -239,10 +241,11 @@ export const SettingsPopup: FC<{
|
|||
</Tabs.Panel>
|
||||
)}
|
||||
|
||||
<Tabs.Panel value="signatures" pt="md">
|
||||
<SignaturesComponent />
|
||||
</Tabs.Panel>
|
||||
|
||||
{user?.tier.current !== 'FREE' && (
|
||||
<Tabs.Panel value="signatures" pt="md">
|
||||
<SignaturesComponent />
|
||||
</Tabs.Panel>
|
||||
)}
|
||||
{!!user?.tier?.public_api && isGeneral && showLogout && (
|
||||
<Tabs.Panel value="api" pt="md">
|
||||
<PublicComponent />
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ export async function middleware(request: NextRequest) {
|
|||
? acceptLanguage.get(request.cookies.get(cookieName).value)
|
||||
: acceptLanguage.get(request.headers.get('Accept-Language'))) ||
|
||||
fallbackLng;
|
||||
|
||||
console.log(request.cookies.has(cookieName));
|
||||
const headers = new Headers(request.headers);
|
||||
headers.set(headerName, lng);
|
||||
if (
|
||||
|
|
|
|||
Loading…
Reference in New Issue