Mobile app bugfixes
Enable webpage attachment on mobile Closes #892 Closes #880
This commit is contained in:
parent
36ef1084db
commit
0b15fa8f4b
@ -1563,14 +1563,14 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
$(submitBtn).on('mousedown touchstart', onMessageSubmit);
|
$(submitBtn).on('mousedown touchstart', onMessageSubmit);
|
||||||
|
|
||||||
function onMessageSubmit (e) {
|
function onMessageSubmit (e) {
|
||||||
$scope.$apply(function () {
|
$timeout(function () {
|
||||||
updateValue();
|
updateValue();
|
||||||
$scope.draftMessage.send();
|
$scope.draftMessage.send();
|
||||||
composer.resetTyping();
|
composer.resetTyping();
|
||||||
if (composerEmojiPanel) {
|
if (composerEmojiPanel) {
|
||||||
composerEmojiPanel.update();
|
composerEmojiPanel.update();
|
||||||
}
|
}
|
||||||
});
|
}, Config.Navigator.touch ? 100 : 0);
|
||||||
return cancelEvent(e);
|
return cancelEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2065,8 +2065,7 @@ angular.module('myApp.services')
|
|||||||
|
|
||||||
case 'messageMediaWebPage':
|
case 'messageMediaWebPage':
|
||||||
if (!message.media.webpage ||
|
if (!message.media.webpage ||
|
||||||
message.media.webpage._ == 'webPageEmpty' ||
|
message.media.webpage._ == 'webPageEmpty') {
|
||||||
Config.Mobile) {
|
|
||||||
delete message.media;
|
delete message.media;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2085,7 +2084,7 @@ angular.module('myApp.services')
|
|||||||
case 'messageActionChatEditTitle':
|
case 'messageActionChatEditTitle':
|
||||||
case 'messageActionChannelCreate':
|
case 'messageActionChannelCreate':
|
||||||
case 'messageActionChannelEditTitle':
|
case 'messageActionChannelEditTitle':
|
||||||
message.action.rTitle = RichTextProcessor.wrapRichText(message.action.title, {noLinks: true, noLinebreaks: true}) || _('chat_title_deleted');
|
message.action.rTitle = RichTextProcessor.wrapRichText(message.action.title, {noLinebreaks: true}) || _('chat_title_deleted');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'messageActionBotIntro':
|
case 'messageActionBotIntro':
|
||||||
|
@ -1371,6 +1371,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
height: height
|
height: height
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (options.website && Config.Mobile) {
|
||||||
|
width = 50;
|
||||||
|
height = 50;
|
||||||
|
}
|
||||||
|
|
||||||
// console.log('chosen photo size', photoID, thumbPhotoSize);
|
// console.log('chosen photo size', photoID, thumbPhotoSize);
|
||||||
if (thumbPhotoSize && thumbPhotoSize._ != 'photoSizeEmpty') {
|
if (thumbPhotoSize && thumbPhotoSize._ != 'photoSizeEmpty') {
|
||||||
var dim = calcImageInBox(thumbPhotoSize.w, thumbPhotoSize.h, width, height);
|
var dim = calcImageInBox(thumbPhotoSize.w, thumbPhotoSize.h, width, height);
|
||||||
|
@ -597,6 +597,19 @@ html {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.im_message_webpage,
|
||||||
|
.im_message_webpage_site,
|
||||||
|
.im_message_webpage_title,
|
||||||
|
.im_message_webpage_description {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
.im_message_webpage_wrap {
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.im_message {
|
.im_message {
|
||||||
&_document {
|
&_document {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -695,6 +708,11 @@ html {
|
|||||||
&_document_thumbed &_download_progress_wrap {
|
&_document_thumbed &_download_progress_wrap {
|
||||||
width: 130px;
|
width: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&_text {
|
||||||
|
line-height: 140%;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.img_gif_label,
|
.img_gif_label,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<a ng-click="deleteChannel()" my-i18n="channel_modal_delete_channel"></a>
|
<a ng-click="deleteChannel()" my-i18n="channel_modal_delete_channel"></a>
|
||||||
</li>
|
</li>
|
||||||
<li ng-if="!chatFull.chat.pFlags.creator && !chatFull.chat.pFlags.left && !chatFull.chat.pFlags.kicked">
|
<li ng-if="!chatFull.chat.pFlags.creator && !chatFull.chat.pFlags.left && !chatFull.chat.pFlags.kicked">
|
||||||
<a ng-click="leaveChannel()" my-i18n="channel_modal_leave_channel"></a>
|
<a ng-click="leaveChannel()" my-i18n="group_modal_menu_leave"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<span class="im_message_date" ng-bind="::historyMessage.date | time"></span>
|
<span class="im_message_date" ng-bind="::historyMessage.date | time"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' && historyMessage.media && !historyMessage.media.rCaption ? true : false}">
|
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' && historyMessage.media && historyMessage.media._ != 'messageMediaWebPage' && !historyMessage.media.rCaption ? true : false}">
|
||||||
|
|
||||||
<a class="im_message_author" my-peer-link="historyMessage.fromID" short="historyMessage.toID > 0" color="historyMessage.toID < 0" no-watch="true"></a>
|
<a class="im_message_author" my-peer-link="historyMessage.fromID" short="historyMessage.toID > 0" color="historyMessage.toID < 0" no-watch="true"></a>
|
||||||
|
|
||||||
@ -51,6 +51,8 @@
|
|||||||
<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>
|
||||||
|
|
||||||
|
<div class="im_message_text" ng-if="::historyMessage.message.length || false" my-message-text="::historyMessage" dir="auto"></div>
|
||||||
|
|
||||||
<div ng-if="::historyMessage.media || historyMessage.mid < 0 ? true : false" class="im_message_media" ng-switch="historyMessage.media._">
|
<div ng-if="::historyMessage.media || historyMessage.mid < 0 ? true : false" class="im_message_media" ng-switch="historyMessage.media._">
|
||||||
|
|
||||||
<div ng-switch-when="messageMediaPhoto" my-message-photo="historyMessage.media" message-id="historyMessage.mid"></div>
|
<div ng-switch-when="messageMediaPhoto" my-message-photo="historyMessage.media" message-id="historyMessage.mid"></div>
|
||||||
@ -69,8 +71,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="im_message_text" ng-if="::historyMessage.message.length || false" my-message-text="::historyMessage" dir="auto"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<div class="im_message_document im_message_upload_file" ng-class="::'im_message_upload_' + historyMessage.media.type">
|
<div class="im_message_document im_message_upload_file" ng-class="::'im_message_upload_' + historyMessage.media.type">
|
||||||
<i class="icon" ng-class="::'icon-' + historyMessage.media.type"></i>
|
<div class="im_message_file_button im_message_file_button_upload">
|
||||||
|
<i class="im_message_file_button_icon"></i>
|
||||||
|
</div>
|
||||||
<div class="im_message_document_info">
|
<div class="im_message_document_info">
|
||||||
<div class="im_message_document_name_wrap">
|
<div class="im_message_document_name_wrap">
|
||||||
<span class="im_message_document_name" ng-bind="::historyMessage.media.file_name"></span>
|
<span class="im_message_document_name" ng-bind="::historyMessage.media.file_name"></span>
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-switch-default class="im_message_webpage_article">
|
<div ng-switch-default class="im_message_webpage_article">
|
||||||
|
<div class="im_message_webpage_site" ng-bind="webpage.site_name"></div>
|
||||||
<a ng-if="webpage.photo" href="{{webpage.url}}" target="_blank" class="im_message_webpage_article_photo pull-right">
|
<a ng-if="webpage.photo" href="{{webpage.url}}" target="_blank" class="im_message_webpage_article_photo pull-right">
|
||||||
<img
|
<img
|
||||||
class="im_message_article_thumb"
|
class="im_message_article_thumb"
|
||||||
@ -38,7 +39,6 @@
|
|||||||
thumb="webpage.photo.thumb"
|
thumb="webpage.photo.thumb"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<div class="im_message_webpage_site" ng-bind="webpage.site_name"></div>
|
|
||||||
<div class="im_message_webpage_title">
|
<div class="im_message_webpage_title">
|
||||||
<a ng-click="openEmbed($event)" href="{{webpage.url}}" target="_blank" ng-bind-html="webpage.rTitle"></a>
|
<a ng-click="openEmbed($event)" href="{{webpage.url}}" target="_blank" ng-bind-html="webpage.rTitle"></a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user