Revert "add reset button"

This reverts commit 023f7ab28ad5a216f752e9f93d99ba876e17dfc0.

Conflicts:
	lib/app/index.js
This commit is contained in:
Tyler Renelle 2012-10-24 20:51:57 -04:00
parent 677266acf5
commit 82fabb17cc
3 changed files with 3 additions and 33 deletions

View file

@ -312,17 +312,6 @@ ready(function(model) {
model.set('_items.weapon', content.items.weapon[1]);
return model.set('_user.balance', model.get('_user.balance') - 0.50);
};
exports.reset = function(e, el) {
model.set('_user.tasks', {});
_.each(['habit', 'daily', 'todo', 'completed', 'reward'], function(type) {
model.set("_user." + type + "Ids", []);
return model.refList("_" + type + "List", "_user.tasks", "_user." + type + "Ids");
});
model.set('_user.stats.hp', 50);
model.set('_user.stats.money', 0);
model.set('_user.stats.exp', 0);
return model.set('_user.stats.lvl', 1);
};
setTimeout(scoring.cron, 1);
return setInterval(scoring.cron, 3600000);
});

View file

@ -262,18 +262,7 @@ ready (model) ->
model.set '_items.armor', content.items.armor[1]
model.set '_items.weapon', content.items.weapon[1]
model.set '_user.balance', (model.get('_user.balance') - 0.50)
exports.reset = (e, el) ->
model.set '_user.tasks', {}
_.each ['habit', 'daily', 'todo', 'completed', 'reward'], (type) ->
model.set "_user.#{type}Ids", []
model.refList "_#{type}List", "_user.tasks", "_user.#{type}Ids"
model.set('_user.stats.hp', 50)
model.set('_user.stats.money', 0)
model.set('_user.stats.exp', 0)
model.set('_user.stats.lvl', 1)
# ========== CRON ==========
# FIXME seems can't call scoring.cron() instantly, have to call after some time (2s here)

View file

@ -22,23 +22,15 @@
</button>
<ul class="dropdown-menu">
<li><a href="#settings-modal" data-toggle="modal">Settings</a></li>
<li><a href="#reset-modal" data-toggle="modal">Reset</a></li>
<li><a href='/logout'>Logout</a></li>
<!-- FIXME href='/logout' isn't redirecting the page.. window.history? -->
<li><a href='/logout' onclick="window.location='/logout'">Logout</a></li>
</ul>
</div>
<app:myModal modalId="settings-modal" header="Settings">
<strong>User ID</strong><br/>
<small>Copy this ID for use in third party applications.</small>
<pre class=prettyprint>{_user.id}</pre><br/>
</app:myModal>
<app:myModal modalId="reset-modal" header="Reset">
<p>This resets your entire account - your tasks will be deleted and your character will start over.</p>
<p>This is highly discouraged because you'll lose historical data, which is useful for graphing your progress over time. However, some people find it useful in the beginning after playing with the app for a while.</p>
<button data-dismiss="modal" x-bind=click:reset class="btn btn-danger btn-large">Reset</button>
</app:myModal>
{/}
</div>