Skip to content

Commit 84fbb55

Browse files
authored
Merge pull request desktop#17794 from desktop/sign-in-buttons
Increase specificity of sign in/out buttons
2 parents edee26c + 3bf1657 commit 84fbb55

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

app/src/ui/preferences/accounts.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,31 @@ export class Accounts extends React.Component<IAccountsProps, {}> {
2929
<DialogContent className="accounts-tab">
3030
<h2>GitHub.com</h2>
3131
{this.props.dotComAccount
32-
? this.renderAccount(this.props.dotComAccount)
32+
? this.renderAccount(this.props.dotComAccount, SignInType.DotCom)
3333
: this.renderSignIn(SignInType.DotCom)}
3434

3535
<h2>GitHub Enterprise</h2>
3636
{this.props.enterpriseAccount
37-
? this.renderAccount(this.props.enterpriseAccount)
37+
? this.renderAccount(
38+
this.props.enterpriseAccount,
39+
SignInType.Enterprise
40+
)
3841
: this.renderSignIn(SignInType.Enterprise)}
3942
</DialogContent>
4043
)
4144
}
4245

43-
private renderAccount(account: Account) {
46+
private renderAccount(account: Account, type: SignInType) {
4447
const avatarUser: IAvatarUser = {
4548
name: account.name,
4649
email: lookupPreferredEmail(account),
4750
avatarURL: account.avatarURL,
4851
endpoint: account.endpoint,
4952
}
5053

54+
const accountTypeLabel =
55+
type === SignInType.DotCom ? 'GitHub.com' : 'GitHub Enterprise'
56+
5157
return (
5258
<Row className="account-info">
5359
<Avatar user={avatarUser} />
@@ -56,7 +62,7 @@ export class Accounts extends React.Component<IAccountsProps, {}> {
5662
<div className="login">@{account.login}</div>
5763
</div>
5864
<Button onClick={this.logout(account)}>
59-
{__DARWIN__ ? 'Sign Out' : 'Sign out'}
65+
{__DARWIN__ ? 'Sign Out of' : 'Sign out of'} {accountTypeLabel}
6066
</Button>
6167
</Row>
6268
)
@@ -71,12 +77,12 @@ export class Accounts extends React.Component<IAccountsProps, {}> {
7177
}
7278

7379
private renderSignIn(type: SignInType) {
74-
const signInTitle = __DARWIN__ ? 'Sign In' : 'Sign in'
80+
const signInTitle = __DARWIN__ ? 'Sign Into' : 'Sign into'
7581
switch (type) {
7682
case SignInType.DotCom: {
7783
return (
7884
<CallToAction
79-
actionTitle={signInTitle}
85+
actionTitle={signInTitle + ' GitHub.com'}
8086
onAction={this.onDotComSignIn}
8187
>
8288
<div>
@@ -88,7 +94,7 @@ export class Accounts extends React.Component<IAccountsProps, {}> {
8894
case SignInType.Enterprise:
8995
return (
9096
<CallToAction
91-
actionTitle={signInTitle}
97+
actionTitle={signInTitle + ' GitHub Enterprise'}
9298
onAction={this.onEnterpriseSignIn}
9399
>
94100
<div>

app/styles/ui/_preferences.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@
5454
}
5555
}
5656
}
57+
58+
.call-to-action {
59+
display: block;
60+
61+
.button-component {
62+
margin-top: var(--spacing);
63+
margin-left: 0;
64+
}
65+
}
5766
}
5867

5968
.no-options-found {

0 commit comments

Comments
 (0)