rewrite: add big update notification, small bug fixes

This commit is contained in:
Tyler Renelle
2013-09-02 17:15:12 -04:00
parent 36e6772967
commit 7f68fd017a
4 changed files with 72 additions and 28 deletions

View File

@@ -132,16 +132,6 @@ angular.module('userServices', []).
return this.settings.auth.apiId !== ""; return this.settings.auth.apiId !== "";
}, },
/*
Very simple path-set. `set('preferences.gender','m')` for example. We'll deprecate this once we have a complete API
*/
set: function(k, v) {
var log = { op: 'set', data: {} };
window.habitrpgShared.helpers.dotSet(k, v, this.user);
log.data[k] = v;
this.log(log);
},
log: function (action, cb) { log: function (action, cb) {
//push by one buy one if an array passed in. //push by one buy one if an array passed in.
if (_.isArray(action)) { if (_.isArray(action)) {
@@ -155,6 +145,18 @@ angular.module('userServices', []).
save(); save();
syncQueue(cb); syncQueue(cb);
}, },
/*
Very simple path-set. `set('preferences.gender','m')` for example. We'll deprecate this once we have a complete API
*/
set: function(k, v) {
var self = userServices;
var log = { op: 'set', data: {} };
window.habitrpgShared.helpers.dotSet(k, v, userServices.user);
log.data[k] = v;
userServices.log(log);
},
settings: settings settings: settings
}; };

View File

@@ -826,29 +826,29 @@ api.batchUpdate = function(req, res, next) {
}; };
switch (action.op) { switch (action.op) {
case "score": case "score":
return api.scoreTask(req, res); api.scoreTask(req, res);
case "buy": case "buy":
return api.buy(req, res); api.buy(req, res);
case "sortTask": case "sortTask":
return api.verifyTaskExists(req, res, function() { api.verifyTaskExists(req, res, function() {
return api.sortTask(req, res); api.sortTask(req, res);
}); });
case "addTask": case "addTask":
return api.createTask(req, res); api.createTask(req, res);
case "delTask": case "delTask":
return api.verifyTaskExists(req, res, function() { api.verifyTaskExists(req, res, function() {
return api.deleteTask(req, res); api.deleteTask(req, res);
}); });
case "set": case "set":
return api.updateUser(req, res); api.updateUser(req, res);
case "revive": case "revive":
return api.revive(req, res); api.revive(req, res);
case "clear-completed": case "clear-completed":
return api.clearCompleted(req, res); api.clearCompleted(req, res);
case "reroll": case "reroll":
return api.reroll(req, res); api.reroll(req, res);
default: default:
return cb(); cb();
} }
}; };
/* Setup the array of functions we're going to call in parallel with async*/ /* Setup the array of functions we're going to call in parallel with async*/

View File

@@ -65,14 +65,11 @@ var UserSchema = new Schema({
ads: String, ads: String,
dropsEnabled: Boolean, dropsEnabled: Boolean,
itemsEnabled: Boolean, itemsEnabled: Boolean,
/*FIXME to boolean (currently show/hide)*/ newStuff: String, //FIXME to boolean (currently show/hide)
rewrite: Boolean,
newStuff: String,
partyEnabled: Boolean, partyEnabled: Boolean,
petsEnabled: Boolean, petsEnabled: Boolean,
/* FIXME remove?*/ rest: Boolean // fixme - change to preferences.resting once we're off derby
rest: Boolean
}, },
history: { history: {
exp: [ exp: [

View File

@@ -1,3 +1,48 @@
div(modal='user.flags.rewrite !== false')
.modal-header
h3 Mega Ultra Update!
.modal-body
table
tr
td
.NPC-Bailey
td
.popover.static-popover.fade.right.in(style='max-width:400px')
.arrow
h3.popover-title
a(target='_blank', href='http://www.kickstarter.com/profile/mihakuu') Bailey
.popover-content
p.
Hello my Habiteers! I have some amazing news to share with you, it's huge!
Has Habit ever crashed for you? (Joke). Well we <a target='_blank' href="http://habitrpg.tumblr.com/post/59104876969/website-issues-what-were-doing">re-wrote the website from the ground up</a>
so we could conquor all the bugs once and for all (more from Tyler in a bit). If you haven't seen me for a while (due to a bug in the old site), be sure to catch up with me on the right side of the screen for any missed news. Importantly, the following happened:
h4.
<a target='_blank' href='https://play.google.com/store/apps/details?id=com.ocdevel.habitrpg'>Android</a> & <a target='_blank' href='https://itunes.apple.com/us/app/habitrpg/id689569235?mt=8'>iOS</a> Apps are out!
p They're open source, so help us make them awesome.
table(style='clear:both;')
tr
td
.popover.static-popover.fade.left.in(style='max-width:400px')
.arrow
h3.popover-title
a(target='_blank', href='https://twitter.com/lefnire') Tyler
.popover-content
p.
JavaScript developers! To me! We must finish vanquising the old site, as not all features have been ported.
We rewrote Habit on <a target='_blank' href='http://angularjs.org/'>AngularJS</a> + <a target='_blank' href='http://expressjs.com/'>Express</a>.
We desparately need your help porting the rest of the features, and polishing off the bugs. <a target='_blank' href='https://github.com/lefnire/habitrpg/wiki/Contributing#website'>Read this guide</a> to getting started.
Each of your pull requests shall grant you a special <a href='https://github.com/lefnire/habitrpg/issues/946#issuecomment-18654292' target='_blank'>Contributor Gear piece</a>. Thanks
everyone for all your support and patience!
td
img.pull-right(src='/bower_components/habitrpg-shared/img/unprocessed/efbd21c4-82a1-11e2-8190-fbc609b5c58b.png', style='height:72px')
.modal-footer
button.btn.btn-default.cancel(ng-click='user.flags.rewrite = false') Read Later
button.btn.btn-warning.cancel(ng-click='set("flags.rewrite", false)') Dismiss
div(modal='modals.newStuff') div(modal='modals.newStuff')
.modal-header .modal-header
h3 New Stuff h3 New Stuff