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