Improvements to web UI
This commit is contained in:
parent
1847e4071e
commit
5fcbf77b99
@ -19,12 +19,7 @@ if (!file_exists('madeline.php')) {
|
||||
}
|
||||
include 'madeline.php';
|
||||
|
||||
// !!! This API id/API hash combination will not work !!!
|
||||
// !!! You must get your own @ my.telegram.org !!!
|
||||
$api_id = 0;
|
||||
$api_hash = '';
|
||||
|
||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
|
||||
$MadelineProto->start();
|
||||
|
||||
$me = $MadelineProto->get_self();
|
||||
|
@ -23,12 +23,7 @@ if (!file_exists('madeline.php')) {
|
||||
}
|
||||
include 'madeline.php';
|
||||
|
||||
// !!! This API id/API hash combination will not work !!!
|
||||
// !!! You must get your own @ my.telegram.org !!!
|
||||
$api_id = 0;
|
||||
$api_hash = '';
|
||||
|
||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
|
||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
|
||||
$MadelineProto->start();
|
||||
|
||||
$me = $MadelineProto->get_self();
|
||||
|
@ -50,7 +50,19 @@ trait ApiTemplates
|
||||
if (!isset($this->my_telegram_org_wrapper)) {
|
||||
if (isset($_POST['type'])) {
|
||||
if ($_POST['type'] === 'manual') {
|
||||
echo $this->web_api_echo_template('Enter your API ID and API hash<br><b>'.$message.'</b>', '<input type="string" name="api_id" placeholder="API ID" required/><input type="string" name="api_hash" placeholder="API hash" required/>');
|
||||
echo $this->web_api_echo_template('Enter your API ID and API hash<br><b>'.$message.'</b><ol>
|
||||
<li>Login to my.telegram.org</li>
|
||||
<li>Go to API development tools</li>
|
||||
<li>
|
||||
<ul>
|
||||
<li>App title: your app's name, can be anything</li>
|
||||
<li>Short name: your app's short name, only numbers and letters</li>
|
||||
<li>Platform: Web</li>
|
||||
<li>Description: describe your app here</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Click on create application</li>
|
||||
</ol>', '<input type="string" name="api_id" placeholder="API ID" required/><input type="string" name="api_hash" placeholder="API hash" required/>');
|
||||
} else {
|
||||
echo $this->web_api_echo_template('Enter your phone number<br><b>'.$message.'</b>', '<input type="text" name="phone_number" placeholder="Phone number" required/>');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user