Browse Source

Bump to 0.4.3

master
Igor Zhukov 10 years ago
parent
commit
2dfd60c571
  1. 2
      app/js/app.js
  2. 2
      app/js/background.js
  3. 36
      app/js/controllers.js
  4. 2
      app/js/directives.js
  5. 2
      app/js/directives_mobile.js
  6. 2
      app/js/filters.js
  7. 2
      app/js/lib/bin_utils.js
  8. 4
      app/js/lib/config.js
  9. 2
      app/js/lib/crypto_worker.js
  10. 2
      app/js/lib/mtproto.js
  11. 19
      app/js/lib/mtproto_wrapper.js
  12. 2
      app/js/lib/ng_utils.js
  13. 2
      app/js/lib/tl_utils.js
  14. 2
      app/js/lib/utils.js
  15. 2
      app/js/message_composer.js
  16. 2
      app/js/services.js
  17. 7
      app/less/app.less
  18. 2
      app/manifest.json
  19. 2
      app/manifest.webapp
  20. 2
      package.json

2
app/js/app.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/background.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

36
app/js/controllers.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -791,22 +791,6 @@ angular.module('myApp.controllers', ['myApp.i18n'])
} }
return result; return result;
}, function (error) {
if (error.code == 401) {
MtpApiManager.logOut()['finally'](function () {
if (location.protocol == 'http:' &&
!Config.Modes.http &&
Config.App.domains.indexOf(location.hostname) != -1) {
location.href = location.href.replace(/^http:/, 'https:');
} else {
location.hash = '/login';
AppRuntimeManager.reload();
}
});
error.handled = true;
}
return $q.reject();
}); });
}; };
@ -2626,6 +2610,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.password = {_: 'account.noPassword'}; $scope.password = {_: 'account.noPassword'};
updatePasswordState(); updatePasswordState();
var updatePasswordTimeout = false; var updatePasswordTimeout = false;
var stopped = false;
$scope.changePassword = function (options) { $scope.changePassword = function (options) {
options = options || {}; options = options || {};
@ -2660,12 +2645,17 @@ angular.module('myApp.controllers', ['myApp.i18n'])
updatePasswordTimeout = false; updatePasswordTimeout = false;
PasswordManager.getState().then(function (result) { PasswordManager.getState().then(function (result) {
$scope.password = result; $scope.password = result;
if (result._ == 'account.noPassword' && result.email_unconfirmed_pattern) { if (result._ == 'account.noPassword' && result.email_unconfirmed_pattern && !stopped) {
updatePasswordTimeout = $timeout(updatePasswordState, 5000); updatePasswordTimeout = $timeout(updatePasswordState, 5000);
} }
}); });
} }
$scope.$on('$destroy', function () {
$timeout.cancel(updatePasswordTimeout);
stopped = true;
});
function onPhotoSelected (photo) { function onPhotoSelected (photo) {
if (!photo || !photo.type || photo.type.indexOf('image') !== 0) { if (!photo || !photo.type || photo.type.indexOf('image') !== 0) {
@ -2997,6 +2987,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.slice = {limit: 20, limitDelta: 20}; $scope.slice = {limit: 20, limitDelta: 20};
var updateSessionsTimeout = false; var updateSessionsTimeout = false;
var stopped = false;
function updateSessions () { function updateSessions () {
$timeout.cancel(updateSessionsTimeout); $timeout.cancel(updateSessionsTimeout);
@ -3018,7 +3009,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
} }
return sB.date_active - sA.date_active; return sB.date_active - sA.date_active;
}); });
updateSessionsTimeout = $timeout(updateSessions, 5000); if (!stopped) {
updateSessionsTimeout = $timeout(updateSessions, 5000);
}
}) })
} }
@ -3042,6 +3035,11 @@ angular.module('myApp.controllers', ['myApp.i18n'])
} }
}); });
$scope.$on('$destroy', function () {
$timeout.cancel(updateSessionsTimeout);
stopped = true;
});
}) })
.controller('PasswordUpdateModalController', function ($scope, $q, _, PasswordManager, MtpApiManager, ErrorService, $modalInstance) { .controller('PasswordUpdateModalController', function ($scope, $q, _, PasswordManager, MtpApiManager, ErrorService, $modalInstance) {

2
app/js/directives.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/directives_mobile.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/filters.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/bin_utils.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

4
app/js/lib/config.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -21,7 +21,7 @@ Config = window.Config || {};
Config.App = { Config.App = {
id: 2496, id: 2496,
hash: '8da85b0d5bfe62527e5b244c209159c3', hash: '8da85b0d5bfe62527e5b244c209159c3',
version: '0.4.2', version: '0.4.3',
domains: ['web.telegram.org', 'zhukov.github.io'] domains: ['web.telegram.org', 'zhukov.github.io']
}; };

2
app/js/lib/crypto_worker.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/mtproto.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

19
app/js/lib/mtproto_wrapper.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -7,7 +7,7 @@
angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto']) angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
.factory('MtpApiManager', function (Storage, MtpAuthorizer, MtpNetworkerFactory, MtpSingleInstanceService, ErrorService, qSync, $q, TelegramMeWebService) { .factory('MtpApiManager', function (Storage, MtpAuthorizer, MtpNetworkerFactory, MtpSingleInstanceService, AppRuntimeManager, ErrorService, qSync, $q, TelegramMeWebService) {
var cachedNetworkers = {}, var cachedNetworkers = {},
cachedUploadNetworkers = {}, cachedUploadNetworkers = {},
cachedExportPromise = {}, cachedExportPromise = {},
@ -134,7 +134,20 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
error.stack = error.originalError && error.originalError.stack || error.stack || (new Error()).stack; error.stack = error.originalError && error.originalError.stack || error.stack || (new Error()).stack;
setTimeout(function () { setTimeout(function () {
if (!error.handled) { if (!error.handled) {
ErrorService.show({error: error}); if (error.code == 401) {
mtpLogOut()['finally'](function () {
if (location.protocol == 'http:' &&
!Config.Modes.http &&
Config.App.domains.indexOf(location.hostname) != -1) {
location.href = location.href.replace(/^http:/, 'https:');
} else {
location.hash = '/login';
AppRuntimeManager.reload();
}
});
} else {
ErrorService.show({error: error});
}
error.handled = true; error.handled = true;
} }
}, 100); }, 100);

2
app/js/lib/ng_utils.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/tl_utils.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/utils.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/message_composer.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/services.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.4.2 - messaging web application for MTProto * Webogram v0.4.3 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

7
app/less/app.less

@ -2799,11 +2799,8 @@ a.contacts_modal_contact:hover .md_modal_list_peer_description,
text-align: center; text-align: center;
} }
} }
.sessions_wrap { .sessions_modal_sessions_list {
margin-bottom: 20px;
}
.sessions_scrollable_wrap {
} }
.session_active_date_online { .session_active_date_online {
color: #3a6d99; color: #3a6d99;

2
app/manifest.json

@ -1,7 +1,7 @@
{ {
"name": "Telegram", "name": "Telegram",
"description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram",
"version": "0.4.2", "version": "0.4.3",
"short_name": "Telegram", "short_name": "Telegram",
"manifest_version": 2, "manifest_version": 2,
"app": { "app": {

2
app/manifest.webapp

@ -1,7 +1,7 @@
{ {
"name": "Telegram", "name": "Telegram",
"description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram",
"version": "0.4.2", "version": "0.4.3",
"type": "privileged", "type": "privileged",
"launch_path": "/index.html", "launch_path": "/index.html",
"developer": { "developer": {

2
package.json

@ -1,7 +1,7 @@
{ {
"name": "Telegram", "name": "Telegram",
"description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram",
"version": "0.4.2", "version": "0.4.3",
"main": "app/index.html", "main": "app/index.html",
"single-instance": true, "single-instance": true,
"dom_storage_quota": 40, "dom_storage_quota": 40,

Loading…
Cancel
Save