root.jinja2 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!--
  2. █ █ ▀ █▄▀ ▄▀█ █▀█ ▀ ▄▀█ ▀█▀ ▄▀█ █▀▄▀█ ▄▀█
  3. █▀█ █ █ █ █▀█ █▀▄ █ ▄ █▀█ █ █▀█ █ ▀ █ █▀█
  4. Copyright 2022 t.me/hikariatama
  5. Licensed under the GNU GPLv3
  6. -->
  7. {% extends "base.jinja2" %}
  8. {% block head %}
  9. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
  10. <script src="//cdnjs.cloudflare.com/ajax/libs/bodymovin/5.8.1/lottie.min.js"></script>
  11. <link href="//cdn.jsdelivr.net/npm/css.gg/icons/all.css" rel="stylesheet">
  12. <link rel="stylesheet" href="{{ static("base.css") }}">
  13. <style>
  14. .button i {
  15. margin-left: .5em;
  16. }
  17. .button {
  18. margin: 10px 5px;
  19. }
  20. .mountains {
  21. display: none;
  22. }
  23. #tg_icon {
  24. height: 40vh;
  25. }
  26. .auth {
  27. position: absolute;
  28. top: 0;
  29. bottom: 0;
  30. right: 0;
  31. left: 0;
  32. margin: auto;
  33. width: 70%;
  34. height: 60%;
  35. padding: 2rem;
  36. display: none;
  37. }
  38. @media screen and (max-width: 736px) {
  39. .auth {
  40. width: 100%;
  41. height: 100%;
  42. margin: 0;
  43. }
  44. }
  45. .confirm_auth {
  46. font-size: 36px;
  47. text-align: center;
  48. color: #fff;
  49. padding: 10px 0;
  50. }
  51. .waiting_for_auth {
  52. font-size: 22px;
  53. text-align: center;
  54. color: #fff;
  55. padding: 15px 0;
  56. }
  57. .finish_block {
  58. display: none;
  59. }
  60. </style>
  61. {% endblock %}
  62. {% block content %}
  63. {% endblock %}
  64. {% block after %}
  65. <div class="blur auth vert_center">
  66. <div id="tg_icon"></div>
  67. <div class="waiting_for_auth">Waiting for permission...</div>
  68. <div class="confirm_auth">Please, confirm action in <span style="color:#28a0dc">Telegram</span></div>
  69. </div>
  70. <div class="wrapper">
  71. <div class="blur main finish_block">
  72. <div id="installation_icon"></div>
  73. <div class="title">Hikka is installed</div>
  74. <div class="description">
  75. {% if heroku %}
  76. Wait for a while, Hikka will be ready in a few minutes.
  77. {% else %}
  78. Hikka is ready to use.
  79. {% endif %}
  80. </div>
  81. </div>
  82. <div class="blur main installation">
  83. <div class="title">Hikka</div>
  84. <div class="description">Fresh and cute<br><span style="color:#28a0dc">Telegram</span> userbot.<br><span style="color: #18cc18; display: none" class="authorized">Authorized!</span></div>
  85. <div class="center">
  86. {% if not tg_done %}
  87. <div class="button" id="get_started">
  88. <div class="horiz_center">
  89. <div class="vert_center">
  90. Get started
  91. </div>
  92. <div class="vert_center">
  93. <i class="gg-arrow-right-r"></i>
  94. </div>
  95. </div>
  96. </div>
  97. {% elif not lavhost %}
  98. <div class="button" id="get_started">
  99. <div class="horiz_center">
  100. <div class="vert_center">
  101. Add phone
  102. </div>
  103. <div class="vert_center">
  104. <i class="gg-add-r"></i>
  105. </div>
  106. </div>
  107. </div>
  108. {% endif %}
  109. {% if skip_creds and not lavhost %}
  110. <div class="button" id="enter_api">
  111. <div class="horiz_center">
  112. <div class="vert_center">
  113. Change API Creds
  114. </div>
  115. <div class="vert_center">
  116. <i class="gg-brackets"></i>
  117. </div>
  118. </div>
  119. </div>
  120. {% endif %}
  121. <span id="block_api_id">
  122. <label class="api_id" for="api_id">Telegram API ID: </label>
  123. <input class="api_id" id="api_id" placeholder="••••" style="width: 4em;">
  124. </span>
  125. <span id="block_api_hash">
  126. <label class="api_hash" for="api_hash">Telegram API hash: </label>
  127. <input class="api_hash" id="api_hash" placeholder="••••••••••••••••••••••••••••••••" style="width: 24em;">
  128. </span>
  129. <span id="block_phone">
  130. <label class="phone" for="phone">Phone: </label>
  131. <input class="phone" id="phone" placeholder="••••••••••••" style="width: 12em;">
  132. </span>
  133. <span id="block_2fa">
  134. <label class="_2fa" for="_2fa">2FA Password: </label>
  135. <input class="_2fa" id="_2fa" placeholder="password" style="width: 12em;" type="password">
  136. </span>
  137. <span id="block_custom_bot">
  138. <label class="custom_bot" for="custom_bot">Inline bot username (E.g. @username_bot): </label>
  139. <input class="custom_bot" id="custom_bot" placeholder="Leave empty to generate automatically" style="width: 20em;" type="text">
  140. </span>
  141. </div>
  142. <div class="horiz_center">
  143. <div id="continue_btn" class="button">
  144. <div class="horiz_center">
  145. <div class="vert_center">
  146. Continue
  147. </div>
  148. <div class="vert_center">
  149. <i class="gg-arrow-right-r"></i>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. <div id="root">
  156. </div>
  157. </div>
  158. <script>
  159. var skip_creds = "{{ skip_creds }}" == "True";
  160. var auth_required = true;
  161. fetch("/check_session", {
  162. method: "POST",
  163. credentials: "include"
  164. })
  165. .then(response => response.text())
  166. .then((response) => {
  167. auth_required = response != "1";
  168. })
  169. </script>
  170. <script src="{{ static("root.js") }}"></script>
  171. <script src="{{ static("blackhole.js") }}"></script>
  172. {% if okteto %}
  173. <script src="{{ static("okteto.js") }}"></script>
  174. {% endif %}
  175. {% endblock %}