Browse Source

bugfixes

master
Igor Zhukov 10 years ago
parent
commit
2f8700a6c3
  1. 36
      app/js/controllers.js
  2. 3
      app/js/locales/en-us.json
  3. 3
      app/partials/desktop/changelog_modal.html
  4. 2
      app/partials/desktop/username_edit_modal.html
  5. 1
      app/partials/desktop/welcome.html
  6. 2
      app/partials/mobile/changelog_modal.html
  7. 2
      app/partials/mobile/username_edit_modal.html
  8. 1
      app/partials/mobile/welcome.html

36
app/js/controllers.js

@ -694,26 +694,28 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -694,26 +694,28 @@ angular.module('myApp.controllers', ['myApp.i18n'])
});
if ($scope.search.query && $scope.search.query.length >= 5) {
MtpApiManager.invokeApi('contacts.search', {q: $scope.search.query, limit: 10}).then(function (result) {
console.log($scope.search.query, result);
AppUsersManager.saveApiUsers(result.users);
$timeout(function() {
if (curJump != jump) return;
$scope.foundUsers = [];
angular.forEach(result.results, function(contactFound) {
var userID = contactFound.user_id;
if (peersInDialogs[userID] === undefined) {
$scope.foundUsers.push({
userID: userID,
user: AppUsersManager.getUser(userID),
peerString: AppUsersManager.getUserString(userID)
});
MtpApiManager.invokeApi('contacts.search', {q: $scope.search.query, limit: 10}).then(function (result) {
AppUsersManager.saveApiUsers(result.users);
if (curJump != jump) return;
$scope.foundUsers = [];
angular.forEach(result.results, function(contactFound) {
var userID = contactFound.user_id;
if (peersInDialogs[userID] === undefined) {
$scope.foundUsers.push({
userID: userID,
user: AppUsersManager.getUser(userID),
peerString: AppUsersManager.getUserString(userID)
});
}
});
}, function (error) {
if (error.code == 400) {
error.handled = true;
}
});
}, function (error) {
if (error.code == 400) {
error.handled = true;
}
});
}, 500);
}
}

3
app/js/locales/en-us.json

@ -341,8 +341,7 @@ @@ -341,8 +341,7 @@
"phonebook_modal_submit": "Import contacts",
"welcome_header_md": "**Telegram** Web",
"welcome_text_1_md": "This is an unofficial web-client for the **Telegram Messenger**.",
"welcome_text_2_md": "It's still an **alpha-version** and may not be 200% reliable",
"welcome_text_1_md": "The official **web client** for Telegram.",
"welcome_start_messaging": "Start Messaging",
"welcome_fast_messaging_header": "Fast messaging",
"welcome_fast_messaging_text": "Send messages with rich emoji support right from your desktop or laptop computer",

3
app/partials/desktop/changelog_modal.html

@ -26,7 +26,8 @@ @@ -26,7 +26,8 @@
<ul class="list-unstyled changelog_version_changes_list">
<li>Usernames support: <a href="" ng-click="changeUsername()">Choose a username right now!</a></li>
<li>Search can now find public users by username.</li>
<li>Added default recent emoticons.</li>
<li>Most popular emoticons shown in 'recent' when empty</li>
<li>[ChromeApp] Added saving window position and size</li>
<li>Bugfixes</li>
</ul>
</div>

2
app/partials/desktop/username_edit_modal.html

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
<h4 my-i18n="username_edit_modal_title"></h4>
<div class="form-group import_modal_field_wrap" ng-class="{'has-error': checked.error, 'has-feedback': checked.feedback.length > 0, 'has-success': checked.success}">
<div class="form-group import_modal_field_wrap" ng-class="{'has-error': checked.error, 'has-feedback': checked.feedback.length > 0}">
<input class="form-control input-md" my-focused type="text" placeholder="{{'username_edit_placeholder' | i18n}}" ng-model="profile.username" name="username" ng-model-options="{updateOn: 'default blur', debounce: {default: 600, blur: 0}}"/>
<span ng-if="checked.error" class="glyphicon form-control-feedback" ng-class="{'glyphicon-remove': checked.error}"></span>
</div>

1
app/partials/desktop/welcome.html

@ -9,7 +9,6 @@ @@ -9,7 +9,6 @@
<div class="welcome_text">
<p my-i18n="welcome_text_1_md"></p>
<p my-i18n="welcome_text_2_md"></p>
</div>
<div class="welcome_btn_wrap">
<a href="#/login" class="btn btn-primary btn-block" my-i18n="welcome_start_messaging"></a>

2
app/partials/mobile/changelog_modal.html

@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
<ul class="list-unstyled changelog_version_changes_list">
<li>Usernames support: <a href="" ng-click="changeUsername">Choose a username right now!</a></li>
<li>Search can now find public users by username.</li>
<li>Added default recent emoticons.</li>
<li>Most popular emoticons shown in 'recent' when empty</li>
<li>Bugfixes</li>
</ul>
</div>

2
app/partials/mobile/username_edit_modal.html

@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
<form class="modal_simple_form" ng-submit="updateUsername()" my-vertical-position="0.3">
<div class="form-group import_modal_field_wrap" ng-class="{'has-error': checked.error, 'has-feedback': checked.feedback.length > 0, 'has-success': checked.success}">
<div class="form-group import_modal_field_wrap" ng-class="{'has-error': checked.error, 'has-feedback': checked.feedback.length > 0}">
<input class="form-control input-md" my-focused type="text" placeholder="{{'username_edit_placeholder' | i18n}}" ng-model="profile.username" name="username" ng-model-options="{updateOn: 'default blur', debounce: {default: 600, blur: 0}}"/>
<span ng-if="checked.error" class="glyphicon form-control-feedback" ng-class="{'glyphicon-remove': checked.error}"></span>
</div>

1
app/partials/mobile/welcome.html

@ -9,7 +9,6 @@ @@ -9,7 +9,6 @@
<div class="welcome_text">
<p my-i18n="welcome_text_1_md"></p>
<p my-i18n="welcome_text_2_md"></p>
</div>
<div class="welcome_btn_wrap">
<a href="#/login" class="btn btn-primary btn-block" my-i18n="welcome_start_messaging"></a>

Loading…
Cancel
Save