Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

store tester emails in the db

  • Loading branch information...
commit 7ae1ae2ebe98f12c1d890c008ee94eaa16b1eb75 1 parent 5839bc3
@zaach zaach authored
View
9 bin/static
@@ -8,6 +8,7 @@ const http = require('http');
const express = require('express');
const nunjucks = require('nunjucks');
const config = require('../etc/config');
+const db = require('../lib/db.js');
var views = require('../lib/views.js');
@@ -32,7 +33,9 @@ views.setup(app);
app.use(express.static(static_root));
app.use('/downloads', express.static(download_root));
-var bindTo = config.process.static;
-server.listen(bindTo.port, bindTo.host, function() {
- console.log("running on http://" + server.address().address + ":" + server.address().port);
+db.connect(config.db, function (err) {
+ var bindTo = config.process.static;
+ server.listen(bindTo.port, bindTo.host, function() {
+ console.log("running on http://" + server.address().address + ":" + server.address().port);
+ });
});
View
14 lib/db/couchbase.js
@@ -13,6 +13,20 @@ module.exports = {
});
return this;
},
+ storeAlphaEmail: function(email, cb) {
+ db.get('alpha_users', function (err, doc, meta) {
+ if (!doc) doc = {emails: []};
+
+ if (doc.emails.indexOf(email) < 0) {
+ doc.emails.push(email);
+ }
+
+ db.set('alpha_users', doc, meta, function(err) {
+ cb(err);
+ });
+ });
+ return this;
+ },
stageAccount: function(data, cb) {
var account = {
pass: data.pass,
View
12 lib/db/json.js
@@ -9,6 +9,18 @@ module.exports = {
}, 0);
return this;
},
+ storeAlphaEmail: function(email, cb) {
+ if (!db.alpha_users) db.alpha_users = {emails: []};
+
+ if (db.alpha_users.emails.indexOf(email) < 0) {
+ db.alpha_users.emails.push(email);
+ }
+
+ setTimeout(function() {
+ cb(null);
+ }, 0);
+ return this;
+ },
stageAccount: function(data, cb) {
var account = {
pass: data.pass,
View
9 lib/views.js
@@ -20,8 +20,13 @@ function setup(app) {
});
app.post('/join_alpha', function(req, res) {
- console.log('got new alpha user email:', req.params.email);
- res.redirect('/download');
+ if (req.body.email) {
+ db.storeAlphaEmail(req.body.email, function(err) {
+ res.render('joined.html');
+ });
+ } else {
+ res.redirect('/');
+ }
});
app.get('/download', function(req, res) {
View
28 public/css/gombot.css
@@ -18,17 +18,33 @@
width: 18em;
}
+.gombot a,
+.gombot a:link,
+.gombot a:visited {
+ color: #2983c8;
+}
+.gombot a:hover,
+.gombot a:active {
+ color: #20679e;
+}
+
.gombot h2 img {
vertical-align: middle;
}
+.gombot h2.main {
+ font-size: 3em;
+ padding-top: 50px;
+ padding-bottom: 18px;
+}
+
.splash h1 {
font-size: 63px;
letter-spacing: -4px;
line-height: 100%;
}
-.splash h2 {
+.gombot .splash h2 {
font-size: 40px;
letter-spacing: -1px;
line-height: 150%;
@@ -109,3 +125,13 @@
display: block;
padding-top: 15px;
}
+
+.gombot .blurb {
+ width: 50%;
+ padding: 10px;
+}
+
+#client-logos img {
+ vertical-align: middle;
+}
+
View
BIN  public/img/android-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/img/ios-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
11 views/description.html
@@ -5,15 +5,16 @@
Gombot is an app that securely remembers your passwords and lets you <strong>sign in to your favorite websites with just one click</strong>.
<p>
Gombot even helps you take your passwords with you; it will be available on Mozilla Firefox, Google Chrome and Apple iPhone/iPod Touch.
- <div>
- <img src="/img/ff-logo.png" />
- <img src="/img/chrome-logo.png" />
- <img src="/img/ios-logo.png" />
+ <div id="client-logos">
+ <img src="/img/ff-logo.png" />
+ <img src="/img/chrome-logo.png" />
+ <img src="/img/android-logo.png" />
+ <img src="/img/ios-logo.png" />
</div>
</section>
<section class="split">
<p>
- <strong>Now there's no need to remember so many passwords anymore</strong>. Just type in a single master password and Gombot does the rest for you. For even greater security, Gombot can PIN protect your stored password before signing you in to a site. That's extra important when you want that extra layer of safety for your personal data when using email, Facebook or online banking.
+ <strong>Now there's no need to remember so many passwords anymore</strong>. Just type in a single master password and Gombot does the rest for you. For even greater security, Gombot can PIN protect your stored password before signing you in to a site. That's extra important when you want that extra layer of safety for your personal data when using email, Facebook or online shopping sites.
<p>
Gombot is made by Mozilla, the global non-profit organization that answers to no one but you.
</section>
View
28 views/joined.html
@@ -0,0 +1,28 @@
+{% extends "layout.html" %}
+
+{% block page_title %}You're on the list{% endblock %}
+
+{% block content %}
+<div id="main-content">
+<div class="row">
+ <h2 class="main"><img src="/img/gombot-logo-92x92.png" /> You're on the list</h2>
+
+ <div class="blurb">
+ <p>
+ We'll send out an email to let you know when Gombot is ready to download and test. Thanks so much for signing up.
+ </p>
+
+ <p>
+ In the meantime, here's how to get in touch:
+ </p>
+
+ <p>
+ twitter: <a href="http://twitter.com/mozlabs">@mozlabs</a> and
+ <a href="http://twitter.com/mozillapersona">@mozillapersona</a> <br/>
+ IRC: #gombot
+ </p>
+ </div>
+
+</div>
+</div>
+{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.