give a user a brownie point when they start

This commit is contained in:
Quincy Larson
2015-08-10 20:55:01 -07:00
parent 44cf78afab
commit 7bfe61731b
3 changed files with 39 additions and 35 deletions

View File

@ -51,6 +51,14 @@ module.exports = function(User) {
user.email = typeof user.email === 'string' ?
user.email.trim().toLowerCase() :
user.email;
if (!user.progressTimestamps) {
user.progressTimestamps = [];
}
if (user.progressTimestamps.length === 0) {
user.progressTimestamps.push({ timestamp: Date.now() });
}
}
next();
});

View File

@ -5,15 +5,13 @@ block content
.panel.panel-info(ng-controller="profileValidationController")
.panel-heading.text-center Manage your account here
.panel-body
if (!user.isGithubCool)
.row
.col-xs-12
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
if (!user.isGithubCool)
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
i.fa.fa-github
| Link my GitHub to unlock this profile
else
.row
.col-xs-12
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
| Update my profile from Github
@ -38,9 +36,7 @@ block content
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
i.fa.fa-google-plus
| Add my Google+ to my profile
.spacer
hr
.spacer
.big-spacer
.col-xs-12
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
span.ion-android-exit

View File

@ -99,7 +99,7 @@ block content
| Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
.big-spacer
img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
img.gif-block.img-center.img-responsive.thumbnail(src='https://www.evernote.com/l/AlwO6CNq-OJJXJ3qu2nu1E7ePe72hCSW5IcB/image.png' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this: 
| Check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.