Tema dt mod


SUBMITTED BY: Buganet

DATE: Aug. 1, 2022, 9:15 p.m.

UPDATED: May 27, 2024, 11:20 a.m.

FORMAT: Text only

SIZE: 32.7 kB

HITS: 2405

  1. <!DOCTYPE html>
  2. <html lang="pt-br">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>ADM ONLINE</title>
  7. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  8. <style>
  9. *{
  10. margin: 0px;
  11. padding: 0px;
  12. box-sizing: border-box;
  13. }
  14. #config-area{
  15. border-radius: 100px;
  16. }
  17. .set-configs {
  18. background-color: #101622;
  19. padding: 10px;
  20. margin-bottom: 5px;
  21. width: 100%;
  22. border-radius: 10px;
  23. }
  24. .set-configs span {
  25. color: #101622;
  26. font-size: large;
  27. }
  28. body,.app{
  29. padding: relative;
  30. height: 100vh;
  31. background-color: #f5f5f5;
  32. flex-direction: column;
  33. justify-content: center;
  34. align-items: center;
  35. }
  36. @media (min-width: 420px) {
  37. body{
  38. width: 360px;
  39. margin: 0px ;
  40. overflow: hidden;
  41. flex-direction: column;
  42. justify-content: center;
  43. }
  44. .container{
  45. width: 360px;
  46. }
  47. }
  48. @media (min-width: 380px) and (max-width: 320px) {
  49. body, .app{
  50. width:100vw;
  51. height: 100vh;
  52. margin: 0;
  53. overflow: hidden;
  54. flex-direction: column;
  55. justify-content: center;
  56. align-items: center;
  57. }
  58. .container{
  59. width: 100%;
  60. }
  61. }
  62. @media (min-width: 380px) and (max-width: 360px) {
  63. body, .app{
  64. width:100vw;
  65. height: 100vh;
  66. margin: 0;
  67. overflow: hidden;
  68. flex-direction: column;
  69. justify-content: center;
  70. align-items: center;
  71. }
  72. .container{
  73. width: 100%;
  74. }
  75. }
  76. .dados{
  77. top: 78%;
  78. background: none;
  79. }
  80. .barSuperior{
  81. width: 100%;
  82. height: 30%;
  83. background-color: #7CDDD7;
  84. display: flex;
  85. position: relative;
  86. justify-content: center;
  87. border-end-end-radius: 28px;
  88. border-end-start-radius: 28px;
  89. z-index: 5;
  90. }
  91. .container{
  92. width: 100% ;
  93. height:40%;
  94. display: flex;
  95. flex-direction: column;
  96. background: none;
  97. justify-content: center;
  98. align-items: center;
  99. position: fixed;
  100. gap: 10px;
  101. top: 45%;
  102. z-index: 2;
  103. }
  104. .selectItens, .Usarname, .Password{
  105. position: relative;
  106. top: -20%;
  107. width: 100%;
  108. height: 45px;
  109. border: 2px solid #999;
  110. border-radius: 7px;
  111. display: flex;
  112. justify-content: space-between;
  113. align-items: center;
  114. }
  115. .ops {
  116. border:2px solid #062931;
  117. background: #101622;
  118. width: 48%;
  119. height: 70px;
  120. display: flex;
  121. justify-content: center;
  122. align-items: center;
  123. color: #ffffff;
  124. text-align: center;
  125. border-radius: 9px;
  126. }
  127. .fi-br-gears{
  128. width: 30px;
  129. height: 30px;
  130. fill: #000;
  131. margin-left: 10px;
  132. }
  133. .fi-rr-angle-double-small-down{
  134. width: 30px;
  135. height: 30px;
  136. fill: #000;
  137. margin-right: 10px;
  138. }
  139. .selectItens button{
  140. width: 85%;
  141. height: 100%;
  142. background: none;
  143. color: #666;
  144. border: none;
  145. text-align: left;
  146. }
  147. .viewItens{
  148. width: 100%;
  149. height: 100%;
  150. background: rgba(0, 0, 0, 0.4);
  151. display: none;
  152. transition: 2s;
  153. top: 0%;
  154. position: fixed;
  155. justify-content: center;
  156. align-items: center;
  157. z-index: 33;
  158. }
  159. .containerViewItens{
  160. width: 90%;
  161. height: 70%;
  162. top: 20%;
  163. background: #171D2B;
  164. border-radius: 10px;
  165. display: flex;
  166. flex-direction: column;
  167. justify-content: center;
  168. align-items: center;
  169. }
  170. .containerBarSuperior{
  171. width: 100%;
  172. height: 30%;
  173. background-color: none;
  174. display: flex;
  175. justify-content: space-between;
  176. align-items: center;
  177. position: absolute;
  178. top: 13%;
  179. z-index: 6;
  180. }
  181. .containerBarSuperior .menu{
  182. width: 35%;
  183. height: 60%;
  184. background-color: #4071F7;
  185. border-radius: 10px;
  186. margin-left: 5%;
  187. }
  188. .containerBarSuperior .Atualizar{
  189. width: 14%;
  190. height: 60%;
  191. background-color: #fff;
  192. border-radius: 12px;
  193. }
  194. .containerBarSuperior .Atualizar svg{
  195. width: 60%;
  196. height: 60%;
  197. fill: #4071F7;
  198. }
  199. .containerBarSuperior .logs svg{
  200. width: 60%;
  201. height: 60%;
  202. fill: #4071F7;
  203. }
  204. .containerBarSuperior .logs{
  205. width: 14%;
  206. height: 60%;
  207. background-color: #fff;
  208. border-radius: 12px;
  209. margin-right: 5%;
  210. }
  211. .ip{
  212. width: 60%;
  213. height: 6%;
  214. background-color: #fff;
  215. border-radius: 12px;
  216. display: flex;
  217. left: 20%;
  218. top: 69%;
  219. justify-content: center;
  220. align-items: center;
  221. position: absolute;
  222. z-index: 6;
  223. }
  224. #ipAddress{
  225. color: blue;
  226. font-size: 14px;
  227. font-weight: 600;
  228. }
  229. .Start{
  230. width: 170px;
  231. height: 170px;
  232. background-color: #ffffff;
  233. border-radius: 50%;
  234. position: absolute;
  235. display: flex;
  236. justify-content: center;
  237. align-items: center;
  238. top: 18%;
  239. left: calc(50% - 85px);
  240. z-index: 12;
  241. }
  242. input{
  243. background: none;
  244. margin-left: -10px;
  245. width: 90%;
  246. height: 100%;
  247. border: none;
  248. outline: none;
  249. }
  250. input::placeholder{
  251. text-align: left;
  252. color: #444;
  253. }
  254. .containerStart{
  255. width: 140px;
  256. height: 140px;
  257. display: flex;
  258. background: linear-gradient(#0FC79E,#0D98ED);
  259. border-radius: 50%;
  260. position: relative;
  261. justify-content: center;
  262. align-items: center;
  263. }
  264. .containerStart span{
  265. position: absolute;
  266. bottom: 0;
  267. top: 130%;
  268. font-size: 14px;
  269. color: #666666;
  270. font-weight: 600;
  271. }
  272. .containerStart .start{
  273. width: 75%;
  274. height: 75%;
  275. background-color: #fff;
  276. border-radius: 50%;
  277. display: flex;
  278. justify-content: center;
  279. align-items: center;
  280. }
  281. .containerStart .start svg{
  282. width: 60%;
  283. height: 60%;
  284. fill: #4071F7;
  285. }
  286. </style>
  287. </head>
  288. <body>
  289. <div class="app">
  290. <div class="barSuperior">
  291. <div class="containerBarSuperior">
  292. <div class="menu" type="button" style="display: flex;justify-content: center; align-items: center; color: #ffffff;">
  293. <div style="position: relative;left: -10%; height: 70%; width: 30%;display: flex; flex-direction: column;align-items: center; justify-content: space-evenly; ">
  294. <div style="position: relative;left:-5%; height: 2px;width: 60%; background-color: #ffffff; border-radius: 2px;"></div>
  295. <div style="position: relative ;left:5%; height: 2px;width: 60%; background-color: #ffffff; border-radius: 2px;">
  296. </div><div style=" position: relative;left: 10%; height: 2px;width: 60%; background-color: #ffffff; border-radius: 2px;"></div>
  297. </div>
  298. Menu</div>
  299. <div class="Atualizar" onclick="app.searchUpdate()" style="display: flex;justify-content: center; align-items: center; color: #ffffff;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="20" height="20">
  300. <g>
  301. <path d="M489.797,256c-10.791-0.141-19.924,7.939-21.099,18.667c-9.959,117.754-113.491,205.138-231.245,195.179 S32.315,356.354,42.275,238.6S155.766,33.462,273.52,43.421c50.983,4.312,98.733,26.75,134.592,63.245h-66.603 c-11.782,0-21.333,9.551-21.333,21.333s9.551,21.333,21.333,21.333h88.384c21.874-0.012,39.604-17.742,39.616-39.616V21.333 C469.509,9.551,459.958,0,448.176,0c-11.782,0-21.333,9.551-21.333,21.333v44.331C321.548-28.425,159.915-19.341,65.826,85.954 s-85.005,266.927,20.29,361.016s266.927,85.005,361.016-20.29c36.575-40.931,59.007-92.547,63.977-147.214 c1.096-11.814-7.593-22.279-19.407-23.375C491.069,256.033,490.434,256.002,489.797,256z"/>
  302. </g></svg></div>
  303. <div class="logs" style="display: flex;justify-content: center; align-items: center; color: #ffffff;" data-bs-toggle="modal"
  304. data-bs-target="#logs" id="logger">
  305. <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 24 24" data-name="Layer 1"><path d="m21 6.243a3.975 3.975 0 0 0 -1.172-2.829l-2.242-2.242a4.022 4.022 0 0 0 -2.828-1.172h-8.758a3 3 0 0 0 -3 3v21h18zm-2.586-1.415a1.923 1.923 0 0 1 .141.172h-2.555v-2.555a1.923 1.923 0 0 1 .172.141zm-13.414 17.172v-19a1 1 0 0 1 1-1h8v5h5v15zm3-13h8v2h-8zm0 4h8v2h-8zm6.018 3.814 1.965.366c-.191 1.047-1.005 2.82-2.848 2.82a3.154 3.154 0 0 1 -1.986-.706c-.314-.223-.424-.294-.662-.294a2.18 2.18 0 0 0 -.916.66l-1.5-1.317a3.749 3.749 0 0 1 2.416-1.343 2.925 2.925 0 0 1 1.821.664 1.235 1.235 0 0 0 .827.336c.623 0 .88-1.173.883-1.186z"/></svg>
  306. </div>
  307. </div>
  308. </div>
  309. <div class="modal fade show" tabindex="-1" role="dialog" id="ToolsModal" style="display: none;">
  310. <div class="modal-dialog modal-dialog-centered" role="document">
  311. <div class="modal-content rounded-3 shadow" style="height: 60%; background-color: #151D2D;">
  312. <div class="modal-header border-bottom-0 pb-0">
  313. <h1 class="modal-title fs-5 text-white">Configurações</h1>
  314. <button style="color: #ffffff; font-size: 30px; background: none; border: none;" type="button" id="closeMenu" >x</button>
  315. </div>
  316. <hr style="background-color: #ffffff; height: 2px;">
  317. <div class="modal-body">
  318. <div style="left: 27.5%; position: relative;" class="ops btn-menu shadow" onclick="startCheckuser()" data-bs-dismiss="modal">Verificar usuario</div><br>
  319. <div class="d-flex justify-content-between mb-2">
  320. <div class="ops btn-menu shadow" onclick="app.openApn()">Abrir Apn</div>
  321. <div class="ops btn-menu shadow" onclick="app.openWebView()">Abrir WebView</div>
  322. </div>
  323. <div class="d-flex justify-content-between mb-2">
  324. <div class="ops btn-menu shadow" onclick="app.openHostShare()">Abrir Roteador</div>
  325. <div class="ops btn-menu shadow" onclick="app.offlineUpdate()">Atualizar via arquivo</div>
  326. </div>
  327. <div class="d-flex justify-content-between mb-2">
  328. <div class="ops btn-menu shadow" onclick="app.restartApp()">Reiniciar aplicativo</div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. <div class="ViewLogs">
  335. <div class="modal fade" tabindex="-1" role="dialog" id="logs">
  336. <div class="modal-dialog modal-dialog-centered" role="document">
  337. <div class="modal-content rounded-3 shadow" style="background: #151D2D;">
  338. <div class="modal-header border-bottom-0 pb-0">
  339. <h1 class="modal-title fs-5 text-white">LOGS</h1>
  340. </div>
  341. <div class="modal-body">
  342. <ul style="color: #ffffff;" id="logList"></ul>
  343. </div>
  344. <div class="modal-footer d-flex justify-content-between p-0">
  345. <button type="button" class="buttonModalClose" style="border: 2px solid #062931; color:#fff; background: #101622; border-radius: 15px; width: 20%;" onclick="app.clearLogs()" >LIMPAR</button>
  346. <button type="button" class="buttonModalClose"style="border: 2px solid #062931;background: #101622;color:#fff; border-radius: 15px; width: 20%;" data-bs-dismiss="modal">FECHAR</button>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. <div class="Start" type="button" onclick="startOrStop();" id="startOrStopButton">
  353. <div class="containerStart">
  354. <div class="start" >
  355. <?xml version="1.0" encoding="UTF-8"?>
  356. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px"id='svg' viewBox="0 0 512.292 512.292" style="enable-background:new 0 0 130.292 130.292;" xml:space="preserve" width="20" height="60">
  357. <g>
  358. <path d="M256.061,0L256.061,0c17.673,0,32,14.327,32,32v106.667c0,17.673-14.327,32-32,32l0,0c-17.673,0-32-14.327-32-32V32 C224.061,14.327,238.387,0,256.061,0z"/>
  359. <path d="M330.727,105.387L330.727,105.387c-0.157,10.742,5.259,20.8,14.315,26.581c80.432,49.143,105.796,154.185,56.652,234.616 S247.51,472.38,167.078,423.237S61.282,269.052,110.426,188.62c14.042-22.982,33.324-42.315,56.269-56.418 c9.211-5.781,14.773-15.92,14.699-26.795l0,0c0.049-17.673-14.238-32.039-31.911-32.088c-6.07-0.017-12.02,1.693-17.155,4.931 C22.233,146.634-11.58,291.318,56.803,401.412s213.067,143.907,323.161,75.524s143.907-213.067,75.524-323.161 c-19.035-30.645-44.879-56.489-75.524-75.524c-14.997-9.461-34.824-4.973-44.285,10.024 C332.447,93.397,330.731,99.33,330.727,105.387z"/>
  360. </g>
  361. </svg>
  362. </div>
  363. <span style="top: 115%;">INSIRA SEU LOGIN</span>
  364. </div>
  365. </div>
  366. const mock = '[{"sorter":6,"color":"#6D08041C","name":"CONFIG","id":1393,"items":[{"mode":"V2RAY - VLESS","sorter":4,"tlsVersion":"TLSv1.2","name":"CONFIG 01","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":11803,"status":"ACTIVE"},{"mode":"SSH_DIRECT","sorter":2,"tlsVersion":"TLSv1.2","name":"CONFIG 02","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":28627,"status":"ACTIVE"},{"mode":"OVPN_PROXY","sorter":23,"tlsVersion":"TLSv1.2","name":"CONFIG 03","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":30001,"status":"ACTIVE"}]},{"sorter":2,"color":"#6D08041C","name":"CONFIG 2","id":1846,"items":[{"mode":"SSH_PROXY","sorter":1,"tlsVersion":"TLSv1.2","name":"CONFIG 01","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":26295,"status":"ACTIVE"}]},{"sorter":4,"color":"#80000000","name":"CONFIG 3","id":3310,"items":[{"mode":"SSH_PROXY","sorter":1,"tlsVersion":"TLSv1.2","name":"CONFIG. TEST","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":29997,"status":"ACTIVE"},{"mode":"OVPN_PROXY","sorter":1,"tlsVersion":"TLSv1.2","name":"CONFIG. TEST 2","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":29998,"status":"ACTIVE"}]}]'
  367. const data = JSON.parse(window?.DtGetConfigs?.execute() || mock)
  368. <div class="container">
  369. <div class="selectItens">
  370. <?xml version="1.0" encoding="UTF-8"?>
  371. <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 24 24" width="20" height="20" style="margin: 10px;"><path d="M10.57,10.99c.23,.13,.48,.19,.73,.19,.53,0,1.04-.28,1.31-.77,.4-.72,.15-1.64-.58-2.04l-.64-.36c.07-.33,.1-.67,.1-1.02s-.04-.69-.1-1.02l.64-.36c.72-.4,.98-1.32,.58-2.04-.4-.72-1.32-.98-2.04-.58l-.65,.36c-.54-.51-1.2-.89-1.92-1.12v-.76c0-.83-.67-1.5-1.5-1.5s-1.5,.67-1.5,1.5v.76c-.72,.23-1.38,.61-1.92,1.12l-.65-.36c-.72-.4-1.64-.15-2.04,.58-.4,.72-.15,1.64,.58,2.04l.64,.36c-.07,.33-.1,.67-.1,1.02s.04,.69,.1,1.02l-.64,.36c-.72,.4-.98,1.32-.58,2.04,.27,.49,.79,.77,1.31,.77,.25,0,.5-.06,.73-.19l.65-.36c.54,.51,1.2,.89,1.92,1.12v.76c0,.83,.67,1.5,1.5,1.5s1.5-.67,1.5-1.5v-.76c.72-.23,1.38-.61,1.92-1.12l.65,.36Zm-4.07-1.99c-1.1,0-2-.9-2-2s.9-2,2-2,2,.9,2,2-.9,2-2,2Zm16.03,9.37l-.64-.36c.07-.33,.1-.67,.1-1.02s-.04-.69-.1-1.02l.64-.36c.72-.4,.98-1.32,.58-2.04-.4-.72-1.32-.98-2.04-.58l-.65,.36c-.54-.51-1.2-.89-1.92-1.12v-.76c0-.83-.67-1.5-1.5-1.5s-1.5,.67-1.5,1.5v.76c-.72,.23-1.38,.61-1.92,1.12l-.65-.36c-.72-.4-1.64-.15-2.04,.58-.4,.72-.15,1.64,.58,2.04l.64,.36c-.07,.33-.1,.67-.1,1.02s.04,.69,.1,1.02l-.64,.36c-.72,.4-.98,1.32-.58,2.04,.27,.49,.79,.77,1.31,.77,.25,0,.5-.06,.73-.19l.65-.36c.54,.51,1.2,.89,1.92,1.12v.76c0,.83,.67,1.5,1.5,1.5s1.5-.67,1.5-1.5v-.76c.72-.23,1.38-.61,1.92-1.12l.65,.36c.23,.13,.48,.19,.73,.19,.53,0,1.04-.28,1.31-.77,.4-.72,.15-1.64-.58-2.04Zm-5.53,.63c-1.1,0-2-.9-2-2s.9-2,2-2,2,.9,2,2-.9,2-2,2Z"/></svg>
  372. <button style="margin-left: -15px; margin-top: 5px;" class="form-control btn-custom mb-2 config-button" value="Selecione um Servidor" id="configModalButton" data-bs-toggle="modal" data-bs-target="#configModal" >Escolha um servidor</button>
  373. <?xml version="1.0" encoding="UTF-8"?>
  374. <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 24 24" width="20" height="20" style="margin: 5px;"><path d="M12,19c-1.049,0-2.036-.409-2.778-1.151l-3.925-3.875c-.393-.388-.397-1.021-.009-1.414,.387-.394,1.021-.396,1.414-.009l3.929,3.88c.737,.737,2.003,.733,2.731,.004l3.935-3.884c.392-.388,1.023-.385,1.414,.009,.388,.393,.384,1.026-.01,1.414l-3.93,3.88c-.736,.738-1.723,1.146-2.772,1.146Zm.706-5.327l5.999-5.964c.392-.389,.394-1.022,.004-1.414-.39-.393-1.022-.395-1.414-.004l-5.294,5.263L6.705,6.291c-.391-.389-1.024-.386-1.415,.004-.389,.392-.387,1.025,.004,1.415l6.001,5.964c.195,.194,.45,.291,.705,.291s.51-.097,.705-.291Z"/></svg>
  375. </div>
  376. <div class="Usarname">
  377. <?xml version="1.0" encoding="UTF-8"?>
  378. <!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
  379. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512; margin-left:10px ;position:relative" xml:space="preserve" width="20" height="20">
  380. <g>
  381. <circle cx="256" cy="128" r="128"/>
  382. <path d="M256,298.667c-105.99,0.118-191.882,86.01-192,192C64,502.449,73.551,512,85.333,512h341.333 c11.782,0,21.333-9.551,21.333-21.333C447.882,384.677,361.99,298.784,256,298.667z"/>
  383. </g>
  384. </svg>
  385. <input type="text" style="margin-left:5px;" id="username" placeholder="Nome de usuario">
  386. </div>
  387. <div class="Password">
  388. <?xml version="1.0" encoding="UTF-8"?>
  389. <!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
  390. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512; margin-left:10px ;position:relative" xml:space="preserve" width="20" height="20">
  391. <g>
  392. <path d="M405.333,179.712v-30.379C405.333,66.859,338.475,0,256,0S106.667,66.859,106.667,149.333v30.379 c-38.826,16.945-63.944,55.259-64,97.621v128C42.737,464.214,90.452,511.93,149.333,512h213.333 c58.881-0.07,106.596-47.786,106.667-106.667v-128C469.278,234.971,444.159,196.657,405.333,179.712z M277.333,362.667 c0,11.782-9.551,21.333-21.333,21.333c-11.782,0-21.333-9.551-21.333-21.333V320c0-11.782,9.551-21.333,21.333-21.333 c11.782,0,21.333,9.551,21.333,21.333V362.667z M362.667,170.667H149.333v-21.333c0-58.91,47.756-106.667,106.667-106.667 s106.667,47.756,106.667,106.667V170.667z"/>
  393. </g>
  394. </svg>
  395. <input type="password" style="width: 68%; margin-left: -15px;" id="password" placeholder="Password"> <button style="border: none; background: none; margin: 10px;" id="mostrarSenha"><svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 24 24" width="25" height="25"><path d="M23.821,11.181v0C22.943,9.261,19.5,3,12,3S1.057,9.261.179,11.181a1.969,1.969,0,0,0,0,1.64C1.057,14.739,4.5,21,12,21s10.943-6.261,11.821-8.181A1.968,1.968,0,0,0,23.821,11.181ZM12,18a6,6,0,1,1,6-6A6.006,6.006,0,0,1,12,18Z"/><circle cx="12" cy="12" r="4"/></svg></button>
  396. </div>
  397. </div>
  398. <div class="info">
  399. <div class="status"></div>
  400. <div class="ip" style="width:80%;left: 10%; padding: 10px; justify-content: space-between;">
  401. <?xml version="1.0" encoding="UTF-8"?>
  402. <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" width="30" height="30" style="margin: 10px;" data-name="Layer 1" viewBox="0 0 24 24">
  403. <path d="m20,12h-1c0-3.859-3.14-7-7-7v-1c4.411,0,8,3.589,8,8Zm-5,0h1c0-2.206-1.794-4-4-4v1c1.654,0,3,1.346,3,3ZM12,0v1c6.065,0,11,4.935,11,11h1C24,5.383,18.617,0,12,0Zm-1.713,14.42l6.42,6.42-.354.354c-1.868,1.867-4.321,2.802-6.774,2.802s-4.906-.935-6.774-2.802c-3.735-3.735-3.735-9.812,0-13.548l.354-.354,6.42,6.42,2.067-2.067.707.707-2.067,2.067Zm4.996,6.411L3.169,8.718c-2.998,3.364-2.883,8.543.343,11.77,3.228,3.228,8.405,3.34,11.77.344Z"/>
  404. </svg>
  405. <span>REDE:</span> <span id="ipAddress" style="z-index: 100; width: 90%; height: 100%; display: flexbox;justify-content: center; font-size: 20px; align-items: center; text-align: left; position:relative;margin-left: 5px;"></span>
  406. </div>
  407. <div class="dados" style="margin:10px; position: fixed; width: 82%;left: 10%; font-size: 25px; font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; color :red;" >
  408. <div style="height: 35px; margin-top: 15px; width: 60%; position: relative; left: 14%; display: flex; align-items: center; justify-content: center;" id="state">
  409. </div>
  410. </div>
  411. </div>
  412. </body>
  413. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  414. <script>
  415. const senhaInput = document.getElementById("password");
  416. const mostrarSenhaButton = document.getElementById("mostrarSenha");
  417. mostrarSenhaButton.addEventListener("click", function () {
  418. if (senhaInput.type === "password") {
  419. senhaInput.type = "text";
  420. } else {
  421. senhaInput.type = "password";
  422. }
  423. });
  424. function mostrarEnderecoIP() {
  425. var ipAddress = window.app.getIPuser();
  426. document.getElementById("ipAddress").textContent = ipAddress;
  427. }
  428. var intervalId = setInterval(mostrarEnderecoIP, 1000);
  429. setTimeout(function() {
  430. clearInterval(intervalId);
  431. }, 5000);
  432. // Também pode chamar a função uma vez quando a página é carregada inicialmente
  433. window.onload = mostrarEnderecoIP;
  434. const menu = document.querySelector('.menu');
  435. menu.addEventListener('click', function () {
  436. const modal = document.getElementById('ToolsModal');
  437. modal.style.display = 'block';
  438. });
  439. const closeMenu = document.getElementById('closeMenu');
  440. closeMenu.addEventListener('click', function () {
  441. const modal = document.getElementById('ToolsModal');
  442. modal.style.display = 'none';
  443. });
  444. const logoImg = document.getElementById("logoImg");
  445. //const rodapeImg = document.getElementById("rodapeImg");
  446. const configModalButton = document.getElementById("configModalButton");
  447. const user = document.getElementById("username");
  448. const pass = document.getElementById("password");
  449. const startOrStopButton = document.getElementById("startOrStopButton");
  450. const state = document.getElementById("state");
  451. function loadLogs() {
  452. var logList = document.getElementById("logList");
  453. var logs = JSON.parse(app.getlogs())
  454. var formattedLogs = '';
  455. logs.forEach(item => {
  456. formattedLogs += '<li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">';
  457. formattedLogs += item.TIME;
  458. formattedLogs += '</li>';
  459. });
  460. logList.innerHTML = '<ul class="list-group">' + formattedLogs + '</ul>';
  461. }
  462. var modal = new bootstrap.Modal(document.getElementById('configModal'));
  463. const serverOptions = document.getElementById('serverOptions');
  464. var servers = JSON.parse(app.getJsonServers());
  465. function createServerCard(server) {
  466. const card = document.createElement('div');
  467. card.classList.add('set-configs');
  468. card.style.backgroundColor = "rgba(255,255,255,0.4)";
  469. var configImage = document.createElement('img');
  470. configImage.style.cssText = "width: 30px; height: 30px; margin-right: 10px; border-radius: 50%;";
  471. configImage.src = server.ConfigImage;
  472. const cardBody = document.createElement('div');
  473. cardBody.classList.add('card-body');
  474. const cardTitle = document.createElement('h5');
  475. cardTitle.classList.add('card-title');
  476. const configName = document.createElement('span');
  477. configName.textContent = server.ConfigName;
  478. cardTitle.appendChild(configImage);
  479. cardTitle.appendChild(configName);configModalButton
  480. cardBody.appendChild(cardTitle);
  481. card.appendChild(cardBody);
  482. card.addEventListener('click', function () {
  483. selectServer(server);
  484. });
  485. return card;
  486. }
  487. function selectServer(server) {
  488. configModalButton.value = server.ConfigName;
  489. const configButton = document.getElementById("");
  490. app.returnConfigId(server.ConfigId);
  491. // Define o valor do elemento operadoraatx
  492. const operadoraatxElement = document.getElementById("configModalButton");
  493. operadoraatxElement.style.color = "#000000";
  494. operadoraatxElement.textContent = server.ConfigName;
  495. // Armazena o objeto server no localStorage
  496. localStorage.setItem('configSelecionada', JSON.stringify(server));
  497. modal.hide();
  498. }
  499. servers.forEach(function (server) {
  500. const card = createServerCard(server);
  501. serverOptions.appendChild(card);
  502. });
  503. function startOrStop() {
  504. if (user.value != "" && pass.value != "") {
  505. localStorage.setItem('usuario', user.value);
  506. localStorage.setItem('senha', pass.value);
  507. app.setUserAndPass(user.value, pass.value);
  508. }
  509. app.startOrStop();
  510. }
  511. var previousLogs = [];
  512. function checkAndLoadLogs() {
  513. var logs = JSON.parse(app.getlogs());
  514. if (!arraysAreEqual(logs, previousLogs)) {
  515. previousLogs = logs;
  516. loadLogs();
  517. }
  518. }
  519. function arraysAreEqual(arr1, arr2) {
  520. if (arr1.length !== arr2.length) {
  521. return false;
  522. }
  523. for (var i = 0; i < arr1.length; i++) {
  524. if (arr1[i].TIME !== arr2[i].TIME) {
  525. return false;
  526. }
  527. }
  528. return true;
  529. }
  530. async function startCheckuser() {
  531. try {
  532. const dataString = await app.getCheckuserDados();
  533. console.log("CHECKUSER: " + dataString);
  534. if (dataString !== "null") {
  535. const data = JSON.parse(dataString);
  536. var myModal = new bootstrap.Modal(document.getElementById('checkuserModal'));
  537. myModal.show();
  538. const strCheckValidade =
  539. `<span style="color: white;">Usuario: </span> <span style="color: green;">${data.username}</span><br/>
  540. <span style="color: white;">Expira em: </span><span style="color: green;">${data.expiration_date}</span><br/>
  541. <span style="color: white;">Dias Restantes: </span><span style="color: green;">${data.expiration_days}</span><br/>
  542. <span style="color: white;">Conectados: </span><span style="color: green;">${data.count_connection} / ${data.limiter_user}</span>`;
  543. document.getElementById('checkuser').innerHTML = strCheckValidade;
  544. }
  545. } catch (error) {
  546. console.error("Erro ao buscar dados do usuário:", error);
  547. }
  548. }
  549. var previousState = null;
  550. const start = document.querySelector('#svg');
  551. function updateState() {
  552. var currentState = app.getState();
  553. if (currentState !== previousState) {
  554. if (currentState == "Conectado") {
  555. state.innerHTML = "<span style='color: green;'>"+ currentState +"</span>";
  556. startCheckuser();
  557. start.style.fill = "#01FF2A";
  558. } else if (currentState == "Iniciando" || currentState == "Autenticando" || currentState == "Conectando") {
  559. state.innerHTML = "<span style='color: orange;'>" + currentState + "</span>";
  560. start.style.fill = "#FFB801";
  561. } else if (currentState == "Reconectando" || currentState == "Desconectado") {
  562. state.innerHTML = "<span style='color: red;'>" + currentState + "</span>";
  563. } else {
  564. state.innerHTML = "<span style='color: orange;'>" + currentState + "</span>";
  565. start.style.fill = "#4071F7";
  566. }
  567. previousState = currentState;
  568. }
  569. }
  570. setInterval(function() {
  571. updateState();
  572. checkAndLoadLogs();
  573. }, 0);
  574. document.addEventListener("DOMContentLoaded", function () {
  575. // Verificar se há usuário e senha salvos no localStorage
  576. const usuarioSalvo = localStorage.getItem('usuario');
  577. const senhaSalva = localStorage.getItem('senha');
  578. const configSalva = localStorage.getItem('configSelecionada');
  579. if (configSalva) {
  580. const configSelecionada = JSON.parse(configSalva);
  581. // Atualize a interface do usuário com a configuração salva
  582. configModalButton.value = configSelecionada.ConfigName;
  583. // Você pode fazer outras ações relacionadas à configuração aqui, se necessário
  584. }
  585. if (usuarioSalvo && senhaSalva) {
  586. // Preencher os campos de usuário e senha com os valores salvos
  587. user.value = usuarioSalvo;
  588. pass.value = senhaSalva;
  589. }
  590. });
  591. logoImg.src = app.getLogoUrl();
  592. document.body.style.backgroundImage = `url('${app.getBackUrl()}')`;
  593. document.body.style.backgroundSize = 'cover';
  594. document.body.style.backgroundRepeat = 'no-repeat';
  595. document.body.style.backgroundPosition = 'center';
  596. const selectItens = document.querySelector('.selectItens');
  597. const viewItens = document.querySelector('.viewItens');
  598. selectItens.addEventListener('click',()=>{
  599. viewItens.style.display = 'flex';
  600. })
  601. viewItens.addEventListener('click',()=>{
  602. viewItens.style.display = 'none';
  603. })
  604. </script>
  605. </html>

comments powered by Disqus