root.jinja2 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. {% endblock %}
  14. {% block content %}
  15. {% endblock %}
  16. {% block after %}
  17. <div class="bg">
  18. <div class="bg_inner"></div>
  19. </div>
  20. <div class="blur auth vert_center">
  21. <div id="tg_icon"></div>
  22. <div class="waiting_for_auth">Waiting for permission...</div>
  23. <div class="confirm_auth">Please, confirm action in <span style="color:#28a0dc">Telegram</span></div>
  24. </div>
  25. <div class="auth-code-form blur">
  26. <div id="monkey"></div>
  27. <div id="monkey-close"></div>
  28. <span class="code-caption">Enter the code you recieved from Telegram</span>
  29. <input type="text" class="code-input" inputmode="numeric" autocomplete="off">
  30. </div>
  31. <div class="wrapper">
  32. <div class="blur main finish_block">
  33. <div id="installation_icon"></div>
  34. <div class="title">Hikka is installed</div>
  35. <div class="description">
  36. Hikka is ready to use. You can close this page now.
  37. <br>
  38. <span style="font-size: 24px;">Check <span style="color:#28a0dc">Telegram</span> for a message from your <b>inline
  39. bot</b></span>
  40. </div>
  41. </div>
  42. <div class="blur main installation">
  43. <div class="title">Hikka</div>
  44. <div class="description"><span style="color:#28a0dc">Awesomeness</span> is in your hands<br><span
  45. style="color: #18cc18; display: none" class="authorized">Authorized!</span></div>
  46. <div class="center">
  47. {% if not tg_done %}
  48. <div class="button" id="get_started">
  49. <div class="horiz_center">
  50. <div class="vert_center">
  51. Get started
  52. </div>
  53. <div class="vert_center">
  54. <i class="gg-arrow-right-r"></i>
  55. </div>
  56. </div>
  57. </div>
  58. {% elif not lavhost %}
  59. <div class="button" id="get_started">
  60. <div class="horiz_center">
  61. <div class="vert_center">
  62. Add phone
  63. </div>
  64. <div class="vert_center">
  65. <i class="gg-add"></i>
  66. </div>
  67. </div>
  68. </div>
  69. {% endif %}
  70. {% if skip_creds and not lavhost %}
  71. <div class="button" id="enter_api">
  72. <div class="horiz_center">
  73. <div class="vert_center">
  74. Change API Creds
  75. </div>
  76. <div class="vert_center">
  77. <i class="gg-brackets"></i>
  78. </div>
  79. </div>
  80. </div>
  81. {% endif %}
  82. <span id="block_api_id">
  83. <label class="api_id" for="api_id">Telegram API ID: </label>
  84. <input class="api_id" id="api_id" placeholder="••••" style="width: 4em;">
  85. </span>
  86. <span id="block_api_hash">
  87. <label class="api_hash" for="api_hash">Telegram API hash: </label>
  88. <input class="api_hash" id="api_hash" placeholder="••••••••••••••••••••••••••••••••" style="width: 24em;">
  89. </span>
  90. <span id="block_phone">
  91. <label class="phone" for="phone">Phone: </label>
  92. <input class="phone" id="phone" placeholder="••••••••••••" style="width: 12em;">
  93. </span>
  94. <span id="block_2fa">
  95. <label class="_2fa" for="_2fa">2FA Password: </label>
  96. <input class="_2fa" id="_2fa" placeholder="password" style="width: 12em;" type="password">
  97. </span>
  98. <span id="block_custom_bot">
  99. <label class="custom_bot" for="custom_bot">Inline bot username (E.g. @username_bot): </label>
  100. <input class="custom_bot" id="custom_bot" placeholder="Leave empty to generate automatically"
  101. style="width: 20em;" type="text">
  102. </span>
  103. </div>
  104. <div class="horiz_center">
  105. <div id="continue_btn" class="button">
  106. <div class="horiz_center">
  107. <div class="vert_center">
  108. Continue
  109. </div>
  110. <div class="vert_center">
  111. <i class="gg-chevron-right-o"></i>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div id="root">
  118. </div>
  119. </div>
  120. <div class="lights">
  121. <div class="light x1"></div>
  122. <div class="light x2"></div>
  123. <div class="light x3"></div>
  124. <div class="light x4"></div>
  125. <div class="light x5"></div>
  126. <div class="light x6"></div>
  127. <div class="light x7"></div>
  128. <div class="light x8"></div>
  129. <div class="light x9"></div>
  130. </div>
  131. <script>
  132. var skip_creds = "{{ skip_creds }}" == "True";
  133. var auth_required = true;
  134. fetch("/check_session", {
  135. method: "POST",
  136. credentials: "include"
  137. })
  138. .then(response => response.text())
  139. .then((response) => {
  140. auth_required = response != "1";
  141. })
  142. </script>
  143. <script src="{{ static("root.js") }}"></script>
  144. {% if okteto %}
  145. <script src="{{ static("okteto.js") }}"></script>
  146. {% endif %}
  147. {% endblock %}