mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Merge branch 'develop' of github.com:HabitRPG/habitrpg into common-convert
This commit is contained in:
@@ -84,12 +84,14 @@ angular.module('habitrpg')
|
||||
$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;
|
||||
if (user.purchased && user.purchased.plan && user.purchased.plan.mysteryItems && user.purchased.plan.mysteryItems.length) {
|
||||
return mysteryValue;
|
||||
} else if ((user.invitations.party && user.invitations.party.id) || (user.invitations.guilds && user.invitations.guilds.length > 0)) {
|
||||
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) {
|
||||
return unallocatedValue;
|
||||
} else if (!(_.isEmpty(user.newMessages))) {
|
||||
@@ -103,13 +105,14 @@ angular.module('habitrpg')
|
||||
return selectNotificationValue(
|
||||
"glyphicon-gift",
|
||||
"glyphicon-user",
|
||||
"glyphicon-envelope",
|
||||
"glyphicon-plus-sign",
|
||||
"glyphicon-comment",
|
||||
"glyphicon-comment inactive");
|
||||
};
|
||||
|
||||
$scope.hasNoNotifications = function() {
|
||||
return selectNotificationValue(false, false, false, false, true);
|
||||
return selectNotificationValue(false, false, false, false, false, true);
|
||||
}
|
||||
|
||||
// ------ Social ----------
|
||||
|
||||
@@ -389,7 +389,7 @@ api.cast = function(req, res, next) {
|
||||
series.push(function(cb2){found.save(cb2)});
|
||||
}
|
||||
|
||||
if (group) {
|
||||
if (group && !spell.silent) {
|
||||
series.push(function(cb2){
|
||||
var message = '`'+user.profile.name+' casts '+spell.text() + (targetType=='user' ? ' on '+found.profile.name : ' for the party')+'.`';
|
||||
group.sendChat(message);
|
||||
|
||||
@@ -244,3 +244,8 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
||||
p
|
||||
| 20
|
||||
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')
|
||||
@@ -55,10 +55,10 @@ mixin customizeProfile(mobile)
|
||||
// Color
|
||||
li.customize-menu
|
||||
menu(label=env.t('color'))
|
||||
each v,k in {'c8c8c8':'white','903a00':'brown','cfb853':'blond','ec720f':'red','2e2e2e':'black'}
|
||||
button(type='button', class='customize-option hair', style='background-color:##{k};', ng-click='set({"preferences.hair.color": "#{v}"})')
|
||||
each color in ['white','brown','blond','red','black']
|
||||
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']
|
||||
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']
|
||||
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')
|
||||
@@ -82,12 +82,20 @@ mixin customizeProfile(mobile)
|
||||
|
||||
// Purchasable hairstyles
|
||||
menu(label=env.t('hairSet1'))
|
||||
- var colors = [2,4,5,6,7,8]
|
||||
span(ng-hide='#{showPath("user.purchased.hair.base", colors, "&&")}')
|
||||
- var styles = [2,4,5,6,7,8]
|
||||
span(ng-hide='#{showPath("user.purchased.hair.base", styles, "&&")}')
|
||||
+gemCost(2)
|
||||
button.btn.btn-xs(ng-click='#{unlockPath("hair.base",colors)}')!= env.t('unlockSet',{cost:5}) + ' <span class="Pet_Currency_Gem1x inline-gems"/>'
|
||||
each num in colors
|
||||
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}")')
|
||||
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
|
||||
li.customize-menu
|
||||
|
||||
@@ -202,6 +202,11 @@ nav.toolbar(ng-controller='AuthCtrl', ng-class='{active: isToolbarHidden}')
|
||||
span {{v.name}}
|
||||
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
|
||||
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
|
||||
//-li
|
||||
//-a(ng-click='') Clear all
|
||||
|
||||
@@ -8,22 +8,15 @@ script(id='modals/valentine.html', type='text/ng-template')
|
||||
.bg-info(style='padding:10px')
|
||||
p To: {{user.profile.name}}, From: {{user.items.special.valentineReceived[0]}}
|
||||
hr
|
||||
div(ng-switch='Math.floor(Math.random()*3)')
|
||||
ul.list-unstyled(ng-switch-when='0')
|
||||
li "Roses are red
|
||||
li My Dailies are blue
|
||||
li I'm happy that I'm
|
||||
li In a Party with you!"
|
||||
ul.list-unstyled(ng-switch-when='1')
|
||||
li "Roses are red
|
||||
li Violets are nice
|
||||
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."
|
||||
ul.list-unstyled(ng-switch='::Math.floor(Math.random()*4)')
|
||||
li(ng-switch-when='0')
|
||||
!=env.t('valentine0', {lineBreak:"<br>"})
|
||||
li(ng-switch-when='1')
|
||||
!=env.t('valentine1', {lineBreak:"<br>"})
|
||||
li(ng-switch-when='2')
|
||||
!=env.t('valentine2', {lineBreak:"<br>"})
|
||||
li(ng-switch-default)
|
||||
!=env.t('valentine3', {lineBreak:"<br>"})
|
||||
p
|
||||
small For enduring such a saccharine poem, you both receive the "Adoring Friends" badge!
|
||||
.modal-footer
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
h5 2/8/2015 - EMAIL NOTIFICATIONS AND LOGIN TYPE SWITCHING!
|
||||
h5 2/12/2015 - VALENTINE'S DAY AND NEW HAIRSTYLES!
|
||||
hr
|
||||
tr
|
||||
td
|
||||
h5 Happy Valentine's Day!
|
||||
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.small.muted by Lemoness and SabreCat
|
||||
tr
|
||||
td
|
||||
h5 New Hairstyles!
|
||||
.promo_updos.pull-right
|
||||
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
|
||||
a(href='/static/old-news', target='_blank') Read older news
|
||||
|
||||
mixin oldNews
|
||||
h5 2/8/2015
|
||||
tr
|
||||
td
|
||||
h5 Email Notifications
|
||||
@@ -9,13 +26,8 @@ h5 2/8/2015 - EMAIL NOTIFICATIONS AND LOGIN TYPE SWITCHING!
|
||||
tr
|
||||
td
|
||||
h5 Login Type Switching
|
||||
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>!
|
||||
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
|
||||
|
||||
hr
|
||||
a(href='/static/old-news', target='_blank') Read older news
|
||||
|
||||
mixin oldNews
|
||||
h5 2/3/2015
|
||||
tr
|
||||
td
|
||||
|
||||
Reference in New Issue
Block a user