feat: add a entry for login (#51)

This commit is contained in:
Kilu.He
2025-02-26 17:18:54 +08:00
committed by GitHub
parent 9a1f150adb
commit 67d1fca11d
4 changed files with 29 additions and 12 deletions

View File

@ -2694,7 +2694,8 @@
"dropNotionFile": "Drop your Notion zip file here to upload, or click to browse",
"error": {
"pageNameIsEmpty": "The page name is empty, please try another one"
}
},
"visitOurWebsite": "Visit our official website"
},
"globalComment": {
"comments": "Comments",

4
src/assets/right.svg Normal file
View File

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 8H13M13 8L9.25 4.25M13 8L9.25 11.75" stroke="currentColor" stroke-linecap="round"
stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View File

@ -4,13 +4,19 @@ import { Divider } from '@mui/material';
import React from 'react';
import { ReactComponent as Logo } from '@/assets/logo.svg';
import { useTranslation } from 'react-i18next';
import { ReactComponent as ArrowRight } from '@/assets/right.svg';
export function Login({ redirectTo }: { redirectTo: string }) {
const { t } = useTranslation();
return (
<div className={'my-10 flex flex-col items-center justify-center gap-[24px] px-4'}>
<div className={'flex w-full flex-col items-center justify-center gap-[14px]'}>
<div
onClick={() => {
window.location.href = '/';
}}
className={'flex w-full cursor-pointer flex-col items-center justify-center gap-[14px]'}
>
<Logo className={'h-10 w-10'} />
<div className={'text-[24px] font-semibold max-sm:text-[20px]'}>{t('welcomeTo')} AppFlowy</div>
</div>
@ -44,6 +50,11 @@ export function Login ({ redirectTo }: { redirectTo: string }) {
</a>
.
</div>
<Divider className={'w-[300px] max-w-full border-line-divider'} />
<div className={'text-text-title text-xs font-medium cursor-pointer opacity-60 hover:opacity-100 w-full gap-2 flex items-center justify-center'}>
<span>{t('web.visitOurWebsite')}</span>
<ArrowRight className={'w-4 h-4'} />
</div>
</div>
);
}

View File

@ -1,6 +1,6 @@
import { notify } from '@/components/_shared/notify';
import { AFConfigContext } from '@/components/main/app.hooks';
import { Button, Collapse, Divider } from '@mui/material';
import { Button, Collapse } from '@mui/material';
import React, { useCallback, useContext, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { ReactComponent as GoogleSvg } from '@/assets/login/google.svg';
@ -83,14 +83,15 @@ function LoginProvider ({ redirectTo }: { redirectTo: string }) {
color={'inherit'}
size={'small'}
onClick={() => setExpand(!expand)}
className={'text-sm w-full flex gap-2 items-center hover:bg-transparent hover:text-text-title font-medium text-text-caption'}
className={'text-sm w-full flex gap-2 items-center hover:bg-transparent font-medium text-fill-default'}
>
<Divider className={'flex-1'} />
{t('web.moreOptions')}
<Divider className={'flex-1'} />
</Button>}
<Collapse className={'w-full'} in={expand}>
<Collapse
className={'w-full'}
in={expand}
>
<div className={'gap-[10px] w-full flex-col flex'}>{options.slice(2).map(renderOption)}</div>
</Collapse>
</div>