add general "new stuff" notification, linking to changelog

This commit is contained in:
Tyler Renelle 2013-03-21 10:31:23 -06:00
parent f032502368
commit 7529601dcc
4 changed files with 31 additions and 36 deletions

View file

@ -61,14 +61,8 @@ module.exports.app = (appExports, model) ->
batch.commit()
browser.resetDom(model)
appExports.closeAlgosNotification = (e, el) ->
user.set('flags.algosNotification', 'hide')
appExports.closeOnliesNotification = (e, el) ->
user.set('flags.onliesNotification', 'hide')
appExports.closePriorityNotification = (e, el) ->
user.set('flags.priorityNotification', 'hide')
appExports.closeNewStuff = (e, el) ->
user.set('flags.newStuff', 'hide')
appExports.customizeGender = (e, el) ->
user.set 'preferences.gender', $(el).attr('data-value')

View file

@ -1,3 +1,19 @@
.new-stuff
position: fixed
text-align: center
top: 0
left: 0
width: 100%
height: 0
z-index: 1020
.new-stuff> .alert
border-top: 0
border-radius: 0 0 4px 4px
padding-right: 14px
display: inline-block
// variables
gpColor = #FBEFC0

View file

@ -1,32 +1,16 @@
<alerts:>
<newStuff:>
{#if equal(_user.flags.newStuff,'show')}
<div class='new-stuff'>
<p class='alert alert-success'>
<a href="https://github.com/lefnire/habitrpg/blob/develop/CHANGELOG.md#3212013" target="_blank">New Stuff!</a> <a x-bind="click:closeNewStuff"><i class='icon-remove'></i></a>
</p>
</div>
{/}
<flash:>
{#if _flash.error}
<ul class="unstyled alert alert-error">
{#each _flash.error as :error}<li>{:error}</li>{/}
</ul>
{/}
{#if equal(_user.flags.algosNotification,'show')}
<div class='alert alert-success'>
<a x-bind="click:closeAlgosNotification" class=pull-right>[x]</a>
<p>New features! Custom day start, new and better algorithms, authentication enhancements. See <a target="_blank" href="http://habitrpg.tumblr.com/post/44468869138/custom-day-start-better-algorithms-auth-enhancements">details here.</a>
&nbsp;"Hey, I had more Exp before this roll-out!" <a data-target="#restore-modal" data-toggle=modal>Restore your Exp here.</a></p>
</div>
{/}
{#if equal(_user.flags.onliesNotification, 'show')}
<div class='alert alert-success'>
<a x-bind="click:closeOnliesNotification " class=pull-right>[x]</a>
<p>
"Onlies" now gain / lose value just like other habits, and are reset back to 0 at the beginning of each day.
&nbsp;See <a target="_blank" href="https://trello.com/card/shading-onlies/50e5d3684fe3a7266b0036d6/67">details here</a>, and
&nbsp;chime in with your recommendations on this mechanic.
</p>
</div>
{/}
{#if equal(_user.flags.priorityNotification, 'show')}
<div class='alert alert-success'>
<a x-bind="click:closePriorityNotification" class=pull-right>[x]</a>
<p>New Feature: Priority Multiplier! You can now multiply "more important" tasks on a 1x, 1.5x, or 2x scale. <a target="_blank" href="https://trello.com/card/priority-multiplier/50e5d3684fe3a7266b0036d6/17">See details</a>.</p>
</div>
{/}

View file

@ -25,6 +25,7 @@
<Header:>
<app:modals:modals />
<ui:connectionAlert>
<app:alerts:newStuff />
<div id="head" class="container-fluid">
{#if _undo}<a x-bind="click:undo" class='label undo-button'>Undo</a>{/}
@ -37,7 +38,7 @@
<br/>
<div id="notification-area"></div>
<div id="wrap">
<app:alerts:alerts />
<app:alerts:flash />
<div id=main class="grid">
<app:tasks:taskLists />
</div>