mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
select accounts package at app level; disable custom oauth buttons logic for now
This commit is contained in:
parent
2fca9b6900
commit
20b8227b64
4 changed files with 40 additions and 45 deletions
|
@ -43,5 +43,5 @@ nova:base-styles
|
|||
|
||||
############ Custom Packages ############
|
||||
|
||||
|
||||
|
||||
accounts-twitter
|
||||
# accounts-facebook
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
accounts-base@1.2.4
|
||||
accounts-facebook@1.0.7
|
||||
accounts-oauth@1.1.10
|
||||
accounts-password@1.1.6
|
||||
accounts-twitter@1.0.7
|
||||
|
@ -41,7 +40,6 @@ ecmascript@0.4.1
|
|||
ecmascript-runtime@0.2.8
|
||||
ejson@1.0.9
|
||||
email@1.0.10
|
||||
facebook@1.2.4
|
||||
fortawesome:fontawesome@4.5.0
|
||||
fourseven:scss@3.4.1
|
||||
geojson-utils@1.0.6
|
||||
|
@ -104,7 +102,6 @@ npm-bcrypt@0.7.8_2
|
|||
npm-mongo@1.4.41
|
||||
oauth@1.1.8
|
||||
oauth1@1.1.7
|
||||
oauth2@1.1.7
|
||||
observe-sequence@1.0.9
|
||||
ongoworks:speakingurl@9.0.0
|
||||
ordered-dict@1.0.5
|
||||
|
|
|
@ -50,47 +50,47 @@ class AccountsField extends Accounts.ui.Field {
|
|||
}
|
||||
}
|
||||
|
||||
class AccountsSocialButtons extends Accounts.ui.SocialButtons {
|
||||
render () {
|
||||
let { oauthServices = {}, className = "social_buttons" } = this.props;
|
||||
return(
|
||||
<div className={ className }>
|
||||
{Object.keys(oauthServices)
|
||||
.filter(service => oauthServices[service].disabled) // filter services registered but not enabled
|
||||
.map((id, i) => <Accounts.ui.Button {...oauthServices[id]} key={i} />)}
|
||||
</div>
|
||||
);
|
||||
// class AccountsSocialButtons extends Accounts.ui.SocialButtons {
|
||||
// render () {
|
||||
// let { oauthServices = {}, className = "social_buttons" } = this.props;
|
||||
// return(
|
||||
// <div className={ className }>
|
||||
// {Object.keys(oauthServices)
|
||||
// .filter(service => oauthServices[service].disabled) // filter services registered but not enabled
|
||||
// .map((id, i) => <Accounts.ui.Button {...oauthServices[id]} key={i} />)}
|
||||
// </div>
|
||||
// );
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
class AccountsPasswordOrService extends Accounts.ui.PasswordOrService {
|
||||
render () {
|
||||
let {
|
||||
oauthServices = {},
|
||||
className,
|
||||
style = {}
|
||||
} = this.props;
|
||||
let { hasPasswordService } = this.state;
|
||||
let labels = Object.keys(oauthServices)
|
||||
.filter(service => oauthServices[service].disabled) // filter services registered but not enabled
|
||||
.map(service => oauthServices[service].label);
|
||||
if (labels.length > 2) {
|
||||
labels = [];
|
||||
}
|
||||
// class AccountsPasswordOrService extends Accounts.ui.PasswordOrService {
|
||||
// render () {
|
||||
// let {
|
||||
// oauthServices = {},
|
||||
// className,
|
||||
// style = {}
|
||||
// } = this.props;
|
||||
// let { hasPasswordService } = this.state;
|
||||
// let labels = Object.keys(oauthServices)
|
||||
// .filter(service => oauthServices[service].disabled) // filter services registered but not enabled
|
||||
// .map(service => oauthServices[service].label);
|
||||
// if (labels.length > 2) {
|
||||
// labels = [];
|
||||
// }
|
||||
|
||||
if (hasPasswordService && labels.length > 0) {
|
||||
return (
|
||||
<div style={ style } className={ className }>
|
||||
{ `${T9n.get('or use')} ${ labels.join(' / ') }` }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// if (hasPasswordService && labels.length > 0) {
|
||||
// return (
|
||||
// <div style={ style } className={ className }>
|
||||
// { `${T9n.get('or use')} ${ labels.join(' / ') }` }
|
||||
// </div>
|
||||
// );
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
|
||||
Accounts.ui.Button = AccountsButton;
|
||||
Accounts.ui.Field = AccountsField;
|
||||
Accounts.ui.SocialButtons = AccountsSocialButtons;
|
||||
Accounts.ui.PasswordOrService = AccountsPasswordOrService;
|
||||
// Accounts.ui.SocialButtons = AccountsSocialButtons;
|
||||
// Accounts.ui.PasswordOrService = AccountsPasswordOrService;
|
|
@ -21,8 +21,6 @@ Package.onUse(function (api) {
|
|||
// 'accounts-ui',
|
||||
'accounts-base',
|
||||
'accounts-password',
|
||||
'accounts-twitter',
|
||||
'accounts-facebook',
|
||||
'check',
|
||||
'reactive-var',
|
||||
'http',
|
||||
|
|
Loading…
Add table
Reference in a new issue