little fixes
This commit is contained in:
parent
3c885b35ac
commit
5471c2a350
5 changed files with 12 additions and 13 deletions
|
@ -499,7 +499,7 @@ const sendables = [
|
||||||
['leaveMap',leaveMap],
|
['leaveMap',leaveMap],
|
||||||
['checkForCall',checkForCall],
|
['checkForCall',checkForCall],
|
||||||
['acceptCall',acceptCall],
|
['acceptCall',acceptCall],
|
||||||
['denyAll',denyCall],
|
['denyCall',denyCall],
|
||||||
['denyInvite',denyInvite],
|
['denyInvite',denyInvite],
|
||||||
['inviteToJoin',inviteToJoin],
|
['inviteToJoin',inviteToJoin],
|
||||||
['inviteACall',inviteACall],
|
['inviteACall',inviteACall],
|
||||||
|
|
|
@ -247,13 +247,13 @@ export const lostMapper = self => data => {
|
||||||
export const mapperListUpdated = self => data => {
|
export const mapperListUpdated = self => data => {
|
||||||
// data.userid
|
// data.userid
|
||||||
// data.username
|
// data.username
|
||||||
// data.userimage
|
// data.avatar
|
||||||
|
|
||||||
self.mappersOnMap[data.userid] = {
|
self.mappersOnMap[data.userid] = {
|
||||||
id: data.userid,
|
id: data.userid,
|
||||||
name: data.username,
|
name: data.username,
|
||||||
username: data.username,
|
username: data.username,
|
||||||
image: data.userimage,
|
image: data.avatar,
|
||||||
color: Util.getPastelColor(),
|
color: Util.getPastelColor(),
|
||||||
inConversation: data.userinconversation,
|
inConversation: data.userinconversation,
|
||||||
coords: {
|
coords: {
|
||||||
|
@ -267,14 +267,14 @@ export const mapperListUpdated = self => data => {
|
||||||
if (data.userinconversation) self.room.chat.mapperJoinedCall(data.userid)
|
if (data.userinconversation) self.room.chat.mapperJoinedCall(data.userid)
|
||||||
|
|
||||||
// create a div for the collaborators compass
|
// create a div for the collaborators compass
|
||||||
self.createCompass(data.username, data.userid, data.userimage, self.mappersOnMap[data.userid].color)
|
self.createCompass(data.username, data.userid, data.avatar, self.mappersOnMap[data.userid].color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const newMapper = self => data => {
|
export const newMapper = self => data => {
|
||||||
// data.userid
|
// data.userid
|
||||||
// data.username
|
// data.username
|
||||||
// data.userimage
|
// data.avatar
|
||||||
// data.coords
|
// data.coords
|
||||||
var firstOtherPerson = Object.keys(self.mappersOnMap).length === 0
|
var firstOtherPerson = Object.keys(self.mappersOnMap).length === 0
|
||||||
|
|
||||||
|
@ -282,13 +282,12 @@ export const newMapper = self => data => {
|
||||||
id: data.userid,
|
id: data.userid,
|
||||||
name: data.username,
|
name: data.username,
|
||||||
username: data.username,
|
username: data.username,
|
||||||
image: data.userimage,
|
image: data.avatar,
|
||||||
color: Util.getPastelColor(),
|
color: Util.getPastelColor(),
|
||||||
realtime: true,
|
|
||||||
coords: {
|
coords: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create an item for them in the realtime box
|
// create an item for them in the realtime box
|
||||||
|
@ -297,7 +296,7 @@ export const newMapper = self => data => {
|
||||||
self.room.chat.addParticipant(self.mappersOnMap[data.userid])
|
self.room.chat.addParticipant(self.mappersOnMap[data.userid])
|
||||||
|
|
||||||
// create a div for the collaborators compass
|
// create a div for the collaborators compass
|
||||||
self.createCompass(data.username, data.userid, data.userimage, self.mappersOnMap[data.userid].color)
|
self.createCompass(data.username, data.userid, data.avatar, self.mappersOnMap[data.userid].color)
|
||||||
|
|
||||||
var notifyMessage = data.username + ' just joined the map'
|
var notifyMessage = data.username + ' just joined the map'
|
||||||
if (firstOtherPerson) {
|
if (firstOtherPerson) {
|
||||||
|
@ -332,7 +331,7 @@ export const invitedToCall = self => inviter => {
|
||||||
self.soundId = self.room.chat.sound.play('sessioninvite')
|
self.soundId = self.room.chat.sound.play('sessioninvite')
|
||||||
|
|
||||||
var username = self.mappersOnMap[inviter].name
|
var username = self.mappersOnMap[inviter].name
|
||||||
var notifyText = '<img src="' + Metamaps.Erb['junto_spinner_darkgrey.gif'] + '" style="display: inline-block; margin-top: -12px; vertical-align: top;" />'
|
var notifyText = '<img src="' + Metamaps.Erb['junto_spinner_darkgrey.gif'] + '" style="display: inline-block; margin-top: -12px; margin-bottom: -6px; vertical-align: top;" />'
|
||||||
notifyText += username + ' is inviting you to a conversation. Join live?'
|
notifyText += username + ' is inviting you to a conversation. Join live?'
|
||||||
notifyText += ' <button type="button" class="toast-button button" onclick="Metamaps.Realtime.acceptCall(' + inviter + ')">Yes</button>'
|
notifyText += ' <button type="button" class="toast-button button" onclick="Metamaps.Realtime.acceptCall(' + inviter + ')">Yes</button>'
|
||||||
notifyText += ' <button type="button" class="toast-button button btn-no" onclick="Metamaps.Realtime.denyCall(' + inviter + ')">No</button>'
|
notifyText += ' <button type="button" class="toast-button button btn-no" onclick="Metamaps.Realtime.denyCall(' + inviter + ')">No</button>'
|
||||||
|
|
|
@ -50,7 +50,7 @@ export const sendMapperInfo = self => userid => {
|
||||||
var update = {
|
var update = {
|
||||||
userToNotify: userid,
|
userToNotify: userid,
|
||||||
username: Active.Mapper.get('name'),
|
username: Active.Mapper.get('name'),
|
||||||
userimage: Active.Mapper.get('image'),
|
avatar: Active.Mapper.get('image'),
|
||||||
userid: Active.Mapper.id,
|
userid: Active.Mapper.id,
|
||||||
userinconversation: self.inConversation,
|
userinconversation: self.inConversation,
|
||||||
mapid: Active.Map.id
|
mapid: Active.Map.id
|
||||||
|
|
|
@ -159,7 +159,7 @@ var Private = {
|
||||||
var date = (m.timestamp.getMonth() + 1) + '/' + m.timestamp.getDate()
|
var date = (m.timestamp.getMonth() + 1) + '/' + m.timestamp.getDate()
|
||||||
date += ' ' + addZero(m.timestamp.getHours()) + ':' + addZero(m.timestamp.getMinutes())
|
date += ' ' + addZero(m.timestamp.getHours()) + ':' + addZero(m.timestamp.getMinutes())
|
||||||
m.timestamp = date
|
m.timestamp = date
|
||||||
m.image = m.user_image || 'http://www.hotpepper.ca/wp-content/uploads/2014/11/default_profile_1_200x200.png' // TODO: remove
|
m.image = m.user_image
|
||||||
m.message = linker.link(m.message)
|
m.message = linker.link(m.message)
|
||||||
var $html = $(this.messageTemplate(m))
|
var $html = $(this.messageTemplate(m))
|
||||||
this.$messages.append($html)
|
this.$messages.append($html)
|
||||||
|
|
|
@ -63,7 +63,7 @@ module.exports = function (io, store) {
|
||||||
userid: data.userid,
|
userid: data.userid,
|
||||||
username: data.username,
|
username: data.username,
|
||||||
userinconversation: data.userinconversation,
|
userinconversation: data.userinconversation,
|
||||||
userimage: data.userimage
|
avatar: data.avatar
|
||||||
}
|
}
|
||||||
socket.broadcast.in(userMapRoom(data.userToNotify, data.mapid)).emit(MAPPER_LIST_UPDATED, existingUser)
|
socket.broadcast.in(userMapRoom(data.userToNotify, data.mapid)).emit(MAPPER_LIST_UPDATED, existingUser)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue