parent
7480ca1553
commit
8f6d64131a
@ -180,6 +180,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
|
||||
var messageMediaCompiled = $compile('<div class="im_message_media" my-message-media="media" message-id="messageId"></div>');
|
||||
var messageKeyboardCompiled = $compile('<div class="im_message_keyboard" my-inline-reply-markup="markup"></div>');
|
||||
var messageSignCompiled = $compile('<div class="im_message_sign"><span class="im_message_sign_link" my-peer-link="signID"></span></div>');
|
||||
|
||||
return {
|
||||
link: link,
|
||||
@ -231,6 +232,19 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
});
|
||||
}
|
||||
|
||||
function updateMessageSignature($scope, element, message) {
|
||||
if (!message.signID) {
|
||||
$('.im_message_sign', element).hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var scope = $scope.$new(true);
|
||||
scope.signID = message.signID;
|
||||
messageSignCompiled(scope, function (clonedElement) {
|
||||
$('.im_message_sign', element).replaceWith(clonedElement);
|
||||
});
|
||||
}
|
||||
|
||||
function updateMessageKeyboard($scope, element, message) {
|
||||
if (!message.reply_markup ||
|
||||
message.reply_markup._ != 'replyInlineMarkup') {
|
||||
@ -260,6 +274,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
function updateMessageBody($scope, element, message) {
|
||||
updateMessageText($scope, element, message);
|
||||
updateMessageMedia($scope, element, message);
|
||||
updateMessageSignature($scope, element, message);
|
||||
updateMessageKeyboard($scope, element, message);
|
||||
}
|
||||
|
||||
|
@ -1120,6 +1120,7 @@ angular.module('myApp.services')
|
||||
|
||||
apiMessage.toID = toPeerID;
|
||||
apiMessage.fromID = apiMessage.pFlags.post ? toPeerID : apiMessage.from_id;
|
||||
apiMessage.signID = apiMessage.pFlags.post && apiMessage.from_id || fwdHeader && fwdHeader.from_id;
|
||||
|
||||
if (apiMessage.via_bot_id > 0) {
|
||||
apiMessage.viaBotID = apiMessage.via_bot_id;
|
||||
|
@ -1654,6 +1654,14 @@ div.im_message_video_thumb {
|
||||
font-weight: bold;
|
||||
// margin-right: 4px;
|
||||
}
|
||||
.im_message_sign {
|
||||
padding-top: 1px;
|
||||
}
|
||||
.im_message_sign_link {
|
||||
pointer-events: none;
|
||||
color: #adadad;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
.icon-circle {
|
||||
display: none;
|
||||
// display: inline-block;
|
||||
@ -3888,7 +3896,8 @@ ul.chat_modal_migrate_list {
|
||||
.audio_player_duration,
|
||||
.audio_player_size,
|
||||
.im_message_fwd_date,
|
||||
.im_message_views_cnt {
|
||||
.im_message_views_cnt,
|
||||
.im_message_sign_link {
|
||||
color: #899daf;
|
||||
}
|
||||
|
||||
|
@ -902,12 +902,14 @@ a.footer_link.active:active {
|
||||
.im_message_selected .im_message_audio_size,
|
||||
.im_message_selected .im_message_fwd_date,
|
||||
.im_message_selected .im_message_views_cnt,
|
||||
.im_message_selected .im_message_sign_link,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_date,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_document_size,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_audio_duration,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_audio_size,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_fwd_date,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_views_cnt {
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_views_cnt,
|
||||
.im_history_select_active .im_message_outer_wrap:hover .im_message_sign_link {
|
||||
color: #899daf;
|
||||
}
|
||||
|
||||
|
@ -916,6 +916,9 @@ a.im_message_author_via {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.im_message_sign_link {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.im_grouped_short a.im_message_from_photo,
|
||||
|
@ -65,6 +65,7 @@
|
||||
<div my-message-body="historyMessage">
|
||||
<div class="im_message_text" dir="auto"></div>
|
||||
<div class="im_message_media"></div>
|
||||
<div class="im_message_sign"></div>
|
||||
<div class="im_message_keyboard"></div>
|
||||
</div>
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
|
||||
<div class="im_message_text" dir="auto"></div>
|
||||
<div class="im_message_media"></div>
|
||||
<div class="im_message_sign"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user