-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(oauth): remove code according to user prompts #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,23 @@ | ||
| .btn-facebook { | ||
| <% if (filters.oauth) { %><% if (filters.facebookAuth) { %>.btn-facebook { | ||
| color: #fff; | ||
| background-color: #3B5998; | ||
| border-color: #133783; | ||
| } | ||
|
|
||
| <% } if (filters.twitterAuth) { %> | ||
| .btn-twitter { | ||
| color: #fff; | ||
| background-color: #2daddc; | ||
| border-color: #0271bf; | ||
| } | ||
|
|
||
| .btn-github { | ||
| color: #fff; | ||
| background-color: #fafafa; | ||
| border-color: #ccc; | ||
| } | ||
|
|
||
| <% } if (filters.googleAuth) { %> | ||
| .btn-google-plus { | ||
| color: #fff; | ||
| background-color: #dd4b39; | ||
| border-color: #c53727; | ||
| } | ||
| } | ||
| <% } %> | ||
| .btn-github { | ||
| color: #fff; | ||
| background-color: #fafafa; | ||
| border-color: #ccc; | ||
| }<% } %> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,30 @@ | ||
| <% if(filters.bootstrap) { %> | ||
| // Colors | ||
| <% if(filters.bootstrap) { %>// Colors | ||
| // -------------------------------------------------- | ||
|
|
||
| @btnText: #fff; | ||
| @btnTextAlt: #000; | ||
|
|
||
| @btnTextAlt: #000;<% if (filters.oauth) { %> | ||
| <% if (filters.facebookAuth) { %> | ||
| @btnFacebookBackground: #3B5998; | ||
| @btnFacebookBackgroundHighlight: #133783; | ||
|
|
||
| @btnFacebookBackgroundHighlight: #133783;<% } if (filters.twitterAuth) { %> | ||
| @btnTwitterBackground: #2daddc; | ||
| @btnTwitterBackgroundHighlight: #0271bf; | ||
|
|
||
| @btnTwitterBackgroundHighlight: #0271bf;<% } if (filters.googleAuth) { %> | ||
| @btnGooglePlusBackground: #dd4b39; | ||
| @btnGooglePlusBackgroundHighlight: #c53727;<% } %> | ||
| @btnGithubBackground: #fafafa; | ||
| @btnGithubBackgroundHighlight: #ccc; | ||
|
|
||
| @btnGooglePlusBackground: #dd4b39; | ||
| @btnGooglePlusBackgroundHighlight: #c53727; | ||
|
|
||
|
|
||
| // Social buttons | ||
| // -------------------------------------------------- | ||
|
|
||
| <% if (filters.facebookAuth) { %> | ||
| .btn-facebook { | ||
| .button-variant(@btnText; @btnFacebookBackgroundHighlight; @btnFacebookBackgroundHighlight); | ||
| } | ||
|
|
||
| }<% } if (filters.twitterAuth) { %> | ||
| .btn-twitter { | ||
| .button-variant(@btnText; @btnTwitterBackground; @btnTwitterBackgroundHighlight); | ||
| } | ||
|
|
||
| .btn-github { | ||
| .button-variant(@btnTextAlt; @btnGithubBackground; @btnGithubBackgroundHighlight); | ||
| } | ||
|
|
||
| }<% } if (filters.googleAuth) { %> | ||
| .btn-google-plus { | ||
| .button-variant(@btnText; @btnGooglePlusBackground; @btnGooglePlusBackgroundHighlight); | ||
| }<% } %> | ||
| }<% } %> | ||
| .btn-github { | ||
| .button-variant(@btnTextAlt; @btnGithubBackground; @btnGithubBackgroundHighlight); | ||
| }<% } %><% } %> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,30 @@ | ||
| <% if(filters.bootstrap) { %> | ||
| // Colors | ||
| <% if(filters.bootstrap) { %>// Colors | ||
| // -------------------------------------------------- | ||
|
|
||
| $btnText: #fff; | ||
| $btnTextAlt: #000; | ||
|
|
||
| $btnTextAlt: #000;<% if (filters.oauth) { %> | ||
| <% if (filters.facebookAuth) { %> | ||
| $btnFacebookBackground: #3B5998; | ||
| $btnFacebookBackgroundHighlight: #133783; | ||
|
|
||
| $btnFacebookBackgroundHighlight: #133783;<% } if (filters.twitterAuth) { %> | ||
| $btnTwitterBackground: #2daddc; | ||
| $btnTwitterBackgroundHighlight: #0271bf; | ||
|
|
||
| $btnTwitterBackgroundHighlight: #0271bf;<% } if (filters.googleAuth) { %> | ||
| $btnGooglePlusBackground: #dd4b39; | ||
| $btnGooglePlusBackgroundHighlight: #c53727;<% } %> | ||
| $btnGithubBackground: #fafafa; | ||
| $btnGithubBackgroundHighlight: #ccc; | ||
|
|
||
| $btnGooglePlusBackground: #dd4b39; | ||
| $btnGooglePlusBackgroundHighlight: #c53727; | ||
|
|
||
|
|
||
| // Social buttons | ||
| // -------------------------------------------------- | ||
|
|
||
| <% if (filters.facebookAuth) { %> | ||
| .btn-facebook { | ||
| @include button-variant($btnText, $btnFacebookBackgroundHighlight, $btnFacebookBackgroundHighlight); | ||
| } | ||
|
|
||
| }<% } if (filters.twitterAuth) { %> | ||
| .btn-twitter { | ||
| @include button-variant($btnText, $btnTwitterBackground, $btnTwitterBackgroundHighlight); | ||
| } | ||
|
|
||
| .btn-github { | ||
| @include button-variant($btnTextAlt, $btnGithubBackground, $btnGithubBackgroundHighlight); | ||
| } | ||
|
|
||
| }<% } if (filters.googleAuth) { %> | ||
| .btn-google-plus { | ||
| @include button-variant($btnText, $btnGooglePlusBackground, $btnGooglePlusBackgroundHighlight); | ||
| }<% } %> | ||
| }<% } %> | ||
| .btn-github { | ||
| @include button-variant($btnTextAlt, $btnGithubBackground, $btnGithubBackgroundHighlight); | ||
| }<% } %><% } %> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| // Social buttons | ||
| <% if (filters.oauth) { %>// Social buttons | ||
| // -------------------------------------------------- | ||
|
|
||
| <% if (filters.facebookAuth) { %> | ||
| .btn-facebook | ||
| color: #fff; | ||
| background-color: #3B5998; | ||
| border-color: #133783; | ||
|
|
||
| <% } if (filters.twitterAuth) { %> | ||
| .btn-twitter | ||
| color: #fff; | ||
| background-color: #2daddc; | ||
| border-color: #0271bf; | ||
|
|
||
| .btn-github | ||
| color: #fff; | ||
| background-color: #fafafa; | ||
| border-color: #ccc; | ||
|
|
||
| <% } if (filters.googleAuth) { %> | ||
| .btn-google-plus | ||
| color: #fff; | ||
| background-color: #dd4b39; | ||
| border-color: #c53727; | ||
| border-color: #c53727; | ||
| <% } %> | ||
| .btn-github | ||
| color: #fff; | ||
| background-color: #fafafa; | ||
| border-color: #ccc;<% } %> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,18 +6,14 @@ | |
| // This file should not be tracked by git. | ||
|
|
||
| module.exports = { | ||
| DOMAIN: 'http://localhost:9000', | ||
| SESSION_SECRET: "<%= _.slugify(appname) + '-secret' %>", | ||
|
|
||
| FACEBOOK_ID: 'app-id', | ||
| FACEBOOK_SECRET: 'secret', | ||
|
|
||
| TWITTER_ID: 'app-id', | ||
| TWITTER_SECRET: 'secret', | ||
|
|
||
| GOOGLE_ID: 'app-id', | ||
| GOOGLE_SECRET: 'secret', | ||
|
|
||
| DOMAIN: 'http://localhost:9000', | ||
| SESSION_SECRET: "<%= _.slugify(appname) + '-secret' %>",<% if (filters.facebookAuth) { %> | ||
| FACEBOOK_ID: 'app-id', | ||
| FACEBOOK_SECRET: 'secret',<% } if (filters.twitterAuth) { %> | ||
| TWITTER_ID: 'app-id', | ||
| TWITTER_SECRET: 'secret',<% } if (filters.googleAuth) { %> | ||
| GOOGLE_ID: 'app-id', | ||
| GOOGLE_SECRET: 'secret',<% } %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would vote for preserving previous formatting here
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In order to make some refactoring in (For Twitter, there is no scope)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we should depend on system (is it even possible on heroku?) ability to set array as an environment variable. Also scope isn't secret, and Regarding Google scope, seems like there are some changes on a horizon and scope should be changed to:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Right. Any idea where to put scope, @chester1000?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? It's enough to just replace: with
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't understand this point.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hopefully this will remind you ;)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. I understand. But, it will work and will not prevent using my "trick". I will make a PR to show you. PS: Thank for the quote. I was seeking the markdown shortcut and didn't find it immediately, so I passed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay I will preserve the line breaks
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chester1000, take a look at https://github.com/remicastaing/generator-angular-fullstack/commit/923d7c2675de8a56813621dc73727ddf36622cb2. I have done some refactoring in |
||
| // Control debug level for modules using visionmedia/debug | ||
| // DEBUG: "" | ||
| }; | ||
| DEBUG: '' | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
this.filters.oauth = true?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using an other name before with a
-, so the array markup was needed, not anymore now so if you really prefer the dot notation I could switchThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum oh and the global syntax of the
index.jswas this way before but seems to have changed now