diff --git a/app/app.manifest b/app/app.manifest index a6f40c55..412e2512 100644 --- a/app/app.manifest +++ b/app/app.manifest @@ -1,4 +1,6 @@ CACHE MANIFEST +# 1 + NETWORK: * diff --git a/app/css/app.css b/app/css/app.css index 76106efd..990d34a7 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -728,20 +728,6 @@ a.im_dialog:hover .im_dialog_date { text-overflow: ellipsis; } -.icon-group { - display: inline-block; - width: 18px; - height: 12px; - margin-top: 3px; - line-height: 14px; - vertical-align: text-top; - background: url(../img/icons/DialogListGroupChatIcon@2x.png) 0 0 no-repeat; - background-size: 18px 12px; -} -.active .icon-group { - background-image: url(../img/icons/DialogListGroupChatIcon_Highlighted@2x.png); -} - /* IM history */ .im_history_col { } diff --git a/app/img/card_share.png b/app/img/card_share.png deleted file mode 100644 index e154f136..00000000 Binary files a/app/img/card_share.png and /dev/null differ diff --git a/app/img/icons/DialogListGroupChatIcon@2x.png b/app/img/icons/DialogListGroupChatIcon@2x.png deleted file mode 100644 index 14c0e1fd..00000000 Binary files a/app/img/icons/DialogListGroupChatIcon@2x.png and /dev/null differ diff --git a/app/img/icons/DialogListGroupChatIcon_Highlighted@2x.png b/app/img/icons/DialogListGroupChatIcon_Highlighted@2x.png deleted file mode 100644 index 4991d5bd..00000000 Binary files a/app/img/icons/DialogListGroupChatIcon_Highlighted@2x.png and /dev/null differ diff --git a/app/index.html b/app/index.html index 5ae813c8..a3cfb14c 100644 --- a/app/index.html +++ b/app/index.html @@ -20,6 +20,40 @@ + + @@ -59,35 +93,5 @@ - - diff --git a/app/js/lib/aes_worker.js b/app/js/lib/aes_worker.js index f7579c05..5cc09400 100644 --- a/app/js/lib/aes_worker.js +++ b/app/js/lib/aes_worker.js @@ -6,10 +6,10 @@ */ importScripts( - '../../vendor/console-polyfill/console-polyfill.js?1', + '../../vendor/console-polyfill/console-polyfill.js', 'mtproto.js', '../../vendor/jsbn/jsbn_combined.js', - '../../vendor/cryptoJS/crypto.js?1' + '../../vendor/cryptoJS/crypto.js' ); onmessage = function (e) { diff --git a/app/js/lib/mtproto.js b/app/js/lib/mtproto.js index f9fb040d..9c8a1d96 100644 --- a/app/js/lib/mtproto.js +++ b/app/js/lib/mtproto.js @@ -2392,7 +2392,7 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker } if (!options.createNetworker) { - return $q.reject({type: 'AUTH_KEY_EMPTY', code: 500}); + return $q.reject({type: 'AUTH_KEY_EMPTY', code: 401}); } return MtpAuthorizer.auth(dcID).then(function (auth) { @@ -2456,9 +2456,7 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker cachedExportPromise[dcID] = exportDeferred.promise; } - // console.log('promise', cachedExportPromise[dcID]); - - cachedExportPromise[dcID] = cachedExportPromise[dcID].then(function () { + cachedExportPromise[dcID].then(function () { (cachedNetworker = networker).wrapApiCall(method, params, options).then(function (result) { deferred.resolve(result); }, function (error) { diff --git a/app/partials/login.html b/app/partials/login.html index 68981645..337347dd 100644 --- a/app/partials/login.html +++ b/app/partials/login.html @@ -17,7 +17,7 @@
-

{{ credentials.phone_number | phoneNumber }} (edit)

+

{{ credentials.phone_number | phoneNumber }} (edit)

We have sent you a code via SMS.
Please enter it below.

diff --git a/gulpfile.js b/gulpfile.js index bcf3beb8..a91bd7f2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() { return gulp.src('app/index.html') .pipe($.usemin({ html: [$.minifyHtml({empty: true})], - js: [$.ngmin(), $.uglify(), 'concat', $.rev()], + js: [$.ngmin(), $.uglify(), 'concat'], css: [$.minifyCss(), 'concat'] })) .pipe(gulp.dest('dist')); @@ -49,8 +49,6 @@ gulp.task('copy', function() { .pipe(gulp.dest('dist/vendor/console-polyfill')), gulp.src('app/js/lib/mtproto.js') .pipe(gulp.dest('dist/js/lib')), - gulp.src('app/js/lib/config.js') - .pipe(gulp.dest('dist/js/lib')), gulp.src('app/vendor/jsbn/jsbn_combined.js') .pipe(gulp.dest('dist/vendor/jsbn')), gulp.src('app/vendor/cryptoJS/crypto.js') @@ -124,7 +122,7 @@ gulp.task('disable-production', function() { }); gulp.task('add-appcache-manifest', function() { - return gulp.src(['./dist/**/*', '!dist/manifest.json', '!dist/manifest.json', '!dist/index.html']) + return gulp.src(['./dist/**/*', '!dist/manifest.*', '!dist/index.html', '!dist/fonts/*', '!dist/img/icons/icon*.png', '!dist/js/background.js']) .pipe($.manifest({ timestamp: true, network: ['http://*', 'https://*', '*'], diff --git a/server.js b/server.js index 3c797e53..c1933d2c 100755 --- a/server.js +++ b/server.js @@ -80,6 +80,7 @@ StaticServlet.MimeMap = { 'xml': 'application/xml', 'json': 'application/json', 'js': 'application/javascript', + 'manifest': 'text/cache-manifest', 'jpg': 'image/jpeg', 'jpeg': 'image/jpeg', 'gif': 'image/gif', @@ -175,6 +176,9 @@ StaticServlet.prototype.sendFile_ = function(req, res, path) { 'Content-Type': StaticServlet. MimeMap[path.split('.').pop()] || 'text/plain' }); + + // console.log(path.split('.').pop(), StaticServlet.MimeMap[path.split('.').pop()] || 'text/plain'); + if (req.method === 'HEAD') { res.end(); } else {