Merged with master

This commit is contained in:
Igor Zhukov 2014-09-17 19:44:04 +04:00
commit 4821550517
16 changed files with 44 additions and 23 deletions

View File

@ -17,7 +17,10 @@ That said, I'm using this app myself and I'd like to share its sources, so anyon
Here are some screenshots of the interface:
![Sample screenshot 1](/app/img/screenshot1.png)
![Mobile screenshot 2](/app/img/screenshot2.png)
![Mobile screenshot 3](/app/img/screenshot3.png)
### Implemented functionality list

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 33 KiB

BIN
app/img/screenshot3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -34,6 +34,8 @@
<body>
<div class="page_wrap" ng-view></div>
<div id="notify_sound"></div>
<!-- build:js js/app.js -->
<script type="text/javascript" src="vendor/console-polyfill/console-polyfill.js"></script>

View File

@ -23,9 +23,10 @@ angular.module('myApp.controllers', [])
ChangelogNotifyService.checkUpdate();
})
.controller('AppLoginController', function ($scope, $location, $timeout, $modal, $modalStack, MtpApiManager, ErrorService, ChangelogNotifyService) {
.controller('AppLoginController', function ($scope, $rootScope, $location, $timeout, $modal, $modalStack, MtpApiManager, ErrorService, NotificationsManager, ChangelogNotifyService, IdleManager) {
$modalStack.dismissAll();
IdleManager.start();
MtpApiManager.getUserID().then(function (id) {
if (id) {
@ -181,6 +182,12 @@ angular.module('myApp.controllers', [])
phone_number: $scope.credentials.phone_number
}).then(function () {
$scope.progress.enabled = true;
onContentLoaded(function () {
$scope.$broadcast('ui_height');
});
var authKeyStarted = tsNow();
MtpApiManager.invokeApi('auth.sendCode', {
phone_number: $scope.credentials.phone_full,
sms_type: 5,
@ -197,6 +204,10 @@ angular.module('myApp.controllers', [])
callCheck();
onContentLoaded(function () {
$scope.$broadcast('ui_height');
});
}, function (error) {
$scope.progress.enabled = false;
console.log('sendCode error', error);
@ -215,6 +226,14 @@ angular.module('myApp.controllers', [])
error.handled = true;
break;
}
})['finally'](function () {
if ($rootScope.idle.isIDLE || tsNow() - authKeyStarted > 60000) {
NotificationsManager.notify({
title: 'Telegram',
message: 'Your authorization key was successfully generated! Open the app to log in.',
tag: 'auth_key'
});
}
});
});
}
@ -1060,7 +1079,7 @@ angular.module('myApp.controllers', [])
}
onContentLoaded(function () {
$scope.$broadcast('messages_focus', $scope.curDialog.messageID || 0);
})
});
$scope.$broadcast('ui_history_change');
AppMessagesManager.readHistory($scope.curDialog.inputPeer);

View File

@ -39,9 +39,11 @@ angular.module('myApp.directives', ['myApp.filters'])
return {
templateUrl: templateUrl('message'),
link: link
};
function link($scope, element, attrs) {
console.log(111);
var selected = false,
grouped = false,
focused = false,

View File

@ -3603,6 +3603,9 @@ angular.module('myApp.services', [])
if (Config.Navigator.ffos) {
data.image = 'https://raw.githubusercontent.com/zhukov/webogram/master/app/img/icons/icon60.png';
}
else if (!data.image) {
data.image = 'img/icons/icon60.png';
}
notificationsCount++;

View File

@ -1,5 +1,5 @@
{
"name": "Telegram UNOFFICIAL",
"name": "Telegram",
"version": "0.3.0",
"short_name": "Webogram",
"manifest_version": 2,

View File

@ -34,7 +34,9 @@
"share": {
"href": "/index.html",
"disposition": "window",
"filters": {},
"filters": {
"type": ["image/*","audio/*","video/*"]
},
"returnValue": false
}
},

View File

@ -5,7 +5,7 @@
<h4 class="modal_simple_header">Country</h4>
<div class="countries_modal_search">
<input class="form-control countries_modal_search_field" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<a class="countries_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>

View File

@ -277,5 +277,3 @@
<div class="im_page_footer">
<a class="im_page_footer_brand" target="_blank" href="https://github.com/zhukov/webogram">Telegram beta</a> by izhukov &amp; toberg
</div>
<div id="notify_sound"></div>

View File

@ -26,7 +26,7 @@
<div class="modal-body mobile_modal_body">
<div class="countries_modal_search">
<input class="form-control countries_modal_search_field" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
<a class="countries_modal_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div>

View File

@ -1,12 +1,4 @@
<div class="im_message_unread_split" ng-if="::historyUnreadAfter == historyMessage.id || false" ng-show="historyUnreadAfter == historyMessage.id">
Unread messages
</div>
<div class="im_message_date_split im_service_message_wrap" ng-if="::historyMessage.needDate || false" ng-show="historyMessage.needDate">
<div class="im_service_message" ng-bind="historyMessage.date | myDate"></div>
</div>
<div class="im_message_outer_wrap" ng-class="[selectedMsgs[historyMessage.id] ? 'im_message_selected' : '', historyMessage.grouped, historyFocus == historyMessage.id ? 'im_message_focus' : '', historyMessage.unread ? 'im_message_unread' : '', historyMessage.error ? 'im_message_error' : '', historyMessage.pending ? 'im_message_pending' : '']" ng-click="toggleMessage(historyMessage.id, $event)">
<div class="im_message_outer_wrap" ng-click="toggleMessage(historyMessage.id, $event)">
<div class="im_message_wrap clearfix">
@ -45,7 +37,7 @@
<span class="im_message_date" ng-bind="::historyMessage.date | time"></span>
</div>
<div class="im_message_body" ng-class="{im_message_body_media: historyMessage._ == 'message' &amp;&amp; historyMessage.media &amp;&amp; historyMessage.media._ != 'messageMediaEmpty'}">
<div class="im_message_body" ng-class="::{im_message_body_media: historyMessage._ == 'message' &amp;&amp; historyMessage.media &amp;&amp; historyMessage.media._ != 'messageMediaEmpty'}">
<a class="im_message_author" my-user-link="historyMessage.from_id" short="!historyMessage.to_id.chat_id" color="historyMessage.to_id.chat_id > 0"></a>

View File

@ -1,6 +1,6 @@
CACHE MANIFEST
# 31
# 32
NETWORK:
*

View File

@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() {
return gulp.src('app/index.html')
.pipe($.usemin({
html: [$.minifyHtml({empty: true})],
js: ['concat', $.ngmin(), $.uglify({outSourceMap: true})],
js: ['concat', $.ngmin(), $.uglify(/*{outSourceMap: true}*/)],
css: [$.minifyCss(), 'concat']
}))
.pipe(gulp.dest('dist'));

View File

@ -35,9 +35,9 @@
"gulp": "~3.5.5",
"gulp-angular-templatecache": "^1.1.0",
"gulp-load-plugins": "^0.4.0",
"gulp-usemin": "^0.3.3",
"gulp-uglify": "^0.2.1",
"gulp-rev": "^0.3.0",
"gulp-usemin": "^0.3.8",
"gulp-uglify": "^1.0.1",
"gulp-rev": "^1.1.0",
"gulp-minify-css": "^0.3.0",
"gulp-minify-html": "^0.1.1",
"gulp-imagemin": "^0.1.5",