Browse Source

Improved group, user link and statuses

Added my-chat-link directive
Fixed self online status
Improved templates performance
master
Igor Zhukov 10 years ago
parent
commit
7958990292
  1. 3
      app/css/desktop.css
  2. 51
      app/js/directives.js
  3. 26
      app/js/services.js
  4. 2
      app/partials/desktop/chat_modal.html
  5. 4
      app/partials/desktop/confirm_modal.html
  6. 2
      app/partials/desktop/contacts_modal.html
  7. 8
      app/partials/desktop/dialog.html
  8. 4
      app/partials/desktop/head.html
  9. 12
      app/partials/desktop/message.html
  10. 2
      app/partials/desktop/peer_select.html
  11. 2
      app/partials/desktop/settings_modal.html
  12. 2
      app/partials/desktop/user_modal.html
  13. 2
      app/partials/mobile/chat_modal.html
  14. 2
      app/partials/mobile/contacts_modal.html
  15. 6
      app/partials/mobile/dialog.html
  16. 4
      app/partials/mobile/head.html
  17. 12
      app/partials/mobile/message.html
  18. 2
      app/partials/mobile/peer_select.html
  19. 2
      app/partials/mobile/settings_modal.html

3
app/css/desktop.css

@ -639,7 +639,8 @@ a.footer_link.active:active {
color: #FFF; color: #FFF;
} }
.contacts_modal_members_list .active a.contacts_modal_contact .md_modal_list_peer_description, .contacts_modal_members_list .active a.contacts_modal_contact .md_modal_list_peer_description,
.contacts_modal_members_list .active a.contacts_modal_contact:hover .md_modal_list_peer_description { .contacts_modal_members_list .active a.contacts_modal_contact:hover .md_modal_list_peer_description,
.contacts_modal_members_list .active a.contacts_modal_contact .md_modal_list_peer_description .status_online {
color: #FFF; color: #FFF;
} }

51
app/js/directives.js

