Merge pull request #5610 from matrix-org/t3chguy/cherrypick/5609

[Release] Iterate Social Logins work around edge cases and branding
pull/21833/head
Michael Telatynski 2021-02-02 17:40:41 +00:00 committed by GitHub
commit 6eee6cf8cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 16 deletions

View File

@ -72,14 +72,3 @@ limitations under the License.
}
}
}
.mx_SSOButton.mx_SSOButton_brand_facebook {
background-color: #3c5a99;
border-color: #3c5a99;
color: #ffffff;
}
.mx_SSOButton.mx_SSOButton_brand_twitter {
background-color: #47acdf;
border-color: #47acdf;
color: #ffffff;
}

View File

@ -1,4 +1,9 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.9431 22.5022C22.5832 22.5022 23.1022 21.9832 23.1022 21.343V2.65915C23.1022 2.01886 22.5832 1.5 21.9431 1.5H3.25914C2.61884 1.5 2.09998 2.01886 2.09998 2.65915V21.343C2.09998 21.9831 2.61876 22.5022 3.25914 22.5022H21.9431Z" fill="white"/>
<path d="M16.5913 22.5022V14.369H19.3212L19.73 11.1993H16.5913V9.17572C16.5913 8.25803 16.8461 7.63266 18.1621 7.63266L19.8405 7.63192V4.79696C19.5502 4.75833 18.5539 4.67203 17.3947 4.67203C14.9748 4.67203 13.318 6.14917 13.318 8.86181V11.1993H10.5811V14.369H13.318V22.5022H16.5913Z" fill="#3C5A99"/>
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="2" y="1" width="22" height="22">
<path d="M2.10154 1.5H23.1003V22.3716H2.10154V1.5Z" fill="white"/>
</mask>
<g mask="url(#mask0)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.1 11.999C23.1 6.20003 18.399 1.49902 12.6 1.49902C6.801 1.49902 2.1 6.20003 2.1 11.999C2.1 17.2399 5.9397 21.5838 10.9594 22.3715V15.0342H8.29336V11.999H10.9594V9.68574C10.9594 7.05418 12.5269 5.60059 14.9254 5.60059C16.0742 5.60059 17.2758 5.80566 17.2758 5.80566V8.38965H15.9518C14.6474 8.38965 14.2406 9.19903 14.2406 10.0294V11.999H17.1527L16.6872 15.0342H14.2406V22.3715C19.2603 21.5838 23.1 17.2399 23.1 11.999Z" fill="#1877F2"/>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.6872 15.0342L17.1527 11.999H14.2406V10.0294C14.2406 9.19903 14.6474 8.38965 15.9518 8.38965H17.2758V5.80566C17.2758 5.80566 16.0742 5.60059 14.9254 5.60059C12.5269 5.60059 10.9594 7.05418 10.9594 9.68574V11.999H8.29336V15.0342H10.9594V22.3715C11.494 22.4553 12.0419 22.499 12.6 22.499C13.1581 22.499 13.706 22.4553 14.2406 22.3715V15.0342H16.6872Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,3 +1,3 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.04151 21C6.61526 21 4.35358 20.2943 2.44995 19.0767C4.0662 19.1813 6.9185 18.9308 8.69264 17.2386C6.02376 17.1161 4.82015 15.0692 4.66316 14.1945C4.88992 14.2819 5.97143 14.3869 6.58195 14.142C3.51187 13.3722 3.0409 10.678 3.14556 9.85573C3.7212 10.2581 4.69804 10.3981 5.0818 10.3631C2.22105 8.31618 3.25022 5.23707 3.75609 4.57226C5.80907 7.4165 8.88585 9.01393 12.6922 9.10278C12.6205 8.78802 12.5826 8.46032 12.5826 8.12373C12.5826 5.70819 14.535 3.75 16.9435 3.75C18.2019 3.75 19.3358 4.28457 20.1317 5.13963C20.9726 4.94258 22.2382 4.4813 22.8569 4.0824C22.545 5.20208 21.5742 6.13612 20.9869 6.48231C20.9918 6.49408 20.9821 6.47048 20.9869 6.48231C21.5027 6.40428 22.8985 6.13603 23.45 5.76192C23.1773 6.39094 22.1479 7.4368 21.3032 8.02232C21.4604 14.9535 16.1573 21 9.04151 21Z" fill="white"/>
<path d="M9.04155 21C6.6153 21 4.35363 20.2943 2.45 19.0767C4.06624 19.1813 6.91855 18.9308 8.69268 17.2386C6.0238 17.1161 4.82019 15.0692 4.6632 14.1945C4.88997 14.2819 5.97147 14.3869 6.582 14.142C3.51192 13.3722 3.04094 10.678 3.1456 9.85573C3.72124 10.2581 4.69809 10.3981 5.08185 10.3631C2.22109 8.31618 3.25027 5.23707 3.75613 4.57226C5.80911 7.4165 8.8859 9.01393 12.6923 9.10278C12.6205 8.78802 12.5826 8.46032 12.5826 8.12373C12.5826 5.70819 14.5351 3.75 16.9435 3.75C18.2019 3.75 19.3358 4.28457 20.1318 5.13963C20.9727 4.94258 22.2382 4.4813 22.8569 4.0824C22.5451 5.20208 21.5742 6.13612 20.9869 6.48231C20.9918 6.49408 20.9821 6.47048 20.9869 6.48231C21.5028 6.40428 22.8986 6.13603 23.45 5.76192C23.1773 6.39094 22.148 7.4368 21.3033 8.02232C21.4604 14.9535 16.1574 21 9.04155 21Z" fill="#1D9BF0"/>
</svg>

Before

Width:  |  Height:  |  Size: 918 B

After

Width:  |  Height:  |  Size: 916 B

View File

@ -340,8 +340,8 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
};
onTryRegisterClick = ev => {
const hasPasswordFlow = this.state.flows.find(flow => flow.type === "m.login.password");
const ssoFlow = this.state.flows.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas");
const hasPasswordFlow = this.state.flows?.find(flow => flow.type === "m.login.password");
const ssoFlow = this.state.flows?.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas");
// If has no password flow but an SSO flow guess that the user wants to register with SSO.
// TODO: instead hide the Register button if registration is disabled by checking with the server,
// has no specific errCode currently and uses M_FORBIDDEN.