mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-19 10:14:11 +00:00
Merge branch 'develop' into blade-Finish_weeklies_pr
This commit is contained in:
commit
54681e36b5
17 changed files with 114 additions and 69 deletions
|
|
@ -49,7 +49,7 @@
|
|||
"classBonusText": "Your class (Warrior, if you haven't unlocked or selected another class) uses its own equipment more effectively than gear from other classes. Equipped gear from your current class gets a 50% boost to the attribute bonus it grants.",
|
||||
"classEquipBonus": "Class Bonus",
|
||||
"battleGear": "Battle Gear",
|
||||
"battleGearText": "This is the gear you wear into battle, it affects numbers when interacting with your tasks.",
|
||||
"battleGearText": "This is the gear you wear into battle; it affects numbers when interacting with your tasks.",
|
||||
"costume": "Costume",
|
||||
"costumeText": "If you prefer the look of other gear to what you have equipped, check the \"Use Costume\" box to visually don a costume while wearing your battle gear underneath.",
|
||||
"useCostume": "Use Costume",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"defaultTaskNotes": " ",
|
||||
"defaultHabit1Text": "Productive Work (Click the pencil to edit)",
|
||||
"defaultHabit1Notes": "Sample Good Habits: + Eat a vegetable +15 minutes productive work",
|
||||
"defaultHabit1Notes": "Sample Good Habits: + Eat a vegetable + 15 minutes productive work",
|
||||
|
||||
"defaultHabit2Text": "Eat Junk Food (Click the pencil to edit)",
|
||||
"defaultHabit2Notes": "Sample Bad Habits: - Smoke - Procrastinate",
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@
|
|||
"lastLoggedIn": "- Last logged in",
|
||||
"notPorted": "This feature is not yet ported from the original site.",
|
||||
"buyThis": "Buy this <%= text %> with <%= price %> of your <%= gems %> Gems?",
|
||||
"untilNoFace": "Until we add Facebook, use your UUID and API Token to log in (found at https://habitrpg.com > Options > Settings).",
|
||||
"noReachServer": "Server not currently reachable, try again later",
|
||||
"errorUpCase": "ERROR:",
|
||||
"newPassSent": "New password sent.",
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
"editGroup": "Edit Group",
|
||||
"newGroupName": "<%= groupType %> Name",
|
||||
"groupName": "Group Name",
|
||||
"groupLeader": "Group Leader",
|
||||
"groupID": "Group ID",
|
||||
"groupDescr": "Description shown in public Guilds list (Markdown OK)",
|
||||
"logoUrl": "Logo URL",
|
||||
"assignLeader": "Assign Group Leader",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"quest": "quest",
|
||||
"completed": "Completed!",
|
||||
"youReceived": "You've Received",
|
||||
"questSend": "Clicking \"Invite\" will send an invitation to your party members. When all members have accepted or denied, the quest begins. See status under Options > Social > Party.",
|
||||
"questSend": "Clicking \"Invite\" will send an invitation to your party members. When all members have accepted or denied, the quest begins. See status under Social > Party.",
|
||||
"inviteParty": "Invite Party",
|
||||
"questInvitation": "Quest Invitation: ",
|
||||
"questInvitationTitle": "Quest Invitation",
|
||||
|
|
|
|||
|
|
@ -89,17 +89,17 @@
|
|||
"dailiesRestingInInn": "You're Resting in the Inn! Your Dailies will NOT hurt you tonight, but they WILL still refresh every day. If you're in a quest, you won't deal damage/collect items until you check out of the Inn, but you can still be injured by a Boss if your Party mates skip their own Dailies.",
|
||||
"habitHelp1": "Good Habits are things that you do often. They award Gold and Experience every time you click the <%= plusIcon %>.",
|
||||
"habitHelp2": "Bad Habits are things you want to avoid doing. They remove Health every time you click the <%= minusIcon %>.",
|
||||
"habitHelp3": "For inspiration, check out <%= linkStart %>these sample Habits<%= linkEnd %>.",
|
||||
"habitHelp3": "For inspiration, check out these <a href='http://habitrpg.wikia.com/wiki/Sample_Habits' target='_blank'>sample Habits</a>!",
|
||||
"newbieGuild": "More questions? Ask in the <%= linkStart %>Newbies Guild<%= linkEnd %>!",
|
||||
"dailyHelp1": "Dailies repeat <%= emphasisStart %>every day<%= emphasisEnd %> that they are active. Click the <%= pencilIcon %> to change the days a Daily is active.",
|
||||
"dailyHelp2": "If you don't complete active Dailies, you lose Health when your day rolls over.",
|
||||
"dailyHelp3": "Dailies turn <%= emphasisStart %>redder<%= emphasisEnd %> when you miss them, and <%= emphasisStart %>bluer<%= emphasisEnd %> when you complete them. The redder the Daily, the more it will reward you... or hurt you.",
|
||||
"dailyHelp4": "To change when your day rolls over, go to <%= linkStart %> Settings > Site<%= linkEnd %> > Custom Day Start.",
|
||||
"dailyHelp5": "For inspiration, check out these <%= linkStart %>sample Dailies<%= linkEnd %>!",
|
||||
"dailyHelp5": "For inspiration, check out these <a href='http://habitrpg.wikia.com/wiki/Sample_Dailies' target='_blank'>sample Dailies</a>!",
|
||||
"toDoHelp1": "To-Dos start yellow, and get redder (more valuable) the longer it takes to complete them.",
|
||||
"toDoHelp2": "To-Dos never hurt you! They only award Gold and Experience.",
|
||||
"toDoHelp3": "Breaking a To-Do down into a checklist of smaller items will make it less scary, and will increase your points!",
|
||||
"toDoHelp4": "For inspiration, check out these <%= linkStart %>sample To-Dos<%= linkEnd %>!",
|
||||
"toDoHelp4": "For inspiration, check out these <a href='http://habitrpg.wikia.com/wiki/Sample_To-Dos' target='_blank'>sample To-Dos</a>!",
|
||||
"rewardHelp1": "The Equipment you buy for your avatar is stored in <%= linkStart %>Inventory > Equipment<%= linkEnd %>.",
|
||||
"rewardHelp2": "Equipment affects your stats (<%= linkStart %>Avatar > Stats<%= linkEnd %>).",
|
||||
"rewardHelp3": "Special equipment will appear here during World Events.",
|
||||
|
|
|
|||
|
|
@ -1877,9 +1877,9 @@ _.each api.subscriptionBlocks, (b,k)->b.key = k
|
|||
repeat = {m:true,t:true,w:true,th:true,f:true,s:true,su:true}
|
||||
api.userDefaults =
|
||||
habits: [
|
||||
{type: 'habit', text: t('defaultHabit1Text'), notes: t('defaultTaskNotes'), value: 0, up: true, down: false, attribute: 'per' }
|
||||
{type: 'habit', text: t('defaultHabit2Text'), notes: t('defaultTaskNotes'), value: 0, up: false, down: true, attribute: 'str'}
|
||||
{type: 'habit', text: t('defaultHabit3Text'), notes: t('defaultTaskNotes'), value: 0, up: true, down: true, attribute: 'str'}
|
||||
{type: 'habit', text: t('defaultHabit1Text'), value: 0, up: true, down: false, attribute: 'per' }
|
||||
{type: 'habit', text: t('defaultHabit2Text'), value: 0, up: false, down: true, attribute: 'str'}
|
||||
{type: 'habit', text: t('defaultHabit3Text'), value: 0, up: true, down: true, attribute: 'str'}
|
||||
]
|
||||
|
||||
dailys: [
|
||||
|
|
@ -1898,7 +1898,7 @@ api.userDefaults =
|
|||
]
|
||||
|
||||
rewards: [
|
||||
{type: 'reward', text: t('defaultReward1Text'), notes: t('defaultTaskNotes'), value: 10 }
|
||||
{type: 'reward', text: t('defaultReward1Text'), value: 10 }
|
||||
# {type: 'reward', text: t('defaultReward2Text'), notes: t('defaultReward2Notes'), value: 10 }
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ Group = require("../../website/src/models/group").model
|
|||
app = require("../../website/src/server")
|
||||
|
||||
describe "Guilds", ->
|
||||
before (done) ->
|
||||
registerNewUser ->
|
||||
User.findByIdAndUpdate user._id,
|
||||
$set:
|
||||
"balance": 10
|
||||
, (err, _user) ->
|
||||
done()
|
||||
, true
|
||||
|
||||
context "creating groups", ->
|
||||
before (done) ->
|
||||
registerNewUser ->
|
||||
User.findByIdAndUpdate user._id,
|
||||
$set:
|
||||
"balance": 10
|
||||
, (err, _user) ->
|
||||
done()
|
||||
, true
|
||||
|
||||
it "can create a public guild", (done) ->
|
||||
request.post(baseURL + "/groups").send(
|
||||
name: "TestGroup"
|
||||
|
|
@ -53,19 +53,42 @@ describe "Guilds", ->
|
|||
done()
|
||||
, false
|
||||
|
||||
context "finding groups", ->
|
||||
it "can find a guild", (done) ->
|
||||
guild = undefined
|
||||
context "get guilds", ->
|
||||
guild = undefined
|
||||
|
||||
beforeEach (done)->
|
||||
request.post(baseURL + "/groups").send(
|
||||
name: "TestGroup2"
|
||||
type: "guild"
|
||||
).end (res) ->
|
||||
guild = res.body
|
||||
request.get(baseURL + "/groups/" + guild._id)
|
||||
.send()
|
||||
done()
|
||||
|
||||
it "can find a guild", (done) ->
|
||||
request.get(baseURL + "/groups/" + guild._id)
|
||||
.end (res) ->
|
||||
expectCode res, 200
|
||||
expect(guild._id).to.equal res.body._id
|
||||
expect(res.body._id).to.equal res.body._id
|
||||
done()
|
||||
|
||||
it "transforms members array to an arrray of user objects", (done) ->
|
||||
request.get(baseURL + "/groups/" + guild._id)
|
||||
.end (res) ->
|
||||
expectCode res, 200
|
||||
members = res.body.members
|
||||
# @TODO: would be more instructive if it had more members in guild :(
|
||||
_(members).each (member) ->
|
||||
expect(member).to.be.an 'object'
|
||||
expect(member.profile.name).to.exist
|
||||
done()
|
||||
|
||||
it "transforms leader id to a user object", (done) ->
|
||||
request.get(baseURL + "/groups/" + guild._id)
|
||||
.end (res) ->
|
||||
expectCode res, 200
|
||||
leader = res.body.leader
|
||||
expect(leader).to.be.an 'object'
|
||||
expect(leader.profile.name).to.exist
|
||||
done()
|
||||
|
||||
it "can list guilds", (done) ->
|
||||
|
|
@ -228,38 +251,46 @@ describe "Guilds", ->
|
|||
describe "Public Guilds", ->
|
||||
guild = undefined
|
||||
before (done) ->
|
||||
request.post(baseURL + "/groups").send(
|
||||
name: "TestPublicGroup"
|
||||
type: "guild"
|
||||
privacy: "public"
|
||||
).end (res) ->
|
||||
expectCode res, 200
|
||||
guild = res.body
|
||||
expect(guild.members.length).to.equal 1
|
||||
expect(guild.leader).to.equal user._id
|
||||
#Add members to guild
|
||||
async.waterfall [
|
||||
(cb) ->
|
||||
registerManyUsers 15, cb
|
||||
async.waterfall [
|
||||
(cb) ->
|
||||
registerNewUser ->
|
||||
User.findByIdAndUpdate user._id, {$set: { "balance": 10 } }, (err, _user) ->
|
||||
cb()
|
||||
, true
|
||||
(cb) ->
|
||||
request.post(baseURL + "/groups").send(
|
||||
name: "TestPublicGroup"
|
||||
type: "guild"
|
||||
privacy: "public"
|
||||
).end (res) ->
|
||||
guild = res.body
|
||||
expect(guild.members.length).to.equal 1
|
||||
expect(guild.leader).to.equal user._id
|
||||
#Add members to guild
|
||||
cb()
|
||||
|
||||
(_members, cb) ->
|
||||
members = _members
|
||||
(cb) ->
|
||||
registerManyUsers 15, cb
|
||||
|
||||
joinGuild = (member, callback) ->
|
||||
request.post(baseURL + "/groups/" + guild._id + "/join")
|
||||
.set("X-API-User", member._id)
|
||||
.set("X-API-Key", member.apiToken)
|
||||
.end ->
|
||||
callback(null, null)
|
||||
(_members, cb) ->
|
||||
members = _members
|
||||
|
||||
async.map members, joinGuild, (err, results) -> cb()
|
||||
], done
|
||||
joinGuild = (member, callback) ->
|
||||
request.post(baseURL + "/groups/" + guild._id + "/join")
|
||||
.set("X-API-User", member._id)
|
||||
.set("X-API-Key", member.apiToken)
|
||||
.end ->
|
||||
callback(null, null)
|
||||
|
||||
async.map members, joinGuild, (err, results) -> cb()
|
||||
|
||||
], done
|
||||
|
||||
context "is a member", ->
|
||||
before (done) ->
|
||||
registerNewUser ->
|
||||
request.post(baseURL + "/groups/" + guild._id + "/join")
|
||||
.end ->
|
||||
.end (res)->
|
||||
done()
|
||||
, true
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
padding: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
.formatting-help
|
||||
.slight-vertical-padding
|
||||
clear: both
|
||||
padding-top: 0.618em
|
||||
|
||||
|
|
|
|||
BIN
website/public/emails/images/PROMO-Enchanted-Armoire-v1.png
Normal file
BIN
website/public/emails/images/PROMO-Enchanted-Armoire-v1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9 KiB |
|
|
@ -40,6 +40,7 @@ var populateQuery = function(type, q, additionalFields){
|
|||
q.populate('members', partyFields + (additionalFields ? (' ' + additionalFields) : ''));
|
||||
else
|
||||
q.populate(guildPopulate);
|
||||
q.populate('leader', nameFields);
|
||||
q.populate('invites', nameFields);
|
||||
q.populate({
|
||||
path: 'challenges',
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ var UserSchema = new Schema({
|
|||
rewards: {type:[TaskSchemas.RewardSchema]},
|
||||
|
||||
extra: Schema.Types.Mixed,
|
||||
|
||||
|
||||
pushDevices: {type: [{
|
||||
regId: {type: String},
|
||||
type: {type: String}
|
||||
|
|
@ -459,7 +459,9 @@ UserSchema.pre('save', function(next) {
|
|||
newTask.name = newTask.name(self.preferences.language);
|
||||
}else{
|
||||
newTask.text = newTask.text(self.preferences.language);
|
||||
newTask.notes = newTask.notes(self.preferences.language);
|
||||
if(newTask.notes) {
|
||||
newTask.notes = newTask.notes(self.preferences.language);
|
||||
}
|
||||
|
||||
if(newTask.checklist){
|
||||
newTask.checklist = _.map(newTask.checklist, function(checklistItem){
|
||||
|
|
|
|||
|
|
@ -179,8 +179,11 @@ module.exports.setupConfig = function(){
|
|||
baseUrl = nconf.get('BASE_URL');
|
||||
|
||||
module.exports.ga = require('universal-analytics')(nconf.get('GA_ID'));
|
||||
var mixpanel = require('mixpanel')
|
||||
module.exports.mixpanel = mixpanel.init(nconf.get('MP_ID'));
|
||||
|
||||
var mixpanel = isProd && require('mixpanel');
|
||||
module.exports.mixpanel = mixpanel
|
||||
? mixpanel.init(nconf.get('MP_ID'))
|
||||
: { track: function() {} };
|
||||
};
|
||||
|
||||
var algorithm = 'aes-256-ctr';
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter
|
|||
span.glyphicon.glyphicon-ban-circle
|
||||
=env.t('leave')
|
||||
a.btn.btn-success.pull-right(ng-if=':: !isMemberOfGroup(User.user._id, group)', ng-click='join(group)')=env.t('join')
|
||||
span(ng-if='group.leader == user.id')
|
||||
span(ng-if='group.leader._id == user.id')
|
||||
button.btn.btn-sm.btn-primary.pull-right(ng-click='save(group)', ng-show='group._editing')=env.t('save')
|
||||
button.btn.btn-sm.btn-default.pull-right(ng-click='group._editing = true', ng-hide='group._editing')=env.t('editGroup')
|
||||
|
||||
|
|
@ -51,7 +51,13 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter
|
|||
img.pull-right(ng-show='group.logo', ng-src='{{group.logo}}')
|
||||
markdown(text='group.description')
|
||||
hr
|
||||
small.muted Group ID: {{group._id}}
|
||||
p=env.t('groupLeader')
|
||||
|:
|
||||
a(class='badge badge-info', ng-click='clickMember(group.leader._id, true)')
|
||||
| {{group.leader.profile.name}}
|
||||
.slight-vertical-padding
|
||||
small.muted=env.t('groupID')
|
||||
|: {{group._id}}
|
||||
|
||||
include ./challenge-box
|
||||
|
||||
|
|
@ -78,14 +84,14 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter
|
|||
ng-change='set({"party.orderAscending": user.party.orderAscending})'
|
||||
)
|
||||
table.table.table-striped(bindonce='group')
|
||||
tr(ng-repeat='member in group.members track by member._id')
|
||||
tr(ng-repeat='member in group.members track by member._id' ng-if='member._id != group.leader._id')
|
||||
td.media
|
||||
// allow leaders to ban members
|
||||
div.pull-left(ng-show='group.leader == user.id && user.id!=member._id')
|
||||
div.pull-left(ng-show='group.leader._id == user.id')
|
||||
a.media-object(ng-click='removeMember(group, member, true)')
|
||||
span.glyphicon.glyphicon-ban-circle(tooltip=env.t('banTip'))
|
||||
a.media-body
|
||||
span(ng-class='{"badge badge-info": group.leader==member._id}', ng-click='clickMember(member._id, true)')
|
||||
span(ng-click='clickMember(member._id, true)')
|
||||
| {{member.profile.name}}
|
||||
tr(ng-if='group.memberCount > group.members.length')
|
||||
td
|
||||
|
|
@ -98,7 +104,7 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter
|
|||
tr(ng-repeat='invite in group.invites')
|
||||
td.media
|
||||
// allow leaders to ban members
|
||||
div.pull-left(ng-show='group.leader == user.id')
|
||||
div.pull-left(ng-show='group.leader._id == user.id')
|
||||
a.media-object(ng-click='removeMember(group, invite, false)')
|
||||
span.glyphicon.glyphicon-ban-circle(tooltip=env.t('banTip'))
|
||||
a.media-body
|
||||
|
|
@ -117,7 +123,7 @@ a.pull-right.gem-wallet(ng-if='group.type!="party"', popover-trigger='mouseenter
|
|||
td
|
||||
.popover.static-popover.fade.right.in.wide-popover
|
||||
.arrow
|
||||
h3.popover-title {{Members.members[group.leader].profile.name}}
|
||||
h3.popover-title {{group.leader.profile.name}}
|
||||
.popover-content
|
||||
markdown(text='group.leaderMessage')
|
||||
div(ng-controller='ChatCtrl')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
small.btn-link(ng-init='showHelp = false', ng-click='showHelp = !showHelp')
|
||||
| {{showHelp ? env.t('hideFormattingHelp') : env.t('showFormattingHelp')}}
|
||||
|
||||
.formatting-help(ng-if='showHelp')
|
||||
.slight-vertical-padding(ng-if='showHelp')
|
||||
table.table.table-striped
|
||||
tr.info
|
||||
td.col-xs-6 #[b=env.t('youType')]
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ script(type='text/ng-template', id='modals/chooseClass.html')
|
|||
.well(ng-show='selectedClass=="healer"')=env.t('healerText')
|
||||
|
||||
.modal-footer
|
||||
button.btn.btn-danger(ng-click='user.ops.disableClasses({}); $close()', popover-placement='top', popover-trigger='mouseenter', popover=env.t('optOutText'))=env.t('optOut')
|
||||
span(popover-placement='left', popover-trigger='mouseenter', popover=env.t('optOutText'))
|
||||
button.btn.btn-danger(ng-click='user.ops.disableClasses({}); $close()')=env.t('optOut')
|
||||
button.btn.btn-primary(ng-disabled='!selectedClass' ng-click='changeClass(selectedClass); $close()')=env.t('select')
|
||||
.pull-left!=env.t('chooseClassLearn')
|
||||
|
|
|
|||
|
|
@ -6,20 +6,20 @@ div(ng-if='list.help', ng-switch='::list.type')
|
|||
li!=env.t('newbieGuild', {linkStart:"<a href='https://habitrpg.com/#/options/groups/guilds/5481ccf3-5d2d-48a9-a871-70a7380cee5a' target='_blank'>", linkEnd: "</a>"})
|
||||
ul(ng-switch-when='daily')
|
||||
li!=env.t('dailyHelp1', {emphasisStart:"<strong>", emphasisEnd:"</strong>", pencilIcon:"<span class='glyphicon glyphicon-pencil'></span>"})
|
||||
li!=env.t('dailyHelp2')
|
||||
li=env.t('dailyHelp2')
|
||||
li!=env.t('dailyHelp3', {emphasisStart:"<strong>", emphasisEnd:"</strong>"})
|
||||
li!=env.t('dailyHelp4', {linkStart:"<a href='/#/options/settings/settings' target='_blank'>", linkEnd:"</a>"})
|
||||
li!=env.t('dailyHelp5')
|
||||
li!=env.t('newbieGuild', {linkStart:"<a href='https://habitrpg.com/#/options/groups/guilds/5481ccf3-5d2d-48a9-a871-70a7380cee5a' target='_blank'>", linkEnd: "</a>"})
|
||||
ul(ng-switch-when='todo')
|
||||
li!=env.t('toDoHelp1')
|
||||
li!=env.t('toDoHelp2')
|
||||
li!=env.t('toDoHelp3')
|
||||
li=env.t('toDoHelp1')
|
||||
li=env.t('toDoHelp2')
|
||||
li=env.t('toDoHelp3')
|
||||
li!=env.t('toDoHelp4')
|
||||
li!=env.t('newbieGuild', {linkStart:"<a href='https://habitrpg.com/#/options/groups/guilds/5481ccf3-5d2d-48a9-a871-70a7380cee5a' target='_blank'>", linkEnd: "</a>"})
|
||||
ul(ng-switch-when='reward')
|
||||
li!=env.t('rewardHelp1', {linkStart:"<a href='/#/options/inventory/equipment' target='_blank'>", linkEnd: "</a>"})
|
||||
li!=env.t('rewardHelp2', {linkStart:"<a href='/#/options/profile/stats' target='_blank'>", linkEnd: "</a>"})
|
||||
li!=env.t('rewardHelp3')
|
||||
li=env.t('rewardHelp3')
|
||||
li!=env.t('rewardHelp4')
|
||||
li!=env.t('newbieGuild', {linkStart:"<a href='https://habitrpg.com/#/options/groups/guilds/5481ccf3-5d2d-48a9-a871-70a7380cee5a' target='_blank'>", linkEnd: "</a>"})
|
||||
|
|
|
|||
Loading…
Reference in a new issue