mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Added start party option, locales, and plus button
This commit is contained in:
@@ -117,5 +117,7 @@
|
||||
"sendGiftPurchase": "Purchase",
|
||||
"sendGiftMessagePlaceholder": "Personal message (optional)",
|
||||
"sendGiftSubscription": "<%= months %> Month(s): $<%= price %>",
|
||||
"inviteFriends": "Invite Friends"
|
||||
"inviteFriends": "Invite Friends",
|
||||
"startAParty": "Start a Party",
|
||||
"addToParty": "Add someone to your party"
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
@media (min-width: 70em)
|
||||
.site-header
|
||||
width: 70%
|
||||
|
||||
|
||||
|
||||
// this is a wrapper for avatars in the header
|
||||
// inside this is the actual `herobox` module
|
||||
@@ -125,7 +125,7 @@
|
||||
hrpg-label-color-mixin(darken($color-herobox, 16.18%))
|
||||
width: 2.618em
|
||||
text-align:center
|
||||
margin-right: 0.618em
|
||||
margin-right: 0.618em
|
||||
.meter
|
||||
position: relative
|
||||
overflow: hidden
|
||||
@@ -161,7 +161,7 @@
|
||||
white-space: nowrap
|
||||
&.value
|
||||
right: 0.382em
|
||||
|
||||
|
||||
// boss.jade only
|
||||
[class^="quest_"] + &
|
||||
min-width: 220px
|
||||
@@ -172,4 +172,6 @@
|
||||
header .hero-stats
|
||||
background-color: darken($color-herobox, 4%)
|
||||
border-right: 1px solid darken($color-herobox, 12%)
|
||||
|
||||
|
||||
button.party-invite
|
||||
margin-top: 55px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User',
|
||||
function($scope, Groups, User) {
|
||||
habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User', '$location', '$rootScope',
|
||||
function($scope, Groups, User, $location, $rootScope) {
|
||||
|
||||
$scope.Math = window.Math;
|
||||
$scope.user = User.user;
|
||||
@@ -16,6 +16,17 @@ habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User',
|
||||
$scope.$watch('user.party.orderAscending', triggerResort);
|
||||
});
|
||||
|
||||
$scope.inviteOrStartParty = function(group) {
|
||||
if (group.type === "party") {
|
||||
$rootScope.openModal('invite-friends', {controller:'InviteToGroupCtrl', resolve:
|
||||
{injectedGroup: function(){
|
||||
return group;
|
||||
}}});
|
||||
} else {
|
||||
$location.path("/options/groups/party");
|
||||
}
|
||||
}
|
||||
|
||||
function resortParty() {
|
||||
var result = _.sortBy(
|
||||
_.filter($scope.party.members, function(member){
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
|
||||
// party
|
||||
span(ng-controller='PartyCtrl')
|
||||
button.pull-right.btn.btn-primary(ng-click="openInviteModal(group)", ng-if="(party.members.length === 1) && user.preferences.displayInviteToPartyWhenPartyIs1")=env.t("inviteFriends")
|
||||
button.party-invite.pull-right.btn.btn-primary(ng-click="inviteOrStartParty(group)", ng-if="(!party.members) && user.preferences.displayInviteToPartyWhenPartyIs1", popover=env.t("startAParty"), popover-placement="top", popover-trigger="mouseenter")
|
||||
span.glyphicon.glyphicon-plus
|
||||
button.party-invite.pull-right.btn.btn-primary(ng-click="inviteOrStartParty(group)", ng-if="(party.members.length === 1) && user.preferences.displayInviteToPartyWhenPartyIs1", popover=env.t("addToParty"), popover-placement="top", popover-trigger="mouseenter")
|
||||
span.glyphicon.glyphicon-plus
|
||||
.herobox-wrap(ng-repeat='profile in partyMinusSelf')
|
||||
+herobox()
|
||||
|
||||
Reference in New Issue
Block a user