Merge branch 'develop' of github.com:HabitRPG/habitrpg into common-convert

This commit is contained in:
Blade Barringer
2015-02-12 13:32:23 -06:00
7 changed files with 60 additions and 34 deletions

View File

@@ -84,12 +84,14 @@ angular.module('habitrpg')
$scope._expandedMenu = ($scope._expandedMenu == menu) ? null : menu; $scope._expandedMenu = ($scope._expandedMenu == menu) ? null : menu;
}; };
function selectNotificationValue(mysteryValue, invitationValue, unallocatedValue, messageValue, noneValue) { function selectNotificationValue(mysteryValue, invitationValue, holidayCardValue, unallocatedValue, messageValue, noneValue) {
var user = $scope.user; var user = $scope.user;
if (user.purchased && user.purchased.plan && user.purchased.plan.mysteryItems && user.purchased.plan.mysteryItems.length) { if (user.purchased && user.purchased.plan && user.purchased.plan.mysteryItems && user.purchased.plan.mysteryItems.length) {
return mysteryValue; return mysteryValue;
} else if ((user.invitations.party && user.invitations.party.id) || (user.invitations.guilds && user.invitations.guilds.length > 0)) { } else if ((user.invitations.party && user.invitations.party.id) || (user.invitations.guilds && user.invitations.guilds.length > 0)) {
return invitationValue; return invitationValue;
} else if ((user.items.special.valentineReceived[0] || user.items.special.nyeReceived[0])) {
return holidayCardValue;
} else if (user.flags.classSelected && !(user.preferences && user.preferences.disableClasses) && user.stats.points) { } else if (user.flags.classSelected && !(user.preferences && user.preferences.disableClasses) && user.stats.points) {
return unallocatedValue; return unallocatedValue;
} else if (!(_.isEmpty(user.newMessages))) { } else if (!(_.isEmpty(user.newMessages))) {
@@ -103,13 +105,14 @@ angular.module('habitrpg')
return selectNotificationValue( return selectNotificationValue(
"glyphicon-gift", "glyphicon-gift",
"glyphicon-user", "glyphicon-user",
"glyphicon-envelope",
"glyphicon-plus-sign", "glyphicon-plus-sign",
"glyphicon-comment", "glyphicon-comment",
"glyphicon-comment inactive"); "glyphicon-comment inactive");
}; };
$scope.hasNoNotifications = function() { $scope.hasNoNotifications = function() {
return selectNotificationValue(false, false, false, false, true); return selectNotificationValue(false, false, false, false, false, true);
} }
// ------ Social ---------- // ------ Social ----------

View File

@@ -389,7 +389,7 @@ api.cast = function(req, res, next) {
series.push(function(cb2){found.save(cb2)}); series.push(function(cb2){found.save(cb2)});
} }
if (group) { if (group && !spell.silent) {
series.push(function(cb2){ series.push(function(cb2){
var message = '`'+user.profile.name+' casts '+spell.text() + (targetType=='user' ? ' on '+found.profile.name : ' for the party')+'.`'; var message = '`'+user.profile.name+' casts '+spell.text() + (targetType=='user' ? ' on '+found.profile.name : ' for the party')+'.`';
group.sendChat(message); group.sendChat(message);

View File

@@ -244,3 +244,8 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
p p
| 20  | 20 
span.shop_gold span.shop_gold
div
button.customize-option(popover='{{::Content.spells.special.valentine.notes()}}', popover-title='{{::Content.spells.special.valentine.text()}}', popover-trigger='mouseenter', popover-placement='right', popover-append-to-body='true', ng-click='castStart(Content.spells.special.valentine)', class='inventory_special_valentine')
p
| {{Content.spells.special.valentine.value}}
span(class='shop_gold')

View File

@@ -55,10 +55,10 @@ mixin customizeProfile(mobile)
// Color // Color
li.customize-menu li.customize-menu
menu(label=env.t('color')) menu(label=env.t('color'))
each v,k in {'c8c8c8':'white','903a00':'brown','cfb853':'blond','ec720f':'red','2e2e2e':'black'} each color in ['white','brown','blond','red','black']
button(type='button', class='customize-option hair', style='background-color:##{k};', ng-click='set({"preferences.hair.color": "#{v}"})') button(type='button', class='#{path=="skin" ? "skin_"+color : "customize-option hair hair_bangs_1_"+color}', ng-click='set({"preferences.hair.color": "#{color}"})')
each color in ['candycane','frost','winternight','holly'] each color in ['candycane','frost','winternight','holly']
button(type='button', ng-if='user.purchased.hair.color.#{color}', class='customize-option hair hair_bangs_1_#{color}', style='width: 40px; height: 40px;', ng-click='unlock("hair.color.#{color}")') button(type='button', ng-if='user.purchased.hair.color.#{color}', class='customize-option hair hair_bangs_1_#{color}', ng-click='unlock("hair.color.#{color}")')
each color in ['pblue','pgreen','porange','ppink','ppurple','pyellow'] each color in ['pblue','pgreen','porange','ppink','ppurple','pyellow']
button(type='button', ng-if='user.purchased.hair.color.#{color}', class='customize-option hair hair_bangs_1_#{color}', ng-click='unlock("hair.color.#{color}")') button(type='button', ng-if='user.purchased.hair.color.#{color}', class='customize-option hair hair_bangs_1_#{color}', ng-click='unlock("hair.color.#{color}")')
+buyPref('hair.color', ['rainbow','yellow','green','purple','blue','TRUred'], 'rainbowColors') +buyPref('hair.color', ['rainbow','yellow','green','purple','blue','TRUred'], 'rainbowColors')
@@ -82,12 +82,20 @@ mixin customizeProfile(mobile)
// Purchasable hairstyles // Purchasable hairstyles
menu(label=env.t('hairSet1')) menu(label=env.t('hairSet1'))
- var colors = [2,4,5,6,7,8] - var styles = [2,4,5,6,7,8]
span(ng-hide='#{showPath("user.purchased.hair.base", colors, "&&")}') span(ng-hide='#{showPath("user.purchased.hair.base", styles, "&&")}')
+gemCost(2) +gemCost(2)
button.btn.btn-xs(ng-click='#{unlockPath("hair.base",colors)}')!= env.t('unlockSet',{cost:5}) + ' <span class="Pet_Currency_Gem1x inline-gems"/>' button.btn.btn-xs(ng-click='#{unlockPath("hair.base",styles)}')!= env.t('unlockSet',{cost:5}) + ' <span class="Pet_Currency_Gem1x inline-gems"/>'
each num in colors each num in styles
button(class='hair_base_#{num}_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.base["#{num}"]}', ng-click='unlock("hair.base.#{num}")') button(class='hair_base_#{num}_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.base["#{num}"]}', ng-click='unlock("hair.base.#{num}")')
menu(label=env.t('hairSet2'))
- var styles = [9,10,11,12,13,14]
span(ng-hide='#{showPath("user.purchased.hair.base", styles, "&&")}')
+gemCost(2)
button.btn.btn-xs(ng-click='#{unlockPath("hair.base", styles)}')!= env.t('unlockSet', {cost: 5}) + ' <span class="Pet_Currency_Gem1x inline-gems"/>'
each num in styles
button(class='hair_base_#{num}_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.base["#{num}"]}', ng-click='unlock("hair.base.#{num}")')
// Flower // Flower
li.customize-menu li.customize-menu

View File

@@ -202,6 +202,11 @@ nav.toolbar(ng-controller='AuthCtrl', ng-class='{active: isToolbarHidden}')
span {{v.name}} span {{v.name}}
a(ng-click='Groups.seenMessage(k)', popover=env.t('clear'),popover-placement='right',popover-trigger='mouseenter',popover-append-to-body='true') a(ng-click='Groups.seenMessage(k)', popover=env.t('clear'),popover-placement='right',popover-trigger='mouseenter',popover-append-to-body='true')
span.glyphicon.glyphicon-remove-circle span.glyphicon.glyphicon-remove-circle
li(ng-if='user.items.special.valentineReceived[0] || user.items.special.nyeReceived[0]')
a(ng-click='$state.go("options.inventory.drops"); expandMenu(null)')
span.glyphicon.glyphicon-envelope
span=env.t('holidayCard')
ul.toolbar-controls ul.toolbar-controls
//-li //-li
//-a(ng-click='') Clear all //-a(ng-click='') Clear all

View File

@@ -8,22 +8,15 @@ script(id='modals/valentine.html', type='text/ng-template')
.bg-info(style='padding:10px') .bg-info(style='padding:10px')
p To: {{user.profile.name}}, From: {{user.items.special.valentineReceived[0]}} p To: {{user.profile.name}}, From: {{user.items.special.valentineReceived[0]}}
hr hr
div(ng-switch='Math.floor(Math.random()*3)') ul.list-unstyled(ng-switch='::Math.floor(Math.random()*4)')
ul.list-unstyled(ng-switch-when='0') li(ng-switch-when='0')
li "Roses are red !=env.t('valentine0', {lineBreak:"<br>"})
li My Dailies are blue li(ng-switch-when='1')
li I'm happy that I'm !=env.t('valentine1', {lineBreak:"<br>"})
li In a Party with you!" li(ng-switch-when='2')
ul.list-unstyled(ng-switch-when='1') !=env.t('valentine2', {lineBreak:"<br>"})
li "Roses are red li(ng-switch-default)
li Violets are nice !=env.t('valentine3', {lineBreak:"<br>"})
li Let's get together
li And fight against Vice!"
ul.list-unstyled(ng-switch-default)
li "Roses are red
li This poem style is old
li I hope that you like this
li Cuz it cost ten gold."
p p
small For enduring such a saccharine poem, you both receive the "Adoring Friends" badge! small For enduring such a saccharine poem, you both receive the "Adoring Friends" badge!
.modal-footer .modal-footer

View File

@@ -1,21 +1,33 @@
h5 2/8/2015 - EMAIL NOTIFICATIONS AND LOGIN TYPE SWITCHING! h5 2/12/2015 - VALENTINE'S DAY AND NEW HAIRSTYLES!
hr hr
tr tr
td td
h5 Email Notifications h5 Happy Valentine's Day!
p We've implemented email notifications for a variety of events, including receiving a Private Message, being invited to a Party, Guild, or Quest, and receiving a gift of Gems or a Subscription! We've got some more coming up, too, including the much-requested check-in reminders. p Help motivate all of the lovely people in your life by sending them a caring valentine. Valentines can be purchased for 10 gold from the Market. For spreading love and joy throughout the community, both the giver AND the receiver get a coveted "adoring friends" badge. Hooray!
p Don't want to receive a certain type of notification? No problem! Just go to <a href='https://habitrpg.com/#/options/settings/notifications' target='_blank'>Notification Settings</a> to tell us exactly which ones you do and do not want to receive. Our messenger dragons will be happy to comply! p.small.muted by Lemoness and SabreCat
p.small.muted by paglias and Lemoness
tr tr
td td
h5 Login Type Switching h5 New Hairstyles!
p Want to change your email address, or switch from Facebook login to email login (or vice versa)? Good news! Now you can switch it yourself, under <a href='https://habitrpg.com/#/options/settings/settings' target='_blank'>Settings</a>! .promo_updos.pull-right
p.small.muted by Lefnire p There are a new set of updo hairstyles available in the <a href='https://habitrpg.com/#/options/profile/avatar' target='_blank'>Avatar Customization page</a>! Have fun customizing your characters.
p.small.muted by Crystalphoenix, Mariahm, Painter de Cluster, Leephon, Beffymaroo, Sungabraverday, Lemoness, and Bailey
hr hr
a(href='/static/old-news', target='_blank') Read older news a(href='/static/old-news', target='_blank') Read older news
mixin oldNews mixin oldNews
h5 2/8/2015
tr
td
h5 Email Notifications
p We've implemented email notifications for a variety of events, including receiving a Private Message, being invited to a Party, Guild, or Quest, and receiving a gift of Gems or a Subscription! We've got some more coming up, too, including the much-requested check-in reminders.
p Don't want to receive a certain type of notification? No problem! Just go to <a href='https://habitrpg.com/#/options/settings/notifications' target='_blank'>Notification Settings</a> to tell us exactly which ones you do and do not want to receive. Our messenger dragons will be happy to comply!
p.small.muted by paglias and Lemoness
tr
td
h5 Login Type Switching
p Want to change your email address, or switch from Facebook login to email login? Good news! Now you can switch it yourself, under <a href='https://habitrpg.com/#/options/settings/settings' target='_blank'>Settings</a>!
p.small.muted by Lefnire
h5 2/3/2015 h5 2/3/2015
tr tr
td td