Browse Source

Disable sign ups

master
Igor Zhukov 7 years ago
parent
commit
21b34ac7b4
  1. 4
      app/js/controllers.js
  2. 1
      app/js/locales/en-us.json
  3. 6
      app/partials/desktop/error_modal.html

4
app/js/controllers.js

@ -219,6 +219,10 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -219,6 +219,10 @@ angular.module('myApp.controllers', ['myApp.i18n'])
$scope.error = {field: 'phone'}
error.handled = true
break
case 'PHONE_NUMBER_APP_SIGNUP_FORBIDDEN':
$scope.error = {field: 'phone'}
break
}
})['finally'](function () {
if ($rootScope.idle.isIDLE || tsNow() - authKeyStarted > 60000) {

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

@ -420,6 +420,7 @@ @@ -420,6 +420,7 @@
"error_modal_username_not_found_description": "There is no Telegram account with the username you provided.",
"error_modal_phonecalls_not_supported_description_md": "Unfortunately calls are not supported in the Web App at the moment.\n\nYou can call {user} using our mobile apps or native desktop applications.\n{download-link: Download »}",
"error_modal_fresh_reset_authorization_forbidden": "For security reasons, you can't terminate older sessions from a device that you've just connected. Please use an earlier connection or wait for a few hours",
"error_modal_app_signup_forbidden_md": "You don't have a Telegram account yet, please **sign up** with {signup-link: Android / iPhone} first.",
"error_modal_bad_request_description": "One of the params is missing or invalid.",
"error_modal_unauthorized_description": "This action requires authorization access. Please {login-link: log in}.",

6
app/partials/desktop/error_modal.html

@ -40,6 +40,10 @@ @@ -40,6 +40,10 @@
<span ng-switch-when="USERNAME_INVALID" my-i18n="error_modal_username_invalid_description"></span>
<span ng-switch-when="USERNAME_OCCUPIED" my-i18n="error_modal_username_occupied_description"></span>
<span ng-switch-when="MEDIA_TYPE_NOT_SUPPORTED" my-i18n="error_modal_media_not_supported_description"></span>
<span ng-switch-when="PHONE_NUMBER_APP_SIGNUP_FORBIDDEN" my-i18n="error_modal_app_signup_forbidden_md">
<my-i18n-param name="signup-link"><a href="https://telegram.org/dl" target="_blank">{0}</a></my-i18n-param>
</span>
<span ng-switch-when="USERNAME_NOT_OCCUPIED" my-i18n="error_modal_username_not_found_description"></span>
<span ng-switch-when="USER_NOT_MUTUAL_CONTACT" my-i18n="error_modal_user_not_mutual_contact"></span>
<span ng-switch-when="INVITE_HASH_INVALID" my-i18n="error_modal_invite_link_invalid"></span>
@ -58,7 +62,7 @@ @@ -58,7 +62,7 @@
<my-i18n-param name="download-link"><a href="https://telegram.org/dl" target="_blank">{0}</a></my-i18n-param>
</span>
<span ng-switch-when="CALLBACK_RESPONSE" ng-bind-html="error.description_html"></span>
<span ng-switch-when="FRESH_RESET_AUTHORISATION_FORBIDDEN" my-i18n="error_modal_fresh_reset_authorization_forbidden"></span>

Loading…
Cancel
Save