simplify user account and profile system for github locking
This commit is contained in:
@ -165,11 +165,11 @@ module.exports = function(app) {
|
|||||||
isMigrationGrandfathered: user.isMigrationGrandfathered,
|
isMigrationGrandfathered: user.isMigrationGrandfathered,
|
||||||
isGithubCool: user.isGithubCool,
|
isGithubCool: user.isGithubCool,
|
||||||
location: user.location,
|
location: user.location,
|
||||||
githubProfile: user.githubProfile,
|
githubProfile: user.github,
|
||||||
linkedinProfile: user.linkedinProfile,
|
linkedinProfile: user.linkedin,
|
||||||
codepenProfile: user.codepenProfile,
|
googleProfile: user.google,
|
||||||
facebookProfile: user.facebookProfile,
|
facebookProfile: user.facebook,
|
||||||
twitterHandle: user.twitterHandle,
|
twitterHandle: user.twitter,
|
||||||
bio: user.bio,
|
bio: user.bio,
|
||||||
picture: user.picture,
|
picture: user.picture,
|
||||||
progressTimestamps: user.progressTimestamps,
|
progressTimestamps: user.progressTimestamps,
|
||||||
|
@ -3,74 +3,77 @@ block content
|
|||||||
script.
|
script.
|
||||||
var challengeName = 'Account View'
|
var challengeName = 'Account View'
|
||||||
.panel.panel-info(ng-controller="profileValidationController")
|
.panel.panel-info(ng-controller="profileValidationController")
|
||||||
.panel-heading.text-center Update your portfolio here:
|
.panel-heading.text-center Manage your account here
|
||||||
.panel-body
|
.panel-body
|
||||||
if (!user.isGithubCool)
|
if (!user.isGithubCool)
|
||||||
.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
|
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
|
||||||
i.fa.fa-github
|
i.fa.fa-github
|
||||||
| Link GitHub to unlock profile
|
| Link my GitHub to unlock this profile
|
||||||
else
|
else
|
||||||
.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
|
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
|
||||||
i.fa.fa-github
|
i.fa.fa-github
|
||||||
| Update Github Info
|
| Update my profile from Github
|
||||||
|
|
||||||
if (!user.twitter)
|
if (!user.twitter)
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social.disabled(href='#')
|
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
|
||||||
i.fa.fa-twitter
|
i.fa.fa-twitter
|
||||||
| Add my Twitter to my profile
|
| Add my Twitter to my profile
|
||||||
if (!user.google)
|
|
||||||
.col-xs-12
|
|
||||||
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social.disabled(href='#')
|
|
||||||
i.fa.fa-google-plus
|
|
||||||
| Add my Google+ to my profile
|
|
||||||
if (!user.facebook)
|
if (!user.facebook)
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social.disabled(href='#')
|
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
|
||||||
i.fa.fa-facebook
|
i.fa.fa-facebook
|
||||||
| Add my Facebook to my profile
|
| Add my Facebook to my profile
|
||||||
if (!user.linkedin)
|
if (!user.linkedin)
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social.disabled(href='#')
|
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
|
||||||
i.fa.fa-linkedin
|
i.fa.fa-linkedin
|
||||||
| Add my LinkedIn to my profile
|
| Add my LinkedIn to my profile
|
||||||
|
if (!user.google)
|
||||||
.spacer
|
.col-xs-12
|
||||||
.spacer
|
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
|
||||||
.row
|
i.fa.fa-google-plus
|
||||||
.col-xs-6.col-sm-4.col-sm-offset-2
|
| Add my Google+ to my profile
|
||||||
a.btn.btn-warning.btn-block.btn-link-social(href='/logout')
|
.spacer
|
||||||
span.ion-android-exit
|
hr
|
||||||
| Sign me out of Free Code Camp
|
.spacer
|
||||||
.col-xs-6.col-sm-4
|
.col-xs-12
|
||||||
a.btn.btn-danger.btn-block.confirm-deletion.btn-link-social
|
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
|
||||||
span.ion-trash-b
|
span.ion-android-exit
|
||||||
| Delete my Free Code Camp account
|
| Sign me out of Free Code Camp
|
||||||
script.
|
.col-xs-12
|
||||||
$('.confirm-deletion').on("click", function() {
|
a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com')
|
||||||
$('#modal-dialog').modal('show');
|
span.ion-email
|
||||||
});
|
| Email us at team@freecodecamp.com
|
||||||
#modal-dialog.modal.animated.wobble
|
.col-xs-12
|
||||||
.modal-dialog
|
a.btn.btn-lg.btn-block.btn-danger.btn-link-social.confirm-deletion
|
||||||
.modal-content
|
span.ion-trash-b
|
||||||
.modal-header
|
| Delete my Free Code Camp account
|
||||||
a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
|
script.
|
||||||
h3 Are you really leaving us?
|
$('.confirm-deletion').on("click", function() {
|
||||||
.modal-body
|
$('#modal-dialog').modal('show');
|
||||||
p Pro Tip: If you tweet feedback to 
|
});
|
||||||
a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp
|
#modal-dialog.modal.animated.wobble
|
||||||
| , we'll act quickly on it!
|
.modal-dialog
|
||||||
.modal-footer
|
.modal-content
|
||||||
a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
|
.modal-header
|
||||||
span.ion-happy
|
a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
|
||||||
| Nevermind, I'll stick around
|
h3 Are you really leaving us?
|
||||||
br
|
.modal-body
|
||||||
form(action='/account/delete', method='POST')
|
p Pro Tip: If you tweet feedback to 
|
||||||
input(type='hidden', name='_csrf', value=_csrf)
|
a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp
|
||||||
button.btn.btn-danger.btn-block(type='submit')
|
| , we'll act quickly on it!
|
||||||
span.ion-trash-b
|
.modal-footer
|
||||||
| Yes, Delete my account
|
a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
|
||||||
|
span.ion-happy
|
||||||
|
| Nevermind, I'll stick around
|
||||||
|
br
|
||||||
|
form(action='/account/delete', method='POST')
|
||||||
|
input(type='hidden', name='_csrf', value=_csrf)
|
||||||
|
button.btn.btn-danger.btn-block(type='submit')
|
||||||
|
span.ion-trash-b
|
||||||
|
| Yes, Delete my account
|
||||||
|
@ -23,16 +23,16 @@ block content
|
|||||||
else
|
else
|
||||||
img.img-center.img-responsive.public-profile-img(src='https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png')
|
img.img-center.img-responsive.public-profile-img(src='https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png')
|
||||||
h1.text-center.negative-5.profile-social-icons
|
h1.text-center.negative-5.profile-social-icons
|
||||||
if (twitterHandle)
|
if (twitter)
|
||||||
a.fa.fa-twitter-square.text-primary(title="@#{username}'s Twitter Profile", href="http://twitter.com/#{twitterHandle}", target='_blank')
|
a.fa.fa-twitter-square.text-primary(title="@#{username}'s Twitter Profile", href=twitter, target='_blank')
|
||||||
if (githubProfile)
|
if (github)
|
||||||
a.fa.fa-github-square.text-primary(title="@#{username}'s GitHub Profile", href=githubProfile, target='_blank')
|
a.fa.fa-github-square.text-primary(title="@#{username}'s GitHub Profile", href=github, target='_blank')
|
||||||
if (codepenProfile)
|
if (linkedin)
|
||||||
a.ion-social-codepen.text-primary(title="@#{username}'s CodePen Profile", href=codepenProfile, target='_blank')
|
a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedin, target='_blank')
|
||||||
if (linkedinProfile)
|
if (facebook)
|
||||||
a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedinProfile, target='_blank')
|
a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href=facebook, target='_blank')
|
||||||
if (facebookProfile)
|
if (google)
|
||||||
a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href=facebookProfile, target='_blank')
|
a.fa.fa-google-square.text-primary(title="@#{username}'s Google Profile", href=google, target='_blank')
|
||||||
.visible-md.visible-lg
|
.visible-md.visible-lg
|
||||||
.col-xs-12.col-sm-12.col-md-4.text-justify
|
.col-xs-12.col-sm-12.col-md-4.text-justify
|
||||||
h1.flat-top.wrappable= name
|
h1.flat-top.wrappable= name
|
||||||
|
Reference in New Issue
Block a user