Fix #179
This commit is contained in:
parent
c9049fb91f
commit
7875517e47
@ -1,4 +1,6 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
|
|
||||||
|
# 1
|
||||||
|
|
||||||
NETWORK:
|
NETWORK:
|
||||||
*
|
*
|
||||||
|
@ -728,20 +728,6 @@ a.im_dialog:hover .im_dialog_date {
|
|||||||
text-overflow: ellipsis;
|
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 */
|
||||||
.im_history_col {
|
.im_history_col {
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 82 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 529 B |
@ -20,6 +20,40 @@
|
|||||||
<meta property="og:site_name" content="Webogram">
|
<meta property="og:site_name" content="Webogram">
|
||||||
<meta property="og:description" content="Welcome to an experimental web-client of Telegram messenger. See https://github.com/zhukov/webogram for more info.">
|
<meta property="og:description" content="Welcome to an experimental web-client of Telegram messenger. See https://github.com/zhukov/webogram for more info.">
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function () {
|
||||||
|
if (!window.applicationCache || !window.addEventListener) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var appCache = window.applicationCache,
|
||||||
|
declined = false,
|
||||||
|
updateTimeout = false,
|
||||||
|
scheduleUpdate = function (delay) {
|
||||||
|
clearTimeout(updateTimeout);
|
||||||
|
updateTimeout = setTimeout(function () {
|
||||||
|
appCache.update();
|
||||||
|
}, delay || 300000);
|
||||||
|
},
|
||||||
|
attach = function () {
|
||||||
|
appCache.addEventListener('updateready', function(e) {
|
||||||
|
if (appCache.status == appCache.UPDATEREADY) {
|
||||||
|
if (!declined && confirm('A new version of Webogram is available. Load it?')) {
|
||||||
|
window.location.reload();
|
||||||
|
} else {
|
||||||
|
declined = true;
|
||||||
|
scheduleUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
appCache.addEventListener('noupdate', function () {scheduleUpdate()}, false);
|
||||||
|
appCache.addEventListener('error', function () {scheduleUpdate()}, false);
|
||||||
|
};
|
||||||
|
|
||||||
|
scheduleUpdate(3000);
|
||||||
|
window.addEventListener('load', attach);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -59,35 +93,5 @@
|
|||||||
<script type="text/javascript" src="js/directives.js"></script>
|
<script type="text/javascript" src="js/directives.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function () {
|
|
||||||
if (!window.applicationCache || !window.addEventListener) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var appCache = window.applicationCache,
|
|
||||||
canceled = false,
|
|
||||||
scheduleUpdate = function () {
|
|
||||||
setTimeout(function () {
|
|
||||||
appCache.update();
|
|
||||||
}, 300000);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener('load', function(e) {
|
|
||||||
appCache.addEventListener('updateready', function(e) {
|
|
||||||
if (appCache.status == appCache.UPDATEREADY) {
|
|
||||||
if (!canceled && confirm('A new version of Webogram is available. Load it?')) {
|
|
||||||
window.location.reload();
|
|
||||||
} else {
|
|
||||||
canceled = true;
|
|
||||||
scheduleUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, false);
|
|
||||||
appCache.addEventListener('noupdate', scheduleUpdate, false);
|
|
||||||
appCache.addEventListener('error', scheduleUpdate, false);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
importScripts(
|
importScripts(
|
||||||
'../../vendor/console-polyfill/console-polyfill.js?1',
|
'../../vendor/console-polyfill/console-polyfill.js',
|
||||||
'mtproto.js',
|
'mtproto.js',
|
||||||
'../../vendor/jsbn/jsbn_combined.js',
|
'../../vendor/jsbn/jsbn_combined.js',
|
||||||
'../../vendor/cryptoJS/crypto.js?1'
|
'../../vendor/cryptoJS/crypto.js'
|
||||||
);
|
);
|
||||||
|
|
||||||
onmessage = function (e) {
|
onmessage = function (e) {
|
||||||
|
@ -2392,7 +2392,7 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!options.createNetworker) {
|
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) {
|
return MtpAuthorizer.auth(dcID).then(function (auth) {
|
||||||
@ -2456,9 +2456,7 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker
|
|||||||
cachedExportPromise[dcID] = exportDeferred.promise;
|
cachedExportPromise[dcID] = exportDeferred.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log('promise', cachedExportPromise[dcID]);
|
cachedExportPromise[dcID].then(function () {
|
||||||
|
|
||||||
cachedExportPromise[dcID] = cachedExportPromise[dcID].then(function () {
|
|
||||||
(cachedNetworker = networker).wrapApiCall(method, params, options).then(function (result) {
|
(cachedNetworker = networker).wrapApiCall(method, params, options).then(function (result) {
|
||||||
deferred.resolve(result);
|
deferred.resolve(result);
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form name="myLoginForm" ng-if="credentials.phone_code_hash" ng-submit="logIn()">
|
<form name="myLoginForm" ng-if="credentials.phone_code_hash" ng-submit="logIn()">
|
||||||
<h3 class="login_form_head">{{ credentials.phone_number | phoneNumber }} <small>(<a href="#/login">edit</a>)</small></h3>
|
<h3 class="login_form_head">{{ credentials.phone_number | phoneNumber }} <small>(<a ng-click="credentials.phone_code_hash = ''">edit</a>)</small></h3>
|
||||||
<p class="login_form_lead">We have sent you a code via SMS.<br/>Please enter it below.</p>
|
<p class="login_form_lead">We have sent you a code via SMS.<br/>Please enter it below.</p>
|
||||||
|
|
||||||
<p class="login_form_lead">
|
<p class="login_form_lead">
|
||||||
|
@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() {
|
|||||||
return gulp.src('app/index.html')
|
return gulp.src('app/index.html')
|
||||||
.pipe($.usemin({
|
.pipe($.usemin({
|
||||||
html: [$.minifyHtml({empty: true})],
|
html: [$.minifyHtml({empty: true})],
|
||||||
js: [$.ngmin(), $.uglify(), 'concat', $.rev()],
|
js: [$.ngmin(), $.uglify(), 'concat'],
|
||||||
css: [$.minifyCss(), 'concat']
|
css: [$.minifyCss(), 'concat']
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('dist'));
|
.pipe(gulp.dest('dist'));
|
||||||
@ -49,8 +49,6 @@ gulp.task('copy', function() {
|
|||||||
.pipe(gulp.dest('dist/vendor/console-polyfill')),
|
.pipe(gulp.dest('dist/vendor/console-polyfill')),
|
||||||
gulp.src('app/js/lib/mtproto.js')
|
gulp.src('app/js/lib/mtproto.js')
|
||||||
.pipe(gulp.dest('dist/js/lib')),
|
.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')
|
gulp.src('app/vendor/jsbn/jsbn_combined.js')
|
||||||
.pipe(gulp.dest('dist/vendor/jsbn')),
|
.pipe(gulp.dest('dist/vendor/jsbn')),
|
||||||
gulp.src('app/vendor/cryptoJS/crypto.js')
|
gulp.src('app/vendor/cryptoJS/crypto.js')
|
||||||
@ -124,7 +122,7 @@ gulp.task('disable-production', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('add-appcache-manifest', 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({
|
.pipe($.manifest({
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
network: ['http://*', 'https://*', '*'],
|
network: ['http://*', 'https://*', '*'],
|
||||||
|
@ -80,6 +80,7 @@ StaticServlet.MimeMap = {
|
|||||||
'xml': 'application/xml',
|
'xml': 'application/xml',
|
||||||
'json': 'application/json',
|
'json': 'application/json',
|
||||||
'js': 'application/javascript',
|
'js': 'application/javascript',
|
||||||
|
'manifest': 'text/cache-manifest',
|
||||||
'jpg': 'image/jpeg',
|
'jpg': 'image/jpeg',
|
||||||
'jpeg': 'image/jpeg',
|
'jpeg': 'image/jpeg',
|
||||||
'gif': 'image/gif',
|
'gif': 'image/gif',
|
||||||
@ -175,6 +176,9 @@ StaticServlet.prototype.sendFile_ = function(req, res, path) {
|
|||||||
'Content-Type': StaticServlet.
|
'Content-Type': StaticServlet.
|
||||||
MimeMap[path.split('.').pop()] || 'text/plain'
|
MimeMap[path.split('.').pop()] || 'text/plain'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// console.log(path.split('.').pop(), StaticServlet.MimeMap[path.split('.').pop()] || 'text/plain');
|
||||||
|
|
||||||
if (req.method === 'HEAD') {
|
if (req.method === 'HEAD') {
|
||||||
res.end();
|
res.end();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user