From 0125cb9a1fb5b68555c07c4a4cde20181ecff271 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 10 Feb 2016 21:19:09 +0000 Subject: [PATCH] Bump to 0.5.3 --- app/js/app.js | 2 +- app/js/background.js | 2 +- app/js/controllers.js | 2 +- app/js/directives.js | 2 +- app/js/directives_mobile.js | 2 +- app/js/filters.js | 2 +- app/js/init.js | 1 + app/js/lib/bin_utils.js | 2 +- app/js/lib/config.js | 5 +++-- app/js/lib/crypto_worker.js | 2 +- app/js/lib/mtproto.js | 2 +- app/js/lib/mtproto_wrapper.js | 9 ++++++--- app/js/lib/ng_utils.js | 16 +++++++++++++++- app/js/lib/tl_utils.js | 2 +- app/js/lib/utils.js | 2 +- app/js/message_composer.js | 2 +- app/js/messages_manager.js | 2 +- app/js/services.js | 2 +- app/less/app.less | 19 ++++++++++++++----- app/manifest.json | 2 +- app/manifest.webapp | 2 +- app/partials/desktop/changelog_modal.html | 14 ++++++++++++++ app/partials/mobile/changelog_modal.html | 18 +++++++++++++++++- package.json | 2 +- 24 files changed, 87 insertions(+), 29 deletions(-) diff --git a/app/js/app.js b/app/js/app.js index 6f90ca53..338d3a70 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/background.js b/app/js/background.js index 0a2414b5..4ce138d2 100644 --- a/app/js/background.js +++ b/app/js/background.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/controllers.js b/app/js/controllers.js index 2a58d9c2..d3af43a6 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/directives.js b/app/js/directives.js index c9f7b9e7..8bffa52a 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/directives_mobile.js b/app/js/directives_mobile.js index 5de69b10..a737a4e4 100644 --- a/app/js/directives_mobile.js +++ b/app/js/directives_mobile.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/filters.js b/app/js/filters.js index b840ce32..fce8897c 100644 --- a/app/js/filters.js +++ b/app/js/filters.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/init.js b/app/js/init.js index 4cc3b4be..bcd9c771 100644 --- a/app/js/init.js +++ b/app/js/init.js @@ -65,6 +65,7 @@ (function initApplication () { var classes = [ Config.Navigator.osX ? 'osx' : 'non_osx', + Config.Navigator.msie ? 'msie' : 'non_msie', Config.Navigator.retina ? 'is_2x' : 'is_1x' ]; if (Config.Modes.ios_standalone) { diff --git a/app/js/lib/bin_utils.js b/app/js/lib/bin_utils.js index 154c144a..55fa06ed 100644 --- a/app/js/lib/bin_utils.js +++ b/app/js/lib/bin_utils.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/config.js b/app/js/lib/config.js index 8b6b5d79..deacd3dc 100644 --- a/app/js/lib/config.js +++ b/app/js/lib/config.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE @@ -21,7 +21,7 @@ Config = window.Config || {}; Config.App = { id: 2496, hash: '8da85b0d5bfe62527e5b244c209159c3', - version: '0.5.2', + version: '0.5.3', domains: ['web.telegram.org', 'zhukov.github.io'] }; @@ -44,6 +44,7 @@ Config.Modes = { Config.Navigator = { osX: (navigator.platform || '').toLowerCase().indexOf('mac') != -1 || (navigator.userAgent || '').toLowerCase().indexOf('mac') != -1, + msie: (navigator.userAgent || '').search(/MSIE | Trident\/|Edge\//) != -1, retina: window.devicePixelRatio > 1, ffos: navigator.userAgent.search(/mobi.+Gecko/i) != -1, ffos2p: navigator.userAgent.search(/mobi.+Gecko\/[34567]/i) != -1, diff --git a/app/js/lib/crypto_worker.js b/app/js/lib/crypto_worker.js index 7d614183..ee25ceee 100644 --- a/app/js/lib/crypto_worker.js +++ b/app/js/lib/crypto_worker.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/mtproto.js b/app/js/lib/mtproto.js index 9e68a995..c127115a 100644 --- a/app/js/lib/mtproto.js +++ b/app/js/lib/mtproto.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/mtproto_wrapper.js b/app/js/lib/mtproto_wrapper.js index 55369e0c..9dba4653 100644 --- a/app/js/lib/mtproto_wrapper.js +++ b/app/js/lib/mtproto_wrapper.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE @@ -487,14 +487,14 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) } } - // console.log(dT(), 'Dload file', dcID, location, size); + console.log(dT(), 'Dload file', dcID, location, size); var fileName = getFileName(location), toFileEntry = options.toFileEntry || null, cachedPromise = cachedSavePromises[fileName] || cachedDownloadPromises[fileName]; var fileStorage = getFileStorage(); - // console.log(dT(), 'fs', fileStorage, fileName, cachedPromise); + console.log(dT(), 'fs', fileStorage.name, fileName, cachedPromise); if (cachedPromise) { if (toFileEntry) { @@ -520,7 +520,9 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) }; + console.log(dT(), 'fs get file', fileName, size); fileStorage.getFile(fileName, size).then(function (blob) { + console.log(dT(), 'fs got file', fileName, size); if (toFileEntry) { FileManager.copy(blob, toFileEntry).then(function () { deferred.resolve(); @@ -529,6 +531,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) deferred.resolve(cachedDownloads[fileName] = blob); } }, function () { + console.log(dT(), 'fs fail file', fileName, size); var fileWriterPromise = toFileEntry ? FileManager.getFileWriter(toFileEntry) : fileStorage.getFileWriter(fileName, mimeType); var processDownloaded = function (bytes) { diff --git a/app/js/lib/ng_utils.js b/app/js/lib/ng_utils.js index c82f932b..ffe083e8 100644 --- a/app/js/lib/ng_utils.js +++ b/app/js/lib/ng_utils.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE @@ -375,11 +375,20 @@ angular.module('izhukov.utils', []) throw new Exception(); } } catch (error) { + console.error('error opening db', error.message); storageIsAvailable = false; return $q.reject(error); } + var finished = false; + setTimeout(function () { + if (!finished) { + request.onerror({type: 'IDB_CREATE_TIMEOUT'}); + } + }, 3000); + request.onsuccess = function (event) { + finished = true; db = request.result; db.onerror = function (error) { @@ -392,12 +401,14 @@ angular.module('izhukov.utils', []) }; request.onerror = function (event) { + finished = true; storageIsAvailable = false; console.error('Error creating/accessing IndexedDB database', event); deferred.reject(event); } request.onupgradeneeded = function (event) { + finished = true; console.warn('performing idb upgrade from', event.oldVersion, 'to', event.newVersion); var db = event.target.result; if (event.oldVersion == 1) { @@ -550,6 +561,7 @@ angular.module('izhukov.utils', []) openDatabase(); return { + name: 'IndexedDB', isAvailable: isAvailable, saveFile: saveFile, getFile: getFile, @@ -650,6 +662,7 @@ angular.module('izhukov.utils', []) requestFS(); return { + name: 'TmpFS', isAvailable: isAvailable, saveFile: saveFile, getFile: getFile, @@ -684,6 +697,7 @@ angular.module('izhukov.utils', []) } return { + name: 'Memory', isAvailable: isAvailable, saveFile: saveFile, getFile: getFile, diff --git a/app/js/lib/tl_utils.js b/app/js/lib/tl_utils.js index 5e998acf..94baa52c 100644 --- a/app/js/lib/tl_utils.js +++ b/app/js/lib/tl_utils.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/lib/utils.js b/app/js/lib/utils.js index c7430c6a..707d39d9 100644 --- a/app/js/lib/utils.js +++ b/app/js/lib/utils.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/message_composer.js b/app/js/message_composer.js index 723df16a..9faadbcd 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/messages_manager.js b/app/js/messages_manager.js index dc9e86aa..d478c758 100644 --- a/app/js/messages_manager.js +++ b/app/js/messages_manager.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/js/services.js b/app/js/services.js index a8f0d616..7a954591 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -1,5 +1,5 @@ /*! - * Webogram v0.5.2 - messaging web application for MTProto + * Webogram v0.5.3 - messaging web application for MTProto * https://github.com/zhukov/webogram * Copyright (C) 2014 Igor Zhukov * https://github.com/zhukov/webogram/blob/master/LICENSE diff --git a/app/less/app.less b/app/less/app.less index c9997f96..0f3687fd 100644 --- a/app/less/app.less +++ b/app/less/app.less @@ -2805,21 +2805,30 @@ img.img_fullsize { .composer_emoji_tooltip_tabs_wrap { height: 275px; + width: 284px; position: relative; overflow: hidden; } .composer_emoji_tooltip_tabs_contents { position: absolute; - // width: 200%; width: 568px; - .transform(translate3d(0,0,0)); - transition: transform ease-in-out 0.2s; - - .composer_emoji_tooltip_tabs_stickers_active & { + .non_msie & { + transition: transform ease-in-out 0.2s; + .transform(translate3d(0,0,0)); + } + .non_msie .composer_emoji_tooltip_tabs_stickers_active & { .transform(translate3d(-284px,0,0)); + } + .msie & { + margin-left: 0; + transition: margin-left ease-in-out 0.2s; } + .msie .composer_emoji_tooltip_tabs_stickers_active & { + margin-left: -284px; + } + } .composer_emoji_tooltip_tab_emoji_content, .composer_emoji_tooltip_tab_stickers_content { diff --git a/app/manifest.json b/app/manifest.json index e965c1d4..143b17dd 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "Telegram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", - "version": "0.5.2", + "version": "0.5.3", "short_name": "Telegram", "manifest_version": 2, "app": { diff --git a/app/manifest.webapp b/app/manifest.webapp index 697a9f82..876d3d8e 100644 --- a/app/manifest.webapp +++ b/app/manifest.webapp @@ -1,7 +1,7 @@ { "name": "Telegram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", - "version": "0.5.2", + "version": "0.5.3", "type": "privileged", "launch_path": "/index.html", "developer": { diff --git a/app/partials/desktop/changelog_modal.html b/app/partials/desktop/changelog_modal.html index 87d4e08c..36d0d1e0 100644 --- a/app/partials/desktop/changelog_modal.html +++ b/app/partials/desktop/changelog_modal.html @@ -31,6 +31,20 @@
+
+
0.5.3
+
+
    +
  • Inline bots: A new way to add bot content to any chat. Type a bot's username and your query in the text field to get instant results and send them to your chat partner. Try typing @gif dog in your next chat. Sample bots: @gif, @wiki, @bing, @vid, @bold.
  • +
  • Check out the Telegram Blog for more info.
  • +
  • Improved GIFs: 20x faster sending and downloading, nice animated progress
  • +
  • Click on message date to reply (or to forward from channels).
  • +
  • Preview images before sending when pasting from clipboard.
  • +
  • Improved formatting for copy-pasted history fragments (date, time and sender names inserted automatically).
  • +
+
+
+
0.5.2
diff --git a/app/partials/mobile/changelog_modal.html b/app/partials/mobile/changelog_modal.html index d461ef41..0b441ec6 100644 --- a/app/partials/mobile/changelog_modal.html +++ b/app/partials/mobile/changelog_modal.html @@ -19,9 +19,25 @@ + +