root.jinja2 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!--
  2. ©️ Dan Gazizullin, 2021-2023
  3. This file is a part of Hikka Userbot
  4. 🌐 https://github.com/hikariatama/Hikka
  5. You can redistribute it and/or modify it under the terms of the GNU AGPLv3
  6. 🔑 https://www.gnu.org/licenses/agpl-3.0.html
  7. -->
  8. {% extends "base.jinja2" %}
  9. {% block head %}
  10. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
  11. <script src="//cdnjs.cloudflare.com/ajax/libs/bodymovin/5.8.1/lottie.min.js"></script>
  12. <script src="//cdnjs.cloudflare.com/ajax/libs/Snowstorm/20131208/snowstorm-min.js" async></script>
  13. <script src="//unpkg.com/@dotlottie/player-component@1.0.0/dist/dotlottie-player.js"></script>
  14. <script src="//unpkg.com/qr-code-styling@1.5.0/lib/qr-code-styling.js"></script>
  15. <link href="//cdn.jsdelivr.net/npm/css.gg/icons/all.css" rel="stylesheet">
  16. <link rel="stylesheet" href="{{ static("base.css") }}">
  17. {% endblock %}
  18. {% block content %}
  19. {% endblock %}
  20. {% block after %}
  21. <div class="bg">
  22. <div class="bg_inner"></div>
  23. </div>
  24. <div class="blur auth vert_center">
  25. <div id="tg_icon"></div>
  26. <div class="waiting_for_auth">Waiting for authentification...</div>
  27. <div class="confirm_auth">Please, confirm action in <span style="color:#28a0dc">Telegram</span></div>
  28. </div>
  29. <div class="auth-code-form blur">
  30. <div id="monkey"></div>
  31. <div id="monkey-close"></div>
  32. <span class="code-caption">Enter the code you recieved from Telegram</span>
  33. <input type="text" class="code-input" autocomplete="off">
  34. <div class="enter">Enter</div>
  35. </div>
  36. <div class="eula-form blur">
  37. <div class="vert_center" style="height: 100%">
  38. <div>
  39. <div id="law"></div>
  40. <br><br>
  41. <span class="code-caption">You are <span style="color:#c54245">prohibited</span> from adding more than 1 account on the current platform by its EULA.</span>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="wrapper">
  46. <div class="blur main finish_block">
  47. <div id="installation_icon"></div>
  48. <div class="title">Hikka is installed</div>
  49. <div class="description">
  50. Hikka is installed. You can close this page now.
  51. <br>
  52. <b>It might take a while for installation to fully complete. Please, be patient.</b>
  53. <br>
  54. <span style="font-size: 24px;">Check <span style="color:#28a0dc">Telegram</span> for a message from your <b>inline
  55. bot</b></span>
  56. </div>
  57. </div>
  58. <div class="blur main installation">
  59. <div class="title">
  60. <div class="hikka_label">
  61. <div class="label_inner">
  62. <img src="{{ platform_emoji }}" class="moon">
  63. &nbsp;Hikka
  64. </div>
  65. </div>
  66. </div><br>
  67. <div class="description">Incomprehensibly <span style="color:#c54245">the best</span> userbot<br><span
  68. style="color: #18cc18; display: none" class="authorized">Authorized!</span></div>
  69. <div class="center">
  70. {% if not tg_done %}
  71. <div class="button" id="get_started">
  72. <div class="horiz_center">
  73. <div class="vert_center">
  74. Get started
  75. </div>
  76. <div class="vert_center">
  77. <i class="gg-arrow-right-r"></i>
  78. </div>
  79. </div>
  80. </div>
  81. {% else %}
  82. <div class="button" id="get_started">
  83. <div class="horiz_center">
  84. <div class="vert_center">
  85. Add phone
  86. </div>
  87. <div class="vert_center">
  88. <i class="gg-add"></i>
  89. </div>
  90. </div>
  91. </div>
  92. {% endif %}
  93. {% if skip_creds and not lavhost %}
  94. <div class="button" id="enter_api">
  95. <div class="horiz_center">
  96. <div class="vert_center">
  97. Change API Creds
  98. </div>
  99. <div class="vert_center">
  100. <i class="gg-brackets"></i>
  101. </div>
  102. </div>
  103. </div>
  104. {% endif %}
  105. <span id="block_api_id">
  106. <label class="api_id" for="api_id">Telegram API ID: </label>
  107. <input class="api_id" id="api_id" placeholder="••••" style="width: 4em;">
  108. </span>
  109. <span id="block_api_hash">
  110. <label class="api_hash" for="api_hash">Telegram API hash: </label>
  111. <input class="api_hash" id="api_hash" placeholder="••••••••••••••••••••••••••••••••" style="width: 24em;">
  112. </span>
  113. <span id="block_phone">
  114. <label class="phone" for="phone">Phone: </label>
  115. <input class="phone" id="phone" placeholder="••••••••••••" style="width: 12em;">
  116. </span>
  117. <span id="block_2fa">
  118. <label class="_2fa" for="_2fa">2FA Password: </label>
  119. <input class="_2fa" id="_2fa" placeholder="password" style="width: 12em;" type="password">
  120. </span>
  121. <span id="block_custom_bot">
  122. <label class="custom_bot" for="custom_bot">Inline bot username (E.g. @username_bot): </label>
  123. <input class="custom_bot" id="custom_bot" placeholder="Leave empty to generate automatically"
  124. style="width: 20em;" type="text">
  125. </span>
  126. <span id="block_qr_login">
  127. <div class="qr_outer">
  128. <div class="qr_inner">
  129. <dotlottie-player
  130. autoplay
  131. loop
  132. mode="normal"
  133. src="https://static.hikari.gay/4T7FajtZbx.lottie"
  134. style="width: 100px; height: 100px"
  135. >
  136. </dotlottie-player>
  137. </div>
  138. </div>
  139. <div class="tg_guide">
  140. <ol>
  141. <li>
  142. <span>Open Telegram on your phone</span>
  143. </li>
  144. <li>
  145. <span>Go to <b>Settings</b> → <b>Devices</b> → <b>Link Desktop Device</b></span>
  146. </li>
  147. <li>
  148. <span>Point your phone at this screen to confirm login</span>
  149. </li>
  150. </ol>
  151. </div>
  152. </span>
  153. </div>
  154. <div class="horiz_center">
  155. <div id="continue_btn" class="button">
  156. <div class="horiz_center">
  157. <div class="vert_center">
  158. Continue
  159. </div>
  160. <div class="vert_center">
  161. <i class="gg-chevron-right-o"></i>
  162. </div>
  163. </div>
  164. </div>
  165. <div id="denyqr" class="button">
  166. <div class="horiz_center">
  167. <div class="vert_center">
  168. Auth using phone instead
  169. </div>
  170. <div class="vert_center">
  171. <i class="gg-smartphone"></i>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. <div id="root">
  178. </div>
  179. </div>
  180. <div class="lights">
  181. <div class="light x1"></div>
  182. <div class="light x2"></div>
  183. <div class="light x3"></div>
  184. <div class="light x4"></div>
  185. <div class="light x5"></div>
  186. <div class="light x6"></div>
  187. <div class="light x7"></div>
  188. <div class="light x8"></div>
  189. <div class="light x9"></div>
  190. </div>
  191. <script>
  192. var skip_creds = "{{ skip_creds }}" == "True";
  193. var auth_required = true;
  194. fetch("/check_session", {
  195. method: "POST",
  196. credentials: "include"
  197. })
  198. .then(response => response.text())
  199. .then((response) => {
  200. auth_required = response != "1";
  201. })
  202. </script>
  203. <script src="{{ static("root.js") }}"></script>
  204. {% endblock %}