Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit945ea93

Browse files
BrunoQuaresmakylecarbs
authored andcommitted
refactor: Make login headline one line and add auth method section (#1922)
1 parent56c7c08 commit945ea93

File tree

2 files changed

+49
-12
lines changed

2 files changed

+49
-12
lines changed

‎site/src/components/SignInForm/SignInForm.tsx

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import FormHelperText from "@material-ui/core/FormHelperText"
33
importLinkfrom"@material-ui/core/Link"
44
import{makeStyles}from"@material-ui/core/styles"
55
importTextFieldfrom"@material-ui/core/TextField"
6+
importGitHubIconfrom"@material-ui/icons/GitHub"
67
import{FormikContextType,useFormik}from"formik"
78
import{FC}from"react"
89
import*asYupfrom"yup"
@@ -49,6 +50,29 @@ const useStyles = makeStyles((theme) => ({
4950
submitBtn:{
5051
marginTop:theme.spacing(2),
5152
},
53+
buttonIcon:{
54+
width:14,
55+
height:14,
56+
},
57+
divider:{
58+
paddingTop:theme.spacing(3),
59+
paddingBottom:theme.spacing(3),
60+
display:"flex",
61+
alignItems:"center",
62+
gap:theme.spacing(2),
63+
},
64+
dividerLine:{
65+
width:"100%",
66+
height:1,
67+
backgroundColor:theme.palette.divider,
68+
},
69+
dividerLabel:{
70+
flexShrink:0,
71+
color:theme.palette.text.secondary,
72+
textTransform:"uppercase",
73+
fontSize:12,
74+
letterSpacing:1,
75+
},
5276
}))
5377

5478
exportinterfaceSignInFormProps{
@@ -119,13 +143,30 @@ export const SignInForm: FC<SignInFormProps> = ({
119143
</div>
120144
</form>
121145
{authMethods?.github&&(
122-
<divclassName={styles.submitBtn}>
123-
<Linkhref={`/api/v2/users/oauth2/github/callback?redirect=${encodeURIComponent(redirectTo)}`}>
124-
<Buttondisabled={isLoading}fullWidthtype="submit"variant="contained">
125-
{Language.githubSignIn}
126-
</Button>
127-
</Link>
128-
</div>
146+
<>
147+
<divclassName={styles.divider}>
148+
<divclassName={styles.dividerLine}/>
149+
<divclassName={styles.dividerLabel}>Or</div>
150+
<divclassName={styles.dividerLine}/>
151+
</div>
152+
153+
<div>
154+
<Link
155+
underline="none"
156+
href={`/api/v2/users/oauth2/github/callback?redirect=${encodeURIComponent(redirectTo)}`}
157+
>
158+
<Button
159+
startIcon={<GitHubIconclassName={styles.buttonIcon}/>}
160+
disabled={isLoading}
161+
fullWidth
162+
type="submit"
163+
variant="contained"
164+
>
165+
{Language.githubSignIn}
166+
</Button>
167+
</Link>
168+
</div>
169+
</>
129170
)}
130171
</>
131172
)

‎site/src/components/Welcome/Welcome.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ export const Welcome: FC = () => {
1212
<CoderIconclassName={styles.logo}/>
1313
</div>
1414
<TypographyclassName={styles.title}variant="h1">
15-
<>
16-
Welcome to
17-
<br/>
18-
Coder
19-
</>
15+
Welcome to<strong>Coder</strong>
2016
</Typography>
2117
</div>
2218
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp