Browse Source

Supported send_call_timeout

master
Igor Zhukov 11 years ago
parent
commit
ab07892bfc
  1. 2
      app/js/controllers.js
  2. 9
      app/js/directives.js
  3. 2
      app/partials/head.html
  4. 6
      app/partials/login.html
  5. 2
      webogram.sublime-project

2
app/js/controllers.js

@ -86,7 +86,7 @@ angular.module('myApp.controllers', [])
$scope.credentials.phone_occupied = sentCode.phone_registered; $scope.credentials.phone_occupied = sentCode.phone_registered;
$scope.error = {}; $scope.error = {};
$scope.callPending.remaining = 60; $scope.callPending.remaining = sentCode.send_call_timeout;
callCheck(); callCheck();
}, function (error) { }, function (error) {

9
app/js/directives.js

@ -1001,13 +1001,10 @@ angular.module('myApp.directives', ['myApp.filters'])
var updateMargin = function () { var updateMargin = function () {
var height = element[0].offsetHeight, var height = element[0].offsetHeight,
contHeight = $($window).height(), contHeight = $($window).height(),
ratio = attrs.myVerticalPosition && parseFloat(attrs.myVerticalPosition) || 0.5; ratio = attrs.myVerticalPosition && parseFloat(attrs.myVerticalPosition) || 0.5,
margin = height < contHeight ? parseInt((contHeight - height) * ratio) : '';
if (height < contHeight) { element.css({marginTop: margin, marginBottom: margin});
element.css('marginTop', parseInt((contHeight - height) * ratio));
} else {
element.css('marginTop', '');
}
}; };
onContentLoaded(updateMargin); onContentLoaded(updateMargin);

2
app/partials/head.html

@ -13,7 +13,7 @@
</div> </div>
<div class="navbar-collapsed collapse"> <div class="navbar-collapse collapse">
<ul ng-if="offline" class="nav navbar-nav navbar-offline"> <ul ng-if="offline" class="nav navbar-nav navbar-offline">
<li ng-show="!offlineConnecting"><span class="navbar-offline-text">Waiting for network<span my-loading-dots></span></span></li> <li ng-show="!offlineConnecting"><span class="navbar-offline-text">Waiting for network<span my-loading-dots></span></span></li>

6
app/partials/login.html

@ -1,7 +1,7 @@
<div ng-include="'partials/head.html'"></div> <div ng-include="'partials/head.html'"></div>
<div class="login_form_wrap"> <div class="login_form_wrap" my-vertical-position="0.4">
<div class="error" ng-if="error.message">{{ error.message }}</div> <div class="error" ng-if="error.message">{{ error.message }}</div>
<form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()"> <form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">
<h3 class="login_form_head">Sign in</h3> <h3 class="login_form_head">Sign in</h3>
@ -9,7 +9,7 @@
<div class="form-group" ng-class="{'has-error': error.field == 'phone'}"> <div class="form-group" ng-class="{'has-error': error.field == 'phone'}">
<label class="control-label" for="phone_number" ng-if="error.field == 'phone'">Incorrect phone number</label> <label class="control-label" for="phone_number" ng-if="error.field == 'phone'">Incorrect phone number</label>
<input type="tel" class="form-control" name="phone_number" ng-model="credentials.phone_number" placeholder="Enter your phone" required> <input type="tel" class="form-control" my-focused name="phone_number" ng-model="credentials.phone_number" placeholder="Enter your phone" required>
</div> </div>
<button class="btn btn-success btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit"> <button class="btn btn-success btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit">
{{progress.enabled ? 'Generating keys...' : 'Next'}} {{progress.enabled ? 'Generating keys...' : 'Next'}}
@ -28,7 +28,7 @@
<div class="form-group" ng-class="{'has-error': error.field == 'phone_code'}"> <div class="form-group" ng-class="{'has-error': error.field == 'phone_code'}">
<label class="control-label" for="phone_code" ng-if="error.field == 'phone_code'">Incorrect SMS code</label> <label class="control-label" for="phone_code" ng-if="error.field == 'phone_code'">Incorrect SMS code</label>
<input type="number" maxlength="5" class="form-control" name="phone_code" ng-model="credentials.phone_code" placeholder="Enter your code" required> <input type="number" my-focused maxlength="5" class="form-control" name="phone_code" ng-model="credentials.phone_code" placeholder="Enter your code" required>
</div> </div>
<button class="btn btn-success btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled"> <button class="btn btn-success btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled">

2
webogram.sublime-project vendored

@ -4,7 +4,7 @@
{ {
"follow_symlinks": true, "follow_symlinks": true,
"path": ".", "path": ".",
"folder_exclude_patterns": ["*dist", "node_modules"], "folder_exclude_patterns": ["*dist", "node_modules", "releases"],
"file_exclude_patterns": ["*.zip"] "file_exclude_patterns": ["*.zip"]
} }
] ]

Loading…
Cancel
Save