mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
WIP(party-page): Revised invite modals
This commit is contained in:
@@ -106,11 +106,15 @@
|
|||||||
"leaderOnlyChallenges": "Only group leader can create challenges",
|
"leaderOnlyChallenges": "Only group leader can create challenges",
|
||||||
"sendGift": "Send Gift",
|
"sendGift": "Send Gift",
|
||||||
"inviteFriends": "Invite Friends",
|
"inviteFriends": "Invite Friends",
|
||||||
"inviteAlertInfo": "Invite friends by <a href='http://habitrpg.wikia.com/wiki/API_Options' target='_blank'>User ID</a> here.",
|
"inviteByEmail": "Invite by Email",
|
||||||
"inviteExistUser": "Invite Existing User",
|
"inviteByEmailExplanation": "If a friend joins Habitica via your email, they'll automatically be invited to your party!",
|
||||||
"inviteByEmail": "Invite friends by email. If they join via your email, they'll automatically be invited to this group.",
|
"inviteFriendsNow": "Invite Friends Now",
|
||||||
|
"inviteFriendsLater": "Invite Friends Later",
|
||||||
|
"inviteAlertInfo": "If you have friends already using Habitica, invite them by <a href='http://habitrpg.wikia.com/wiki/API_Options' target='_blank'>User ID</a> here.",
|
||||||
|
"inviteExistUser": "Invite Existing Users",
|
||||||
"byColon": "By:",
|
"byColon": "By:",
|
||||||
"inviteNewUsers": "Invite New User(s)",
|
"inviteNewUsers": "Invite New Users",
|
||||||
|
"sendInvitations": "Send Invitations",
|
||||||
"inviteAlertInfo2": "Or share this link (copy/paste):",
|
"inviteAlertInfo2": "Or share this link (copy/paste):",
|
||||||
"sendGiftHeading": "Send Gift to <%= name %>",
|
"sendGiftHeading": "Send Gift to <%= name %>",
|
||||||
"sendGiftGemsBalance": "From <%= number %> Gems",
|
"sendGiftGemsBalance": "From <%= number %> Gems",
|
||||||
@@ -123,5 +127,10 @@
|
|||||||
"startPartyWithFriends": "Start a Party with your friends!",
|
"startPartyWithFriends": "Start a Party with your friends!",
|
||||||
"startAParty": "Start a Party",
|
"startAParty": "Start a Party",
|
||||||
"addToParty": "Add someone to your party",
|
"addToParty": "Add someone to your party",
|
||||||
"likePost": "Click if you like this post!"
|
"likePost": "Click if you like this post!",
|
||||||
|
"partyExplanation1": "Play Habitica with friends to stay accountable!",
|
||||||
|
"partyExplanation2": "Battle monsters and create Challenges!",
|
||||||
|
"partyExplanation3": "Invite friends now to earn a Quest Scroll!",
|
||||||
|
"wantToStartParty": "Do you want to start a party?",
|
||||||
|
"exclusiveQuestScroll": "Inviting a friend to your party will grant you an exclusive Quest Scroll to battle the Basi-List together!"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,4 +66,7 @@ ul
|
|||||||
flex-direction: column
|
flex-direction: column
|
||||||
|
|
||||||
.margin-auto
|
.margin-auto
|
||||||
margin: auto auto 1em auto;
|
margin: auto auto 1em auto
|
||||||
|
|
||||||
|
.width-50
|
||||||
|
width: 50%
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
|||||||
|
|
||||||
$scope.inviter = User.user.profile.name;
|
$scope.inviter = User.user.profile.name;
|
||||||
$scope.emails = [{name:"",email:""},{name:"",email:""}];
|
$scope.emails = [{name:"",email:""},{name:"",email:""}];
|
||||||
|
$scope.invitees = [{invitee:""},{invitee:""}];
|
||||||
|
|
||||||
$scope.inviteEmails = function(){
|
$scope.inviteEmails = function(){
|
||||||
Groups.Group.invite({gid: $scope.group._id}, {inviter: $scope.inviter, emails: $scope.emails}, function(){
|
Groups.Group.invite({gid: $scope.group._id}, {inviter: $scope.inviter, emails: $scope.emails}, function(){
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ function($rootScope, ApiUrl, $resource, $q, $http, User, Challenges, Analytics,
|
|||||||
},
|
},
|
||||||
|
|
||||||
inviteOrStartParty: function(group) {
|
inviteOrStartParty: function(group) {
|
||||||
if (group.type === "party") {
|
if (group.type === "party" || $location.$$path === "/options/groups/party") {
|
||||||
$rootScope.openModal('invite-friends', {
|
$rootScope.openModal('invite-friends', {
|
||||||
controller:'InviteToGroupCtrl',
|
controller:'InviteToGroupCtrl',
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
@@ -10,11 +10,21 @@ script(type='text/ng-template', id='partials/options.social.party.html')
|
|||||||
a.btn.btn-danger(ng-click='reject()')=env.t('reject')
|
a.btn.btn-danger(ng-click='reject()')=env.t('reject')
|
||||||
|
|
||||||
div(ng-hide='user.invitations.party.id').container-fluid
|
div(ng-hide='user.invitations.party.id').container-fluid
|
||||||
.row.margin-auto
|
.row.margin-auto.text-center
|
||||||
a.btn.btn-primary.btn-lg.flex-column(ng-click="inviteOrStartParty(group)")=env.t("startPartyWithFriends")
|
a.btn.btn-primary.btn-lg.width-50(ng-click="inviteOrStartParty(group)")=env.t("startPartyWithFriends")
|
||||||
.row.margin-auto.text-center(ng-controller='UserCtrl')
|
.row.margin-auto.text-center(ng-controller='UserCtrl')
|
||||||
.margin-auto
|
.margin-auto
|
||||||
span.inline-block.quest_vice3
|
span.inline-block.quest_vice3
|
||||||
span.figure.herobox.inline-block
|
span.figure.herobox.inline-block
|
||||||
.character-sprites
|
.character-sprites
|
||||||
+generatedAvatar
|
+generatedAvatar
|
||||||
|
.row.margin-auto.text-center
|
||||||
|
ul
|
||||||
|
li=env.t('partyExplanation1')
|
||||||
|
li=env.t('partyExplanation2')
|
||||||
|
li=env.t('partyExplanation3')
|
||||||
|
.row.margin-auto.text-center
|
||||||
|
h4=env.t('wantToStartParty')
|
||||||
|
.row.margin-auto.text-center
|
||||||
|
span.btn.btn-primary(ng-click="inviteOrStartParty(group)")=env.t('inviteFriendsNow')
|
||||||
|
span.btn.btn-default=env.t('inviteFriendsLater')
|
||||||
|
|||||||
@@ -1,48 +1,53 @@
|
|||||||
script(type='text/ng-template', id='modals/invite-friends.html')
|
script(type='text/ng-template', id='modals/invite-friends.html')
|
||||||
.modal-header
|
|
||||||
h4=env.t('inviteFriends')
|
|
||||||
.modal-body
|
.modal-body
|
||||||
p.alert.alert-info!=env.t('inviteAlertInfo')
|
tabset
|
||||||
|
tab(heading=env.t('inviteByEmail'))
|
||||||
form.form-inline(ng-submit='invite()')
|
p.alert.alert-info=env.t('inviteByEmailExplanation')
|
||||||
//-.alert.alert-danger(ng-show='_groupError') {{_groupError}}
|
form.form-horizontal(ng-submit='inviteEmails()')
|
||||||
.form-group
|
table.table.table-striped
|
||||||
input.form-control(type='text', placeholder=env.t('userId'), ng-model='invitee')
|
thead
|
||||||
|
|
tr
|
||||||
button.btn.btn-primary(type='submit')=env.t('inviteExistUser')
|
th=env.t('name')
|
||||||
|
th=env.t('email')
|
||||||
hr
|
tbody
|
||||||
|
tr(ng-repeat='email in emails')
|
||||||
p.alert.alert-info=env.t('inviteByEmail')
|
td
|
||||||
|
input.form-control(type='text', ng-model='email.name')
|
||||||
form.form-horizontal(ng-submit='inviteEmails()')
|
td
|
||||||
table.table.table-striped
|
input.form-control(type='email', ng-model='email.email')
|
||||||
thead
|
tr
|
||||||
tr
|
td(colspan=2)
|
||||||
th=env.t('name')
|
a.btn.btn-xs.pull-right(ng-click='emails = emails.concat([{name:"",email:""}])')
|
||||||
th=env.t('email')
|
i.glyphicon.glyphicon-plus
|
||||||
tbody
|
tr
|
||||||
tr(ng-repeat='email in emails')
|
td.form-group(colspan=2)
|
||||||
td
|
label.col-sm-1.control-label=env.t('byColon')
|
||||||
input.form-control(type='text', ng-model='email.name')
|
.col-sm-7
|
||||||
td
|
input.form-control(type='text', ng-model='inviter')
|
||||||
input.form-control(type='email', ng-model='email.email')
|
.col-sm-4
|
||||||
tr
|
button.btn.btn-primary(type='submit')=env.t('sendInvitations')
|
||||||
td(colspan=2)
|
tab(heading=env.t('inviteExistUser'))
|
||||||
a.btn.btn-xs.pull-right(ng-click='emails = emails.concat([{name:"",email:""}])')
|
p.alert.alert-info!=env.t('inviteAlertInfo')
|
||||||
i.glyphicon.glyphicon-plus
|
form.form-horizontal(ng-submit='invite()')
|
||||||
tr
|
table.table.table-striped
|
||||||
td.form-group(colspan=2)
|
thead
|
||||||
label.col-sm-1.control-label=env.t('byColon')
|
tr
|
||||||
.col-sm-7
|
th=env.t('userId')
|
||||||
input.form-control(type='text', ng-model='inviter')
|
tbody
|
||||||
.col-sm-4
|
tr(ng-repeat='invitee in invitees')
|
||||||
button.btn.btn-primary.btn-wrap(type='submit')=env.t('inviteNewUsers')
|
td
|
||||||
//-
|
input.form-control(type='text', ng-model='invitee.invitee')
|
||||||
hr
|
tr
|
||||||
p.alert.alert-info=env.t('inviteAlertInfo2')
|
td(colspan=2)
|
||||||
input.form-control(type='text', ng-value='inviteLink({id: party._id, inviter: user._id, name: party.name})')
|
a.btn.btn-xs.pull-right(ng-click='invitees = invitees.concat([{invitee:""}])')
|
||||||
|
i.glyphicon.glyphicon-plus
|
||||||
.modal-footer
|
tr
|
||||||
button.btn.btn-default(ng-click='$close()')=env.t('close')
|
td
|
||||||
|
.col-sm-1
|
||||||
|
.col-sm-7
|
||||||
|
.col-sm-4
|
||||||
|
button.btn.btn-primary(type='submit')=env.t('sendInvitations')
|
||||||
|
.row
|
||||||
|
.quest_basilist.pull-left
|
||||||
|
p(style='margin:2em')=env.t('exclusiveQuestScroll')
|
||||||
|
button.btn.btn-default.pull-right(style='margin:auto 1em', ng-click='$close()')=env.t('close')
|
||||||
|
|||||||
Reference in New Issue
Block a user