root.jinja2 6.8 KB

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