diff --git a/client/views/signIn/signIn.coffee b/client/views/signIn/signIn.coffee index 96bfb682..77d167c9 100644 --- a/client/views/signIn/signIn.coffee +++ b/client/views/signIn/signIn.coffee @@ -3,7 +3,7 @@ AccountsEntry.entrySignInHelpers = { if AccountsEntry.settings.passwordSignupFields is 'EMAIL_ONLY' 'email' else - 'string' + 'text' emailPlaceholder: -> fields = AccountsEntry.settings.passwordSignupFields diff --git a/client/views/signIn/signIn.html b/client/views/signIn/signIn.html index 174a087e..fbc7a025 100644 --- a/client/views/signIn/signIn.html +++ b/client/views/signIn/signIn.html @@ -35,8 +35,8 @@

{{t9n "signIn"}}

{{#unless isUsernameOnly}}

{{t9n "forgotPassword"}}

- {{/unless}} + {{/if}} {{#if showCreateAccountLink}} diff --git a/client/views/signUp/signUp.html b/client/views/signUp/signUp.html index 6b1d1132..79869d98 100644 --- a/client/views/signUp/signUp.html +++ b/client/views/signUp/signUp.html @@ -16,7 +16,7 @@

{{t9n "createAccount"}}

{{/each}} {{#if passwordLoginService}}
- OR + {{t9n "OR"}} {{t9n "signUpWithYourEmailAddress"}} @@ -32,7 +32,7 @@

{{t9n "createAccount"}}

{{#if showUsername}}
- +
{{/if}} @@ -40,16 +40,16 @@

{{t9n "createAccount"}}

{{#if showUsername}} - + {{else}} - + {{/if}}
{{/if}}
- +
{{#if showSignupCode}} diff --git a/package.js b/package.js index 3017d93a..37454e23 100644 --- a/package.js +++ b/package.js @@ -1,9 +1,13 @@ Package.describe({ - summary: "Make signin and signout their own pages with routes." + summary: "Make signin and signout their own pages with routes.", + version: '0.9.1', + git: 'https://github.com/nunohvidal/accounts-entry' }); -Package.on_use(function(api) { +Package.onUse(function(api) { + api.versionsFrom("METEOR@0.9.0"); + api.use(['iron:router', 'mrt:accounts-t9n'], ['client', 'server']); // CLIENT api.use([ 'deps', @@ -14,13 +18,13 @@ Package.on_use(function(api) { 'handlebars', 'session', 'coffeescript', - 'simple-form', + 'joshowens:simple-form', 'less', 'sha'] , 'client'); - api.add_files([ + api.addFiles([ 'client/entry.coffee', 'client/entry.less', 'client/helpers.coffee', @@ -65,19 +69,19 @@ Package.on_use(function(api) { 'coffeescript' ], 'server'); - api.add_files(['server/entry.coffee'], 'server'); + api.addFiles(['server/entry.coffee'], 'server'); // CLIENT and SERVER api.imply('accounts-base', ['client', 'server']); api.imply('accounts-password', ['client', 'server']); api.export('AccountsEntry', ['client', 'server']); - api.use('iron-router', ['client', 'server']); - api.use(['accounts-t9n'], ['client', 'server']); - api.add_files(['shared/router.coffee'], ['client', 'server']); + api.use('iron:router', ['client', 'server']); + api.use(['mrt:accounts-t9n'], ['client', 'server']); + api.addFiles(['shared/router.coffee'], ['client', 'server']); }); -Package.on_test(function (api) { +Package.onTest(function (api) { api.use(['tinytest', 'underscore', 'handlebars', @@ -85,9 +89,9 @@ Package.on_test(function (api) { 'templating', 'mongo-livedata', 'coffeescript', - 'simple-form', - 'iron-router']); - api.use('accounts-entry'); + 'joshownens:simple-form', + 'iron:router']); + api.use('mrt:accounts-entry'); - api.add_files(['tests/route.coffee', 'tests/client.html', 'tests/client.coffee'], 'client'); + api.addFiles(['tests/route.coffee', 'tests/client.html', 'tests/client.coffee'], 'client'); }) diff --git a/server/entry.coffee b/server/entry.coffee index fd467daf..819914e0 100644 --- a/server/entry.coffee +++ b/server/entry.coffee @@ -18,13 +18,21 @@ Meteor.startup -> entryCreateUser: (user) -> check user, Object profile = AccountsEntry.settings.defaultProfile || {} - if user.username + # both username & email provided + if user.username && user.email userId = Accounts.createUser username: user.username, email: user.email, password: user.password, profile: _.extend(profile, user.profile) - else + # only username provided + else if user.username && !user.email + userId = Accounts.createUser + username: user.username, + password: user.password, + profile: _.extend(profile, user.profile) + # only email provided + else if user.email && !user.username userId = Accounts.createUser email: user.email password: user.password diff --git a/shared/router.coffee b/shared/router.coffee index 3e8458e9..e282e047 100644 --- a/shared/router.coffee +++ b/shared/router.coffee @@ -5,7 +5,6 @@ Router.map -> onBeforeAction: -> Session.set('entryError', undefined) Session.set('buttonText', 'in') - Session.set('fromWhere', Router.current().path) onRun: -> if Meteor.userId() Router.go AccountsEntry.settings.dashboardRoute @@ -75,3 +74,14 @@ Router.map -> onBeforeAction: -> Session.set('entryError', undefined) Session.set('resetToken', @params.resetToken) + +# Get all the accounts-entry routes one time +exclusions = []; +_.each Router.routes, (route)-> + exclusions.push route.name + +# Change the fromWhere session variable when you leave a path +Router.onStop -> + # If the route is an entry route, no need to save it + if (!_.contains(exclusions, Router.current().route.name)) + Session.set('fromWhere', Router.current().path) \ No newline at end of file diff --git a/smart.json b/smart.json index 6556797a..9d4b264a 100644 --- a/smart.json +++ b/smart.json @@ -1,13 +1,13 @@ { "name": "accounts-entry", "description": "A meteorite package that relies on Iron Router and gives you whole-page login styles.", - "homepage": "https://github.com/Differential/accounts-entry", + "homepage": "https://github.com/nunohvidal/accounts-entry", "author": "Differential (http://differential.io)", - "version": "0.8.1", - "git": "https://github.com/Differential/accounts-entry.git", + "version": "0.9.1", + "git": "https://github.com/nunohvidal/accounts-entry.git", "packages": { - "iron-router": "0.8.2", - "accounts-t9n": "0.0.5", + "iron-router": "", + "accounts-t9n": "", "simple-form": "" } } diff --git a/versions.json b/versions.json new file mode 100644 index 00000000..ce24090b --- /dev/null +++ b/versions.json @@ -0,0 +1,207 @@ +{ + "dependencies": [ + [ + "accounts-base", + "1.0.0" + ], + [ + "accounts-password", + "1.0.0" + ], + [ + "accounts-t9n", + "0.0.0" + ], + [ + "application-configuration", + "1.0.0" + ], + [ + "binary-heap", + "1.0.0" + ], + [ + "blaze", + "1.0.2" + ], + [ + "blaze-layout", + "0.0.0" + ], + [ + "blaze-tools", + "1.0.0" + ], + [ + "callback-hook", + "1.0.0" + ], + [ + "check", + "1.0.0" + ], + [ + "coffeescript", + "1.0.2" + ], + [ + "deps", + "1.0.0" + ], + [ + "ejson", + "1.0.0" + ], + [ + "email", + "1.0.2" + ], + [ + "follower-livedata", + "1.0.0" + ], + [ + "geojson-utils", + "1.0.0" + ], + [ + "handlebars", + "1.0.0" + ], + [ + "html-tools", + "1.0.0" + ], + [ + "htmljs", + "1.0.0" + ], + [ + "id-map", + "1.0.0" + ], + [ + "iron-router", + "0.0.0" + ], + [ + "jquery", + "1.0.0" + ], + [ + "json", + "1.0.0" + ], + [ + "less", + "1.0.4" + ], + [ + "livedata", + "1.0.4" + ], + [ + "localstorage", + "1.0.0" + ], + [ + "logging", + "1.0.2" + ], + [ + "meteor", + "1.0.2" + ], + [ + "minifiers", + "1.0.2" + ], + [ + "minimongo", + "1.0.1" + ], + [ + "mongo-livedata", + "1.0.2" + ], + [ + "npm-bcrypt", + "0.7.7" + ], + [ + "observe-sequence", + "1.0.1" + ], + [ + "ordered-dict", + "1.0.0" + ], + [ + "random", + "1.0.0" + ], + [ + "reactive-dict", + "1.0.0" + ], + [ + "retry", + "1.0.0" + ], + [ + "routepolicy", + "1.0.0" + ], + [ + "service-configuration", + "1.0.0" + ], + [ + "session", + "1.0.0" + ], + [ + "sha", + "1.0.0" + ], + [ + "simple-form", + "0.0.0" + ], + [ + "spacebars", + "1.0.0" + ], + [ + "spacebars-compiler", + "1.0.1" + ], + [ + "srp", + "1.0.0" + ], + [ + "templating", + "1.0.4" + ], + [ + "ui", + "1.0.0" + ], + [ + "underscore", + "1.0.0" + ], + [ + "underscore-string-latest", + "0.0.0" + ], + [ + "webapp", + "1.0.2" + ] + ], + "pluginDependencies": [], + "toolVersion": "meteor-tool@1.0.12", + "format": "1.0" +} \ No newline at end of file