@ -2090,10 +2090,17 @@ angular.module('myApp.directives', ['myApp.filters'])
userID = $scope.$eval(attrs.myUserLink); userID = $scope.$eval(attrs.myUserLink);
update(); update();
} }
if (!attrs.noWatch) {
$scope.$on('user_update', function (e, updUserID) {
if (userID == updUserID) {
update();
}
});
}
} }
}) })
.directive('myUserStatus', function ($filter, $rootScope, AppUsersManager) { .directive('myUserStatus', function ($filter, AppUsersManager) {
var statusFilter = $filter('userStatus'), var statusFilter = $filter('userStatus'),
ind = 0, ind = 0,
@ -2125,7 +2132,7 @@ angular.module('myApp.directives', ['myApp.filters'])
userID = newUserID; userID = newUserID;
update(); update();
}); });
$rootScope.$on('user_update', function (e, updUserID) { $scope.$on('user_update', function (e, updUserID) {
if (userID == updUserID) { if (userID == updUserID) {
update(); update();
} }
@ -2137,6 +2144,46 @@ angular.module('myApp.directives', ['myApp.filters'])
} }
}) })
.directive('myChatLink', function ($timeout, AppChatsManager) {
return {
link: link
};
function link($scope, element, attrs) {
var chatID;
var update = function () {
var chat = AppChatsManager.getChat(chatID);
element.html(
(chat.rTitle || '').valueOf()
)
};
if (element[0].tagName == 'A') {
element.on('click', function () {
AppChatsManager.openChat(chatID);
});
}
if (attrs.chatWatch) {
$scope.$watch(attrs.myChatLink, function (newChatID) {
chatID = newChatID;
update();
});
} else {
chatID = $scope.$eval(attrs.myChatLink);
update();
}
$scope.$on('chat_update', function (e, updChatID) {
if (chatID == updChatID) {
update();
}
});
}
})
.directive('myChatStatus', function ($rootScope, _, MtpApiManager, AppChatsManager, AppUsersManager) { .directive('myChatStatus', function ($rootScope, _, MtpApiManager, AppChatsManager, AppUsersManager) {
var ind = 0; var ind = 0;

26
app/js/services.js

@ -243,6 +243,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
expires: tsNow(true) + serverTimeOffset + 60, expires: tsNow(true) + serverTimeOffset + 60,
wasStatus: wasStatus wasStatus: wasStatus
}; };
user.sortStatus = getUserStatusForSort(user.status);
$rootScope.$broadcast('user_update', id); $rootScope.$broadcast('user_update', id);
} }
} }
@ -364,6 +365,23 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
}); });
}; };
function setUserStatus (userID, offline) {
var user = users[userID];
if (user) {
var status = offline ? {
_: 'userStatusOffline',
was_online: tsNow(true) + serverTimeOffset
} : {
_: 'userStatusOnline',
expires: tsNow(true) + serverTimeOffset + 500
};
user.status = status;
user.sortStatus = getUserStatusForSort(user.status);
$rootScope.$broadcast('user_update', userID);
}
}
$rootScope.$on('apiUpdate', function (e, update) { $rootScope.$on('apiUpdate', function (e, update) {
// console.log('on apiUpdate', update); // console.log('on apiUpdate', update);
@ -373,7 +391,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
user = users[userID]; user = users[userID];
if (user) { if (user) {
user.status = update.status; user.status = update.status;
user.sortStatus = getUserStatusForSort(update.status); user.sortStatus = getUserStatusForSort(user.status);
$rootScope.$broadcast('user_update', userID); $rootScope.$broadcast('user_update', userID);
} }
break; break;
@ -407,6 +425,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
saveApiUser: saveApiUser, saveApiUser: saveApiUser,
getUser: getUser, getUser: getUser,
getUserInput: getUserInput, getUserInput: getUserInput,
setUserStatus: setUserStatus,
forceUserOnline: forceUserOnline, forceUserOnline: forceUserOnline,
getUserPhoto: getUserPhoto, getUserPhoto: getUserPhoto,
getUserString: getUserString, getUserString: getUserString,
@ -3751,10 +3770,10 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
}) })
.service('StatusManager', function ($timeout, $rootScope, MtpApiManager, IdleManager) { .service('StatusManager', function ($timeout, $rootScope, MtpApiManager, AppUsersManager, IdleManager) {
var toPromise; var toPromise;
var lastOnlineUpdated = 0 var lastOnlineUpdated = 0;
var started = false; var started = false;
var myID = 0; var myID = 0;
var myOtherDeviceActive = false; var myOtherDeviceActive = false;
@ -3790,6 +3809,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
return; return;
} }
lastOnlineUpdated = offline ? 0 : date; lastOnlineUpdated = offline ? 0 : date;
AppUsersManager.setUserStatus(myID, offline);
return MtpApiManager.invokeApi('account.updateStatus', { return MtpApiManager.invokeApi('account.updateStatus', {
offline: offline offline: offline
}, {noErrorBox: true}); }, {noErrorBox: true});

2
app/partials/desktop/chat_modal.html

@ -17,7 +17,7 @@
<a ng-switch-default ng-click="openPhoto(chatFull.chat_photo.id, {p: -chatFull.chat.id})" class="peer_modal_photo" my-peer-photolink="::-chatFull.chat.id" img-class="peer_modal_photo" no-open="true" watch="true" ng-class="{disabled: !chatFull.chat.photo.photo_small}" ng-disabled="!chatFull.chat.photo.photo_small"></a> <a ng-switch-default ng-click="openPhoto(chatFull.chat_photo.id, {p: -chatFull.chat.id})" class="peer_modal_photo" my-peer-photolink="::-chatFull.chat.id" img-class="peer_modal_photo" no-open="true" watch="true" ng-class="{disabled: !chatFull.chat.photo.photo_small}" ng-disabled="!chatFull.chat.photo.photo_small"></a>
</div> </div>
<div class="peer_modal_profile"> <div class="peer_modal_profile">
<div class="peer_modal_profile_name" ng-bind-html="chatFull.chat.rTitle"></div> <div class="peer_modal_profile_name" my-chat-link="chatFull.chat.id"></div>
<div class="peer_modal_profile_description" ng-if="chatFull.chat.participants_count > 0"> <div class="peer_modal_profile_description" ng-if="chatFull.chat.participants_count > 0">
<ng-pluralize count="chatFull.chat.participants_count" <ng-pluralize count="chatFull.chat.participants_count"
when="group_modal_pluralize_participants"> when="group_modal_pluralize_participants">

4
app/partials/desktop/confirm_modal.html

@ -34,8 +34,8 @@
<span ng-switch-when="EXT_SHARE_PEER" my-i18n-format="confirm_modal_share_file_peer"></span> <span ng-switch-when="EXT_SHARE_PEER" my-i18n-format="confirm_modal_share_file_peer"></span>
<my-i18n-param name="peer"> <my-i18n-param name="peer">
<strong ng-switch="peer_id > 0"> <strong ng-switch="peer_id > 0">
<span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span> <span ng-switch-when="true" my-user-link="peer_id"></span>
<span ng-switch-default ng-bind-html="peer_data.rTitle"></span> <span ng-switch-default my-chat-link="-peer_id"></span>
</strong> </strong>
</my-i18n-param> </my-i18n-param>
</my-i18n> </my-i18n>

2
app/partials/desktop/contacts_modal.html

@ -44,7 +44,7 @@
<a class="contacts_modal_contact" ng-click="contactSelect(contact.userID)"> <a class="contacts_modal_contact" ng-click="contactSelect(contact.userID)">
<div class="md_modal_list_peer_photo pull-left" my-peer-photolink="::contact.userID" img-class="md_modal_list_peer_photo"></div> <div class="md_modal_list_peer_photo pull-left" my-peer-photolink="::contact.userID" img-class="md_modal_list_peer_photo"></div>
<div class="md_modal_list_peer_name" ng-bind-html="contact.user.rFullName"></div> <div class="md_modal_list_peer_name" my-user-link="contact.userID"></div>
<div class="md_modal_list_peer_description" ng-switch="contact.found"> <div class="md_modal_list_peer_description" ng-switch="contact.found">
<span ng-switch-when="true" ng-bind="'@' + contact.user.username"></span> <span ng-switch-when="true" ng-bind="'@' + contact.user.username"></span>
<span ng-switch-default my-user-status="::contact.userID"></span> <span ng-switch-default my-user-status="::contact.userID"></span>

8
app/partials/desktop/dialog.html

@ -19,7 +19,7 @@
<div class="im_dialog_peer" ng-switch="::dialogMessage.peerID > 0"> <div class="im_dialog_peer" ng-switch="::dialogMessage.peerID > 0">
<span class="im_dialog_user" ng-switch-when="true" my-user-link="dialogMessage.peerID"></span> <span class="im_dialog_user" ng-switch-when="true" my-user-link="dialogMessage.peerID"></span>
<span class="im_dialog_chat" ng-switch-default ng-bind-html="dialogMessage.peerData.rTitle"></span> <span class="im_dialog_chat" ng-switch-default my-chat-link="-dialogMessage.peerID"></span>
</div> </div>
<div ng-if="dialogMessage.typing > 0" class="im_dialog_message"> <div ng-if="dialogMessage.typing > 0" class="im_dialog_message">
@ -39,7 +39,7 @@
<span <span
class="im_dialog_chat_from" class="im_dialog_chat_from"
my-i18n="conversation_you" my-i18n="conversation_you"
></span><span ng-if="dialogMessage.message.length || dialogMessage.media">:</span> ></span><span ng-if="dialogMessage.message.length > 0 || !!dialogMessage.media">:</span>
</span> </span>
</span> </span>
<span ng-switch-default> <span ng-switch-default>
@ -82,14 +82,14 @@
<span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id"> <span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true" my-i18n="conversation_returned_to_group"></span> <span ng-switch-when="true" my-i18n="conversation_returned_to_group"></span>
<span ng-switch-default my-i18n="conversation_invited_user"> <span ng-switch-default my-i18n="conversation_invited_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param> <my-i18n-param name="user"><span my-user-link="dialogMessage.action.user_id"></span></my-i18n-param>
</span> </span>
</span> </span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id"> <span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true" my-i18n="conversation_left_group"></span> <span ng-switch-when="true" my-i18n="conversation_left_group"></span>
<span ng-switch-default my-i18n="conversation_kicked_user"> <span ng-switch-default my-i18n="conversation_kicked_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param> <my-i18n-param name="user"><span my-user-link="dialogMessage.action.user_id"></span></my-i18n-param>
</span> </span>
</span> </span>
</span> </span>

4
app/partials/desktop/head.html

@ -74,11 +74,11 @@
<a class="tg_head_btn" ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()"> <a class="tg_head_btn" ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">
<div class="tg_head_peer_info" ng-switch-when="true"> <div class="tg_head_peer_info" ng-switch-when="true">
<span class="tg_head_peer_title" ng-bind-html="historyPeer.data.rFullName" dir="auto"></span> <span class="tg_head_peer_title" my-user-link="historyPeer.id" user-watch="true" dir="auto"></span>
<span class="tg_head_peer_status" my-user-status="historyPeer.id"></span> <span class="tg_head_peer_status" my-user-status="historyPeer.id"></span>
</div> </div>
<div class="tg_head_peer_info" ng-switch-default> <div class="tg_head_peer_info" ng-switch-default>
<span class="tg_head_peer_title" ng-bind-html="historyPeer.data.rTitle" dir="auto"></span> <span class="tg_head_peer_title" my-chat-link="-historyPeer.id" chat-watch="true" dir="auto"></span>
<span class="tg_head_peer_status" my-chat-status="-historyPeer.id"></span> <span class="tg_head_peer_status" my-chat-status="-historyPeer.id"></span>
</div> </div>
</a> </a>

12
app/partials/desktop/message.html

@ -1,11 +1,11 @@
<div class="im_message_outer_wrap" ng-click="toggleMessage(historyMessage.id, $event)"> <div class="im_message_outer_wrap" ng-click="toggleMessage(historyMessage.id, $event)">
<div class="im_message_wrap clearfix"> <div class="im_message_wrap clearfix" ng-switch="::historyMessage._ == 'messageService'">
<div class="im_service_message_wrap" ng-if="::historyMessage._ == 'messageService'"> <div class="im_service_message_wrap" ng-switch-when="true">
<div class="im_service_message"> <div class="im_service_message">
<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a> <a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0" no-watch="true"></a>
<span class="im_message_service" my-service-message></span> <span class="im_message_service" my-service-message></span>
</div> </div>
@ -19,7 +19,7 @@
</div> </div>
<div ng-if="::historyMessage._ != 'messageService'" class="im_content_message_wrap" ng-class="::[historyMessage.out ? 'im_message_out' : 'im_message_in', historyMessage._ == 'messageForwarded' ? 'im_message_fwd' : '']"> <div ng-switch-default class="im_content_message_wrap" ng-class="::[historyMessage.out ? 'im_message_out' : 'im_message_in', historyMessage._ == 'messageForwarded' ? 'im_message_fwd' : '']">
<div class="im_content_message_select_area"> <div class="im_content_message_select_area">
<i class="icon icon-select-tick"></i> <i class="icon icon-select-tick"></i>
</div> </div>
@ -39,12 +39,12 @@
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' &amp;&amp; historyMessage.media ? true : false}"> <div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' &amp;&amp; historyMessage.media ? true : false}">
<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a> <a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0" no-watch="true"></a>
<div ng-if="::historyMessage._ == 'messageForwarded' || false" class="im_message_fwd_from"> <div ng-if="::historyMessage._ == 'messageForwarded' || false" class="im_message_fwd_from">
<a class="im_message_fwd_photo pull-left" my-user-photolink="historyMessage.fwd_from_id" img-class="im_message_fwd_photo"></a> <a class="im_message_fwd_photo pull-left" my-user-photolink="historyMessage.fwd_from_id" img-class="im_message_fwd_photo"></a>
<div class="im_message_fwd_author_wrap"> <div class="im_message_fwd_author_wrap">
<a class="im_message_fwd_author" my-user-link="historyMessage.fwd_from_id" short="true"></a><span class="im_message_fwd_date" ng-bind="::historyMessage.fwd_date | dateOrTime"></span> <a class="im_message_fwd_author" my-user-link="historyMessage.fwd_from_id" short="true" no-watch="true"></a><span class="im_message_fwd_date" ng-bind="::historyMessage.fwd_date | dateOrTime"></span>
</div> </div>
</div> </div>

2
app/partials/desktop/peer_select.html

@ -34,7 +34,7 @@
<div class="im_dialog_photo pull-left" my-peer-photolink="::contact.userID" img-class="im_dialog_photo"></div> <div class="im_dialog_photo pull-left" my-peer-photolink="::contact.userID" img-class="im_dialog_photo"></div>
<div class="im_dialog_message_wrap"> <div class="im_dialog_message_wrap">
<div class="im_dialog_peer"> <div class="im_dialog_peer">
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span> <span class="im_dialog_user" my-user-link="contact.userID"></span>
</div> </div>
<div class="im_dialog_message"> <div class="im_dialog_message">
<span class="im_dialog_message_text" my-user-status="::contact.userID"></span> <span class="im_dialog_message_text" my-user-status="::contact.userID"></span>

2
app/partials/desktop/settings_modal.html

@ -17,7 +17,7 @@
<a ng-switch-default ng-click="openPhoto(profile.photo.photo_id, {p: profile.id})" class="peer_modal_photo" my-peer-photolink="::profile.id" img-class="peer_modal_photo" watch="true" no-open="true" ng-class="{disabled: !profile.photo.photo_id}" ng-disabled="!profile.photo.photo_id"></a> <a ng-switch-default ng-click="openPhoto(profile.photo.photo_id, {p: profile.id})" class="peer_modal_photo" my-peer-photolink="::profile.id" img-class="peer_modal_photo" watch="true" no-open="true" ng-class="{disabled: !profile.photo.photo_id}" ng-disabled="!profile.photo.photo_id"></a>
</div> </div>
<div class="peer_modal_profile"> <div class="peer_modal_profile">
<div class="peer_modal_profile_name" ng-bind-html="profile.rFullName"></div> <div class="peer_modal_profile_name" my-user-link="profile.id"></div>
<div class="peer_modal_profile_description" my-user-status="::profile.id"></div> <div class="peer_modal_profile_description" my-user-status="::profile.id"></div>
</div> </div>
</div> </div>

2
app/partials/desktop/user_modal.html

@ -14,7 +14,7 @@
<a ng-click="openPhoto(user.photo.photo_id, {p: user.id})" class="peer_modal_photo" ng-class="{disabled: !user.photo.photo_id}" ng-disabled="!user.photo.photo_id" my-peer-photolink="::user.id" img-class="peer_modal_photo" no-open="true"></a> <a ng-click="openPhoto(user.photo.photo_id, {p: user.id})" class="peer_modal_photo" ng-class="{disabled: !user.photo.photo_id}" ng-disabled="!user.photo.photo_id" my-peer-photolink="::user.id" img-class="peer_modal_photo" no-open="true"></a>
</div> </div>
<div class="peer_modal_profile"> <div class="peer_modal_profile">
<div class="peer_modal_profile_name" ng-bind-html="user.rFullName"></div> <div class="peer_modal_profile_name" my-user-link="user.id"></div>
<div class="peer_modal_profile_description" my-user-status="::user.id"></div> <div class="peer_modal_profile_description" my-user-status="::user.id"></div>
</div> </div>
</div> </div>

2
app/partials/mobile/chat_modal.html

@ -57,7 +57,7 @@
/> />
<div class="mobile_user_modal_info_wrap clearfix"> <div class="mobile_user_modal_info_wrap clearfix">
<h4 class="mobile_user_modal_header" ng-bind-html="chatFull.chat.rTitle"></h4> <h4 class="mobile_user_modal_header" my-chat-link="chatFull.chat.id"></h4>
<p class="mobile_user_modal_status" ng-if="chatFull.chat.participants_count > 0"> <p class="mobile_user_modal_status" ng-if="chatFull.chat.participants_count > 0">
<ng-pluralize count="chatFull.chat.participants_count" <ng-pluralize count="chatFull.chat.participants_count"
when="group_modal_pluralize_participants"> when="group_modal_pluralize_participants">

2
app/partials/mobile/contacts_modal.html

@ -82,7 +82,7 @@
<i ng-if="multiSelect" class="icon icon-contact-tick"></i> <i ng-if="multiSelect" class="icon icon-contact-tick"></i>
<div class="contacts_modal_contact_photo pull-left" my-user-photolink="contact.userID" status="true" img-class="contacts_modal_contact_photo"></div> <div class="contacts_modal_contact_photo pull-left" my-user-photolink="contact.userID" status="true" img-class="contacts_modal_contact_photo"></div>
<div class="contacts_modal_contact_name" ng-bind-html="contact.user.rFullName"></div> <div class="contacts_modal_contact_name" my-user-link="contact.userID"></div>
<div class="contacts_modal_contact_status" ng-switch="contact.found"> <div class="contacts_modal_contact_status" ng-switch="contact.found">
<span ng-switch-when="true" ng-bind="'@' + contact.user.username"></span> <span ng-switch-when="true" ng-bind="'@' + contact.user.username"></span>
<span ng-switch-default my-user-status="::contact.userID"></span> <span ng-switch-default my-user-status="::contact.userID"></span>

6
app/partials/mobile/dialog.html

@ -26,7 +26,7 @@
<div class="im_dialog_peer" ng-switch="::dialogMessage.peerID > 0"> <div class="im_dialog_peer" ng-switch="::dialogMessage.peerID > 0">
<span class="im_dialog_user" ng-switch-when="true" my-user-link="dialogMessage.peerID"></span> <span class="im_dialog_user" ng-switch-when="true" my-user-link="dialogMessage.peerID"></span>
<span class="im_dialog_chat" ng-switch-default ng-bind-html="dialogMessage.peerData.rTitle"></span> <span class="im_dialog_chat" ng-switch-default my-chat-link="-dialogMessage.peerID"></span>
</div> </div>
<div ng-if="dialogMessage.typing > 0" class="im_dialog_message"> <div ng-if="dialogMessage.typing > 0" class="im_dialog_message">
@ -89,14 +89,14 @@
<span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id"> <span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true" my-i18n="conversation_returned_to_group"></span> <span ng-switch-when="true" my-i18n="conversation_returned_to_group"></span>
<span ng-switch-default my-i18n="conversation_invited_user"> <span ng-switch-default my-i18n="conversation_invited_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param> <my-i18n-param name="user"><span my-user-link="dialogMessage.action.user_id"></span></my-i18n-param>
</span> </span>
</span> </span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id"> <span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">
<span ng-switch-when="true" my-i18n="conversation_left_group"></span> <span ng-switch-when="true" my-i18n="conversation_left_group"></span>
<span ng-switch-default my-i18n="conversation_kicked_user"> <span ng-switch-default my-i18n="conversation_kicked_user">
<my-i18n-param name="user" ng-bind-html="dialogMessage.action.user.rFullName"></my-i18n-param> <my-i18n-param name="user"><span my-user-link="dialogMessage.action.user_id"></span></my-i18n-param>
</span> </span>
</span> </span>
</span> </span>

4
app/partials/mobile/head.html

@ -72,7 +72,7 @@
<a href="#/im" class="navbar-quick-profile-back"> <a href="#/im" class="navbar-quick-profile-back">
<i class="icon icon-back"></i> <i class="icon icon-back"></i>
<div class="navbar-quick-back-title"> <div class="navbar-quick-back-title">
<h4 ng-bind-html="historyPeer.data.rFullName"></h4> <h4 my-user-link="historyPeer.id" user-watch="true"></h4>
<small ng-switch="historyState.typing.length"> <small ng-switch="historyState.typing.length">
<span ng-switch-when="1" class="status_online"> <span ng-switch-when="1" class="status_online">
<my-i18n msgid="head_typing"></my-i18n><span my-loading-dots></span> <my-i18n msgid="head_typing"></my-i18n><span my-loading-dots></span>
@ -86,7 +86,7 @@
<a href="#/im" class="navbar-quick-group-back"> <a href="#/im" class="navbar-quick-group-back">
<i class="icon icon-back"></i> <i class="icon icon-back"></i>
<div class="navbar-quick-back-title"> <div class="navbar-quick-back-title">
<h4 ng-bind-html="historyPeer.data.rTitle"></h4> <h4 my-chat-link="-historyPeer.id" chat-watch="true"></h4>
<small ng-switch="historyState.typing.length"> <small ng-switch="historyState.typing.length">
<span ng-switch-when="0" class="tg_head_peer_status" my-chat-status="-historyPeer.id"></span> <span ng-switch-when="0" class="tg_head_peer_status" my-chat-status="-historyPeer.id"></span>
<my-i18n> <my-i18n>

12
app/partials/mobile/message.html

@ -1,11 +1,11 @@
<div class="im_message_outer_wrap" ng-click="toggleMessage(historyMessage.id, $event)"> <div class="im_message_outer_wrap" ng-click="toggleMessage(historyMessage.id, $event)">
<div class="im_message_wrap clearfix"> <div class="im_message_wrap clearfix" ng-switch="::historyMessage._ == 'messageService'">
<div class="im_service_message_wrap" ng-if="::historyMessage._ == 'messageService'"> <div class="im_service_message_wrap" ng-switch-when="true">
<div class="im_service_message"> <div class="im_service_message">
<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a> <a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0" no-watch="true"></a>
<span class="im_message_service" my-service-message></span> <span class="im_message_service" my-service-message></span>
</div> </div>
@ -19,7 +19,7 @@
</div> </div>
<div ng-if="::historyMessage._ != 'messageService'" class="im_content_message_wrap" ng-class="::[historyMessage.out ? 'im_message_out' : 'im_message_in']"> <div ng-switch-default class="im_content_message_wrap" ng-class="::[historyMessage.out ? 'im_message_out' : 'im_message_in']">
<i ng-if="::historyMessage.unread || historyMessage.pending || false" class="icon-message-status" ng-class="{'icon-message-status-unread': historyMessage.unread, 'icon-message-status-pending': historyMessage.pending}" ng-show="!historyMessage.error"></i> <i ng-if="::historyMessage.unread || historyMessage.pending || false" class="icon-message-status" ng-class="{'icon-message-status-unread': historyMessage.unread, 'icon-message-status-pending': historyMessage.pending}" ng-show="!historyMessage.error"></i>
<a class="im_message_from_photo pull-left" my-user-photolink="historyMessage.from_id" img-class="im_message_from_photo"></a> <a class="im_message_from_photo pull-left" my-user-photolink="historyMessage.from_id" img-class="im_message_from_photo"></a>
@ -31,10 +31,10 @@
<div class="im_message_body" ng-class="::{im_message_body_media: !!historyMessage.media}"> <div class="im_message_body" ng-class="::{im_message_body_media: !!historyMessage.media}">
<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a> <a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0" no-watch="true"></a>
<div ng-if="::historyMessage._ == 'messageForwarded' &amp;&amp; !historyMessage.media" class="im_message_fwd_header" my-i18n="message_forwarded_message_mobile"> <div ng-if="::historyMessage._ == 'messageForwarded' &amp;&amp; !historyMessage.media" class="im_message_fwd_header" my-i18n="message_forwarded_message_mobile">
<a my-i18n-param="from" class="im_message_fwd_author" my-user-link="historyMessage.fwd_from_id"></a> <a my-i18n-param="from" class="im_message_fwd_author" my-user-link="historyMessage.fwd_from_id" no-watch="true"></a>
<span my-i18n-param="date" class="im_message_fwd_date" ng-bind="::historyMessage.fwd_date | dateOrTime"></span> <span my-i18n-param="date" class="im_message_fwd_date" ng-bind="::historyMessage.fwd_date | dateOrTime"></span>
</div> </div>

2
app/partials/mobile/peer_select.html

@ -56,7 +56,7 @@
</div> </div>
<div class="im_dialog_message_wrap"> <div class="im_dialog_message_wrap">
<div class="im_dialog_peer"> <div class="im_dialog_peer">
<span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span> <span class="im_dialog_user" my-user-link="contact.userID"></span>
</div> </div>
<div class="im_dialog_message"> <div class="im_dialog_message">
<span class="im_dialog_message_text" my-user-status="::contact.userID"></span> <span class="im_dialog_message_text" my-user-status="::contact.userID"></span>

2
app/partials/mobile/settings_modal.html

@ -59,7 +59,7 @@
</a> </a>
<div class="mobile_user_modal_info_wrap clearfix"> <div class="mobile_user_modal_info_wrap clearfix">
<h4 class="mobile_user_modal_header" ng-bind-html="profile.rFullName"></h4> <h4 class="mobile_user_modal_header" my-user-link="profile.id"></h4>
<p class="mobile_user_modal_status" my-user-status="::profile.id"></p> <p class="mobile_user_modal_status" my-user-status="::profile.id"></p>
</div> </div>

Loading…
Cancel
Save