mirror of
https://github.com/vale981/accounts-ui
synced 2025-03-06 18:31:44 -05:00

* Option for "NO_PASSWORD" changed to "EMAIL_ONLY_NO_PASSWORD" * Added new options to accounts-password "USERNAME_AND_EMAIL_NO_PASSWORD".
28 lines
700 B
JavaScript
28 lines
700 B
JavaScript
import React from 'react';
|
||
import { Accounts } from 'meteor/accounts-base';
|
||
import { T9n } from 'meteor/softwarerero:accounts-t9n';
|
||
|
||
export class PasswordOrService extends React.Component {
|
||
render () {
|
||
let {
|
||
oauthServices = {},
|
||
className,
|
||
style = {}
|
||
} = this.props;
|
||
let labels = Object.keys(oauthServices).map(service => oauthServices[service].label);
|
||
if (labels.length > 2) {
|
||
labels = [];
|
||
}
|
||
|
||
if (labels.length) {
|
||
return (
|
||
<div style={ style } className={ className }>
|
||
{ `${T9n.get('or use')} ${ labels.join(' / ') }` }
|
||
</div>
|
||
);
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
Accounts.ui.PasswordOrService = PasswordOrService;
|