Make getting started more user-friendly. Fixes #327
This commit is contained in:
@@ -79,7 +79,8 @@ class AuthAPI(abc.ABC):
|
||||
try:
|
||||
await user.client.sign_in(phone.strip())
|
||||
return self.get_login_response(mxid=user.mxid, state="code", status=200,
|
||||
message="Code requested successfully.")
|
||||
message="Code requested successfully. Check your SMS "
|
||||
"or Telegram client and enter the code below.")
|
||||
except PhoneNumberInvalidError:
|
||||
return self.get_login_response(mxid=user.mxid, state="request", status=400,
|
||||
errcode="phone_number_invalid",
|
||||
|
||||
@@ -95,8 +95,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
% if state == "request":
|
||||
<label for="value">Phone number</label>
|
||||
<input type="tel" id="value" name="phone" placeholder="Enter phone number"/>
|
||||
<button type="submit">Request code</button>
|
||||
<button class="button-clear" type="button" onclick="switchToBotLogin()">
|
||||
<button type="submit">Start</button>
|
||||
<button class="button-clear float-right" type="button" onclick="switchToBotLogin()">
|
||||
Use bot token
|
||||
</button>
|
||||
% elif state == "bot_token":
|
||||
|
||||
Reference in New Issue
Block a user