diff --git a/app/css/mobile.css b/app/css/mobile.css index 6498017d..26cf46bc 100644 --- a/app/css/mobile.css +++ b/app/css/mobile.css @@ -130,7 +130,7 @@ html { vertical-align: text-top; background: url(../img/icons/IconsetW.png) -15px -835px no-repeat; - background-size: 42px 891px; + background-size: 42px 971px; opacity: 0.8; } .is_1x .icon-back { @@ -954,7 +954,7 @@ a.mobile_modal_action .tg_checkbox_label { .im_submit:active, .im_submit:hover { background: url(../img/icons/IconsetW.png) 2px -860px no-repeat; - background-size: 42px 891px; + background-size: 42px 971px; color: transparent; box-shadow: none; } @@ -978,7 +978,7 @@ a.mobile_modal_action .tg_checkbox_label { height: 23px; vertical-align: text-top; background: url(../img/icons/IconsetW.png) -12px -68px no-repeat; - background-size: 42px 891px; + background-size: 42px 971px; opacity: 0.8; } .is_1x .icon-paperclip { @@ -1015,7 +1015,7 @@ a.mobile_modal_action .tg_checkbox_label { opacity: 1; margin: 0; background: url(../img/icons/IconsetW.png) -10px -771px no-repeat; - background-size: 42px 891px; + background-size: 42px 971px; } .is_1x .icon-emoji { background-image: url(../img/icons/IconsetW_1x.png); diff --git a/app/js/directives.js b/app/js/directives.js index 637bf2f8..a76e83bf 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -33,11 +33,11 @@ angular.module('myApp.directives', ['myApp.filters']) }; }) - .directive('myMessage', function($filter) { + .directive('myMessage', function($filter, _) { var dateFilter = $filter('myDate'), dateSplitHtml = '
', - unreadSplitHtml = '
Unread messages
', + unreadSplitHtml = '
' + _('unread_messages_split') + '
', selectedClass = 'im_message_selected', focusClass = 'im_message_focus', unreadClass = 'im_message_unread', diff --git a/app/js/filters.js b/app/js/filters.js index 6213317e..a60f2342 100644 --- a/app/js/filters.js +++ b/app/js/filters.js @@ -63,7 +63,7 @@ angular.module('myApp.filters', ['myApp.i18n']) var ticks = timestamp * 1000, diff = Math.abs(tsNow() - ticks), - format = 'HH:mm'; + format = 'shortTime'; if (diff > 518400000) { // 6 days format = 'shortDate'; @@ -78,7 +78,7 @@ angular.module('myApp.filters', ['myApp.i18n']) .filter('time', ['$filter', function($filter) { var cachedDates = {}, dateFilter = $filter('date'), - format = Config.Mobile ? 'HH:mm' : 'HH:mm:ss'; + format = Config.Mobile ? 'shortTime' : 'mediumTime'; return function (timestamp) { if (cachedDates[timestamp]) { diff --git a/app/js/locales/en-us.json b/app/js/locales/en-us.json index e8cd1497..45b9ebb3 100644 --- a/app/js/locales/en-us.json +++ b/app/js/locales/en-us.json @@ -74,6 +74,8 @@ "error_browser_no_local_file_system_video_md": "Your browser doesn't support {moz-link: https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem | LocalFileSystem} feature which is needed to play this video.\nPlease, install {chrome-link: http://google.com/chrome | Google Chrome} or use {telegram-link: https://telegram.org/ | mobile app} instead.", "error_video_download_failed": "Video download failed", + "unread_messages_split": "Unread messages", + "user_name_deleted": "DELETED", "user_first_name_deleted": "DELETED", "user_status_offline": "offline", @@ -102,7 +104,7 @@ "group_edit_submit_active": "Saving...", "confirm_modal_logout": "Are you sure you want to log out?", - "confirm_modal_update_reload": "A new version of Webogram has been downloaded. Launch it?", + "confirm_modal_update_reload": "A new version of Telegram Web has been downloaded. Launch it?", "confirm_modal_history_flush": "Are you sure? This can not be undone!", "confirm_modal_terminate_sessions": "Are you sure you want to log out all devices except for the current one?", "confirm_modal_mixed_content_fail_http_redirect_md": "Your browser {moz-link: does not support} mixed content which is neccessary for MTProto support on https. {issue-link: Learn more}\n\n Would you like to use http-version instead?", diff --git a/app/js/services.js b/app/js/services.js index 28a227af..887848e1 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -1728,7 +1728,7 @@ angular.module('myApp.services', ['myApp.i18n']) if (toID < 0) { return toID; - } else if (message.out) { + } else if (message.out || message.flags & 2) { return toID; } return message.from_id; @@ -2032,10 +2032,6 @@ angular.module('myApp.services', ['myApp.i18n']) peerID = getMessagePeer(message), historyStorage = historiesStorage[peerID]; - if (!message.out) { - AppUsersManager.forceUserOnline(message.from_id); - } - if (historyStorage !== undefined) { var topMsgID = historiesStorage[peerID].history[0]; if (historiesStorage[peerID].history.indexOf(message.id) != -1) { @@ -2055,6 +2051,10 @@ angular.module('myApp.services', ['myApp.i18n']) saveMessages([message]); + if (!message.out) { + AppUsersManager.forceUserOnline(message.from_id); + } + if (historyStorage.count !== null) { historyStorage.count++; } @@ -2713,9 +2713,9 @@ angular.module('myApp.services', ['myApp.i18n']) doc.thumb = thumb; doc.canDownload = !(window.chrome && chrome.fileSystem && chrome.fileSystem.chooseEntry); - doc.withPreview = doc.canDownload && doc.thumb && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0; + doc.withPreview = doc.canDownload && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0; - if (doc.withPreview && isGif) { + if (isGif && doc.withPreview && doc.thumb) { doc.isSpecial = 'gif'; } else if (isAudio) { diff --git a/app/partials/desktop/chat_edit_modal.html b/app/partials/desktop/chat_edit_modal.html index 367ed855..103a36bf 100644 --- a/app/partials/desktop/chat_edit_modal.html +++ b/app/partials/desktop/chat_edit_modal.html @@ -17,7 +17,7 @@ diff --git a/app/partials/desktop/im.html b/app/partials/desktop/im.html index aac2b8fa..6e7aeae6 100644 --- a/app/partials/desktop/im.html +++ b/app/partials/desktop/im.html @@ -148,7 +148,9 @@
- + + +
@@ -187,7 +189,7 @@ - Cancel +
@@ -257,7 +259,6 @@
-
\ No newline at end of file diff --git a/app/partials/mobile/chat_create_modal.html b/app/partials/mobile/chat_create_modal.html index 46cd4367..5f9daf49 100644 --- a/app/partials/mobile/chat_create_modal.html +++ b/app/partials/mobile/chat_create_modal.html @@ -8,15 +8,13 @@
\ No newline at end of file + diff --git a/app/partials/mobile/welcome.html b/app/partials/mobile/welcome.html index 6149e88b..3b4cd6f9 100644 --- a/app/partials/mobile/welcome.html +++ b/app/partials/mobile/welcome.html @@ -5,14 +5,14 @@
-

Telegram Web

+

-

This is an unofficial web-client for the Telegram Messenger.

-

It's still an alpha-version and may not be 200% reliable

+

+

- Start Messaging +
@@ -24,24 +24,24 @@