diff --git a/README.md b/README.md index 0bd04056..0193e6ec 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/app/img/screenshot2.png b/app/img/screenshot2.png index b8d8789d..70fc243f 100644 Binary files a/app/img/screenshot2.png and b/app/img/screenshot2.png differ diff --git a/app/img/screenshot3.png b/app/img/screenshot3.png new file mode 100644 index 00000000..057fa80e Binary files /dev/null and b/app/img/screenshot3.png differ diff --git a/app/index.html b/app/index.html index 1cb83cf0..cef048fc 100644 --- a/app/index.html +++ b/app/index.html @@ -34,6 +34,8 @@
+ +
diff --git a/app/js/controllers.js b/app/js/controllers.js index ed58abab..ecb63897 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -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); diff --git a/app/js/directives.js b/app/js/directives.js index d0a75bc7..3f04d21c 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -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, diff --git a/app/js/services.js b/app/js/services.js index 4168fc9f..9fd98818 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -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++; diff --git a/app/manifest.json b/app/manifest.json index 10298acf..a132072d 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,5 +1,5 @@ { - "name": "Telegram UNOFFICIAL", + "name": "Telegram", "version": "0.3.0", "short_name": "Webogram", "manifest_version": 2, diff --git a/app/manifest.webapp b/app/manifest.webapp index 1fc4c5d4..c134b491 100644 --- a/app/manifest.webapp +++ b/app/manifest.webapp @@ -34,7 +34,9 @@ "share": { "href": "/index.html", "disposition": "window", - "filters": {}, + "filters": { + "type": ["image/*","audio/*","video/*"] + }, "returnValue": false } }, diff --git a/app/partials/desktop/country_select_modal.html b/app/partials/desktop/country_select_modal.html index a6454837..c7331877 100644 --- a/app/partials/desktop/country_select_modal.html +++ b/app/partials/desktop/country_select_modal.html @@ -5,7 +5,7 @@ diff --git a/app/partials/desktop/im.html b/app/partials/desktop/im.html index 0c8f1972..943e22b6 100644 --- a/app/partials/desktop/im.html +++ b/app/partials/desktop/im.html @@ -277,5 +277,3 @@ - -
diff --git a/app/partials/mobile/country_select_modal.html b/app/partials/mobile/country_select_modal.html index 1610ed1a..4558ff4f 100644 --- a/app/partials/mobile/country_select_modal.html +++ b/app/partials/mobile/country_select_modal.html @@ -26,7 +26,7 @@