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: 52.4 kB

HITS: 2405

  1. <!DOCTYPE html>
  2. <html lang="pt-BR">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>PicaPau</title>
  8. <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
  9. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
  10. integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
  11. <script type="text/javascript"
  12. src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
  13. integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
  14. crossorigin="anonymous"></script>
  15. <link rel='stylesheet'
  16. href='https://cdn-uicons.flaticon.com/2.0.0/uicons-regular-rounded/css/uicons-regular-rounded.css'>
  17. <style>
  18. @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
  19. :root {
  20. /*------------------------------------------------------------------------EDITE SOMENTE AQUI INICIAL-----------------------------------------------------------------------------*/
  21. /* -------------- LOGO -----------------------------------*/
  22. --logo-img-url: url(https://i.ibb.co/TmY8kj2/5a1cede541bb76-5518196215118453492692.png);
  23. /* Cria uma sombra na LOGO */
  24. /*
  25. --shadow1-offset-x: -5px;
  26. --shadow1-offset-y: 8px;
  27. --shadow1-blur: 3px;
  28. --shadow1-color: black;
  29. /*
  30. /*------------------------------------------------------------------------*/
  31. /*-------------------fundo-----------------------------*/
  32. --background-img: url(https://i.ibb.co/K9vFWrG/547255-adapted-1080x2340.jpg);
  33. /*Quadrados Coloridos*/
  34. /*
  35. --cor1: #009c3b;
  36. --cor2: #ffdf00 ;
  37. --cor3: #002776 ;
  38. --cor4: #ffffff00;
  39. /*
  40. /* Valor padrão para o desfoque dos quadrados */
  41. --blur-amount: 15px;
  42. /*------------------------------------------------------------------------*/
  43. /*Ondas Coloridas*/
  44. --onda1:#009c3b ;
  45. --onda2: #ffdf00;
  46. --onda3: #002776;
  47. /*--cor-background: #000000;*/
  48. /*------------------------------------------------------------------------*/
  49. /* Valor padrão para o desfoque do vidro */
  50. --blur-amount2: 5px;
  51. --vidro-color: rgba(0, 0, 0, 0.158);
  52. /* Cria uma sombra no Vidro */
  53. /*
  54. --shadow-offset-x: -5px;
  55. --shadow-offset-y: 8px;
  56. --shadow-blur: 3px;
  57. --shadow-color: black;
  58. */
  59. /*------------------------------------------------------------------------*/
  60. /*Cores Dos Botao de iniciar*/
  61. --cor-gradiente-nav-inicial: #009c3c44;
  62. --cor-gradiente-nav-final: #ffdd0050;
  63. --cor-icon-config: #ffffff;
  64. /*------------------------------------------------------------------------*/
  65. /*Cores Dos Botao de conectar*/
  66. --cor-gradiente-btstart-incial: #009c3c44;
  67. --cor-gradiente-btstart-final: #ffdd0050;
  68. /*------------------------------------------------------------------------*/
  69. /*Cores Dos icones e TexTo*/
  70. --text-color: #ffffff;
  71. --icon-color: #ffffff;
  72. /*------------------------------------------------------------------------*/
  73. /*Cores Dos config*/
  74. --cor-text-config: #ffffff;
  75. --cor-gradiente-config-incial: #009c3c44;
  76. --cor-gradiente-config-final: #ffdd0050;
  77. /*------------------------------------------------------------------------EDITE SOMENTE AQUI FINALLLL-----------------------------------------------------------------------------*/
  78. --input-border-radius: 5px;
  79. --input-background-color: #0a091a55;
  80. --card-border-radius: 5px;
  81. --card-background-color: #0b092868;
  82. --btn-background-color: #0a091a55;
  83. --btn-border-radius: 15px;
  84. --modal-background-color: #0b092868;
  85. }
  86. * {
  87. margin: 0;
  88. padding: 0;
  89. box-sizing: border-box;
  90. font-family: 'Roboto', sans-serif;
  91. }
  92. body {
  93. height: 100vh;
  94. display: flex;
  95. flex-direction: column;
  96. align-items: center;
  97. justify-content: center;
  98. background-repeat: no-repeat;
  99. background-size: cover;
  100. background-color: var(--cor-background);
  101. }
  102. .circles {
  103. position: absolute;
  104. top: 0;
  105. left: 0;
  106. width: 100%;
  107. height: 100%;
  108. overflow: hidden;
  109. }
  110. .circles li {
  111. position: absolute;
  112. display: block;
  113. list-style: none;
  114. width: 20px;
  115. height: 20px;
  116. background-color: var(--cor1);
  117. background-image: linear-gradient(225deg, var(--cor2) 10%, var(--cor3) 50%, var(--cor4) 100%);
  118. backdrop-filter: blur(15px);
  119. animation: animate 5s linear infinite;
  120. bottom: -150px;
  121. }
  122. .circles li:nth-child(1) {
  123. left: 25%;
  124. width: 80px;
  125. height: 80px;
  126. animation-delay: 0s;
  127. }
  128. .circles li:nth-child(2) {
  129. left: 10%;
  130. width: 20px;
  131. height: 20px;
  132. animation-delay: 2s;
  133. animation-duration: 12s;
  134. }
  135. .circles li:nth-child(3) {
  136. left: 70%;
  137. width: 20px;
  138. height: 20px;
  139. animation-delay: 4s;
  140. }
  141. .circles li:nth-child(4) {
  142. left: 40%;
  143. width: 60px;
  144. height: 60px;
  145. animation-delay: 0s;
  146. animation-duration: 18s;
  147. }
  148. .circles li:nth-child(5) {
  149. left: 65%;
  150. width: 20px;
  151. height: 20px;
  152. animation-delay: 0s;
  153. }
  154. .circles li:nth-child(6) {
  155. left: 75%;
  156. width: 110px;
  157. height: 110px;
  158. animation-delay: 3s;
  159. }
  160. .circles li:nth-child(7) {
  161. left: 35%;
  162. width: 150px;
  163. height: 150px;
  164. animation-delay: 7s;
  165. }
  166. .circles li:nth-child(8) {
  167. left: 50%;
  168. width: 25px;
  169. height: 25px;
  170. animation-delay: 15s;
  171. animation-duration: 45s;
  172. }
  173. .circles li:nth-child(9) {
  174. left: 20%;
  175. width: 15px;
  176. height: 15px;
  177. animation-delay: 2s;
  178. animation-duration: 35s;
  179. }
  180. .circles li:nth-child(10) {
  181. left: 85%;
  182. width: 150px;
  183. height: 150px;
  184. animation-delay: 0s;
  185. animation-duration: 11s;
  186. }
  187. @keyframes animate {
  188. 0% {
  189. transform: translateY(0) rotate(0deg);
  190. opacity: 1;
  191. border-radius: 0;
  192. }
  193. 100% {
  194. transform: translateY(-1000px) rotate(720deg);
  195. opacity: 0;
  196. border-radius: 50%;
  197. }
  198. }
  199. /*waves****************************/
  200. .box {
  201. position: fixed;
  202. top: 0;
  203. transform: rotate(80deg);
  204. left: 0;
  205. }
  206. .wave {
  207. position: fixed;
  208. top: 0;
  209. left: 0;
  210. opacity: 0.9;
  211. position: absolute;
  212. top: 3%;
  213. left: 10%;
  214. background: var(--onda3);
  215. width: 1000px;
  216. height: 1000px;
  217. margin-left: -50px;
  218. margin-top: -200px;
  219. transform-origin: 50% 48%;
  220. border-radius: 43%;
  221. animation: drift 7000ms infinite linear;
  222. }
  223. .wave.-three {
  224. animation: drift 7500ms infinite linear;
  225. position: fixed;
  226. opacity: 0.9;
  227. background-color: var(--onda1);
  228. }
  229. .wave.-two {
  230. animation: drift 5500ms infinite linear;
  231. opacity: 0.9;
  232. background: var(--onda2);
  233. position: fixed;
  234. }
  235. .box:after {
  236. content: '';
  237. display: block;
  238. left: 0;
  239. top: 0;
  240. width: 100%;
  241. height: 100%;
  242. z-index: 11;
  243. transform: translate3d(0, 0, 0);
  244. }
  245. @keyframes drift {
  246. from {
  247. transform: rotate(0deg);
  248. }
  249. from {
  250. transform: rotate(360deg);
  251. }
  252. }
  253. /*LOADING SPACE*/
  254. .contain {
  255. animation-delay: 4s;
  256. z-index: 1000;
  257. position: fixed;
  258. top: 0;
  259. left: 0;
  260. bottom: 0;
  261. right: 0;
  262. display: -webkit-box;
  263. display: -ms-flexbox;
  264. display: flex;
  265. -ms-flex-flow: row nowrap;
  266. flex-flow: row nowrap;
  267. -webkit-box-pack: center;
  268. -ms-flex-pack: center;
  269. justify-content: center;
  270. -webkit-box-align: center;
  271. -ms-flex-align: center;
  272. align-items: center;
  273. background: #25a7d7;
  274. background: -webkit-linear-gradient(#25a7d7, #2962FF);
  275. background: linear-gradient(#25a7d7, #25a7d7);
  276. }
  277. .icon {
  278. width: 100px;
  279. height: 100px;
  280. margin: 0 5px;
  281. }
  282. /*Animation*/
  283. .icon:nth-child(2) img {
  284. -webkit-animation-delay: 0.2s;
  285. animation-delay: 0.2s
  286. }
  287. .icon:nth-child(3) img {
  288. -webkit-animation-delay: 0.3s;
  289. animation-delay: 0.3s
  290. }
  291. .icon:nth-child(4) img {
  292. -webkit-animation-delay: 0.4s;
  293. animation-delay: 0.4s
  294. }
  295. .icon img {
  296. -webkit-animation: anim 2s ease infinite;
  297. animation: anim 2s ease infinite;
  298. -webkit-transform: scale(0, 0) rotateZ(180deg);
  299. transform: scale(0, 0) rotateZ(180deg);
  300. }
  301. @-webkit-keyframes anim {
  302. 0% {
  303. -webkit-transform: scale(0, 0) rotateZ(-90deg);
  304. transform: scale(0, 0) rotateZ(-90deg);
  305. opacity: 0
  306. }
  307. 30% {
  308. -webkit-transform: scale(1, 1) rotateZ(0deg);
  309. transform: scale(1, 1) rotateZ(0deg);
  310. opacity: 1
  311. }
  312. 50% {
  313. -webkit-transform: scale(1, 1) rotateZ(0deg);
  314. transform: scale(1, 1) rotateZ(0deg);
  315. opacity: 1
  316. }
  317. 80% {
  318. -webkit-transform: scale(0, 0) rotateZ(90deg);
  319. transform: scale(0, 0) rotateZ(90deg);
  320. opacity: 0
  321. }
  322. }
  323. @keyframes anim {
  324. 0% {
  325. -webkit-transform: scale(0, 0) rotateZ(-90deg);
  326. transform: scale(0, 0) rotateZ(-90deg);
  327. opacity: 0
  328. }
  329. 30% {
  330. -webkit-transform: scale(1, 1) rotateZ(0deg);
  331. transform: scale(1, 1) rotateZ(0deg);
  332. opacity: 1
  333. }
  334. 50% {
  335. -webkit-transform: scale(1, 1) rotateZ(0deg);
  336. transform: scale(1, 1) rotateZ(0deg);
  337. opacity: 1
  338. }
  339. 80% {
  340. -webkit-transform: scale(0, 0) rotateZ(90deg);
  341. transform: scale(0, 0) rotateZ(90deg);
  342. opacity: 0
  343. }
  344. }
  345. .container {
  346. height: 100%;
  347. display: flex;
  348. flex-direction: column;
  349. justify-content: center;
  350. align-items: center;
  351. max-width: 465px;
  352. background: var(--background-img);
  353. background-position: center;
  354. background-repeat: no-repeat;
  355. background-size: cover;
  356. }
  357. .text_config {
  358. color: var(--cor-text-config) !important;
  359. }
  360. .logo {
  361. width: 100%;
  362. display: block;
  363. margin-top: 0px;
  364. margin-bottom: 15px;
  365. margin-left: auto;
  366. margin-right: auto;
  367. content: var(--logo-img-url);
  368. filter: drop-shadow(var(--shadow1-offset-x) var(--shadow1-offset-y) var(--shadow1-blur) var(--shadow1-color));
  369. }
  370. .card {
  371. backdrop-filter: blur(var(--blur-amount2));
  372. background: var(--vidro-color);
  373. border-radius: 20px;
  374. border: 1px solid #1e1e1e !important;
  375. box-shadow: -8px 12px 20px 0 rgb(13 15 18 / 63%) !important;
  376. padding: 15px !important;
  377. max-width: 450px;
  378. height: auto;
  379. position: relative;
  380. filter: drop-shadow(var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color));
  381. }
  382. .btn-dark {
  383. border: none;
  384. background: linear-gradient(var(--cor-gradiente-btstart-incial), var(--cor-gradiente-btstart-final));
  385. border-radius: 15px;
  386. --bs-btn-hover-bg: #4b8d4b18 !important;
  387. --bs-btn-hover-border-color: #47593f2f !important;
  388. }
  389. .modal-content {
  390. background-color: transparent;
  391. backdrop-filter: blur(25px);
  392. }
  393. .tool {
  394. align-items: center;
  395. justify-content: center;
  396. text-align: center;
  397. }
  398. .tool-bt {
  399. background: linear-gradient(var(--cor-gradiente-config-incial), var(--cor-gradiente-config-final));
  400. border-radius: 20px;
  401. color: var(--cor-text-config) !important;
  402. height: 35px;
  403. width: 100%;
  404. border: var(--btn-border);
  405. }
  406. .input-group,
  407. .form-control,
  408. .input-group-text {
  409. background: #0808083f;
  410. color: var(--icon-color);
  411. border: none;
  412. border-radius: 15px;
  413. outline: none;
  414. }
  415. .form-control::placeholder {
  416. color: var(--text-color);
  417. }
  418. .form-control:focus {
  419. color: var(--text-color);
  420. outline: none;
  421. box-shadow: none;
  422. }
  423. .input-group-text {
  424. padding-right: 0;
  425. }
  426. .fs-5 {
  427. font-size: 1rem !important;
  428. }
  429. nav {
  430. background: linear-gradient(var(--cor-gradiente-nav-inicial), var(--cor-gradiente-nav-final));
  431. border-radius: 20px;
  432. font-size: 0;
  433. width: 100%;
  434. max-width: 450px;
  435. height: auto;
  436. position: sticky;
  437. margin-top: 20px;
  438. margin-bottom: 10px;
  439. display: flex;
  440. justify-content: space-around;
  441. align-items: center;
  442. }
  443. nav span {
  444. line-height: 45px;
  445. height: 100%;
  446. position: relative;
  447. z-index: 1;
  448. text-decoration: none;
  449. text-align: center;
  450. color: white !important;
  451. cursor: alias;
  452. }
  453. nav span svg {
  454. fill: var(--cor-icon-config);
  455. }
  456. nav .animation {
  457. position: absolute;
  458. height: 100%;
  459. top: 0;
  460. z-index: 0;
  461. transition: all .5s ease 0s;
  462. border-radius: 8px;
  463. }
  464. a:nth-child(1) {
  465. width: 30%;
  466. }
  467. a:nth-child(2) {
  468. width: 30%;
  469. }
  470. a:nth-child(3) {
  471. width: 40%;
  472. }
  473. nav .start-home,
  474. a:nth-child(1):hover~.animation {
  475. width: 30%;
  476. left: 0;
  477. background-color: #1212123f;
  478. border-radius: 20px;
  479. }
  480. nav .start-about,
  481. a:nth-child(2):hover~.animation {
  482. width: 30%;
  483. ;
  484. left: 30%;
  485. background-color: #1212123f;
  486. border-radius: 20px;
  487. }
  488. nav .start-blog,
  489. a:nth-child(3):hover~.animation {
  490. width: 40%;
  491. left: 60%;
  492. background-color: #1212123f;
  493. border-radius: 20px;
  494. }
  495. body {
  496. font-size: 12px;
  497. font-family: sans-serif;
  498. background: color #1212123f;
  499. }
  500. @media (min-width: 768px) {
  501. .container,
  502. .container-md,
  503. .container-sm {
  504. max-width: 100%;
  505. }
  506. }
  507. .rede {
  508. color: #ff0000;
  509. }
  510. .iplocal {
  511. color: #ffffff;
  512. }
  513. .containerlocal {
  514. background: #0808083f;
  515. border-radius: 20px;
  516. border: 1px solid #1e1e1e !important;
  517. padding: 15px !important;
  518. width: 95%;
  519. max-width: 450px;
  520. height: initial;
  521. position: absolute;
  522. margin-top: 700px;
  523. margin-bottom: -66px;
  524. }
  525. .hidden {
  526. display: none;
  527. }
  528. </style>
  529. </head>
  530. <body>
  531. <ul class="circles">
  532. <li></li>
  533. <li></li>
  534. <li></li>
  535. <li></li>
  536. <li></li>
  537. <li></li>
  538. <li></li>
  539. <li></li>
  540. <li></li>
  541. <li></li>
  542. </ul>
  543. <div class='box'>
  544. <div class='wave -one'></div>
  545. <div class='wave -two'></div>
  546. <div class='wave -three'></div>
  547. </div>
  548. <div class="containerlocal">
  549. <span class="font-semibold text-xs mr-2"
  550. style="color: #ffffff;"">📢 IP Local da sua operadora:</span><span class=" rede font-semibold text-xs mr-2"
  551. id="name">REDE</span> <span class="iplocal font-semibold text-xs" id="ip">127.0.0.1</span>
  552. </div>
  553. <div class="container">
  554. <div class="card border-0 p-2 shadow mb-3 w-100">
  555. <img class="logo">
  556. <script>
  557. document.documentElement.style.setProperty('--logo-img-url',);
  558. </script>
  559. <div class="input-group mb-2 shadow" id="config-area">
  560. <input class="form-control" type="text" placeholder="CONFIGURAÇÃO" readonly title="configurações"
  561. id="config" style="background-color: #0808083f;" />
  562. <span class="input-group-text me-2">
  563. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  564. class="bi bi:bar-chart" viewBox="0 0 16 16">
  565. <path
  566. d="M4 11H2v3h2v-3zm5-4H7v7h2V7zm5-5v12h-2V2h2zm-2-1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1h-2zM6 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7zm-5 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-3z" />
  567. </svg>
  568. </span>
  569. </div>
  570. <div class="input-group input mb-2 shadow">
  571. <span class="input-group-text">
  572. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  573. class="bi bi:file-person" viewBox="0 0 16 16">
  574. <path
  575. d="M12 1a1 1 0 0 1 1 1v10.755S12 11 8 11s-5 1.755-5 1.755V2a1 1 0 0 1 1-1h8zM4 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H4z" />
  576. <path d="M8 10a3 3 0 1 0 0-6a3 3 0 0 0 0 6z" />
  577. </g>
  578. </svg>
  579. </span>
  580. <input class="form-control" type="text" placeholder="usuario" id="username"
  581. style="background-color: #0808083f;" />
  582. </div>
  583. <div class="input-group input mb-2 shadow">
  584. <span class="input-group-text">
  585. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  586. class="bi bi:file-earmark-lock" viewBox="0 0 16 16">
  587. <path
  588. d="M10 7v1.076c.54.166 1 .597 1 1.224v2.4c0 .816-.781 1.3-1.5 1.3h-3c-.719 0-1.5-.484-1.5-1.3V9.3c0-.627.46-1.058 1-1.224V7a2 2 0 1 1 4 0zM7 7v1h2V7a1 1 0 0 0-2 0zM6 9.3v2.4c0 .042.02.107.105.175A.637.637 0 0 0 6.5 12h3a.64.64 0 0 0 .395-.125c.085-.068.105-.133.105-.175V9.3c0-.042-.02-.107-.105-.175A.637.637 0 0 0 9.5 9h-3a.637.637 0 0 0-.395.125C6.02 9.193 6 9.258 6 9.3z" />
  589. <path
  590. d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z" />
  591. </g>
  592. </svg>
  593. </span>
  594. <input class="form-control" type="password" placeholder="senha" id="password"
  595. style="background-color: #0808083f;" />
  596. <span class="input-group-text me-2"
  597. onclick="password.type==`text`?password.type = `password`:password.type = `text`">
  598. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye"
  599. viewBox="0 0 16 16">
  600. <path
  601. d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z" />
  602. <path
  603. d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z" />
  604. </svg>
  605. </span>
  606. </div>
  607. <div class="input-group input mb-2 shadow">
  608. <span class="input-group-text">
  609. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-key"
  610. viewBox="0 0 16 16">
  611. <path
  612. d="M0 8a4 4 0 0 1 7.465-2H14a.5.5 0 0 1 .354.146l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0L13 9.207l-.646.647a.5.5 0 0 1-.708 0L11 9.207l-.646.647a.5.5 0 0 1-.708 0L9 9.207l-.646.647A.5.5 0 0 1 8 10h-.535A4 4 0 0 1 0 8zm4-3a3 3 0 1 0 2.712 4.285A.5.5 0 0 1 7.163 9h.63l.853-.854a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.793-.793-1-1h-6.63a.5.5 0 0 1-.451-.285A3 3 0 0 0 4 5z" />
  613. <path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" />
  614. </svg>
  615. </span>
  616. <input class="form-control" type="text" placeholder="V2ray UUID" id="uuid"
  617. style="background: #0808083f;" />
  618. <span class="input-group-text me-2"
  619. onclick="uuid.type==`text`?uuid.type = `password`:uuid.type = `text`">
  620. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye"
  621. viewBox="0 0 16 16">
  622. <path
  623. d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z" />
  624. <path
  625. d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z" />
  626. </svg>
  627. </span>
  628. </div>
  629. <button class="btn btn-dark w-100 shadow" id="start-stop">INICIAR</button>
  630. <nav>
  631. <span id="sync" onclick="DtStartAppUpdate.execute()" class="fi fi-rr-refresh">
  632. <?xml version="1.0" encoding="UTF-8"?>
  633. <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="24" height="24">
  634. <path
  635. d="M12,2a10.032,10.032,0,0,1,7.122,3H16a1,1,0,0,0-1,1h0a1,1,0,0,0,1,1h4.143A1.858,1.858,0,0,0,22,5.143V1a1,1,0,0,0-1-1h0a1,1,0,0,0-1,1V3.078A11.981,11.981,0,0,0,.05,10.9a1.007,1.007,0,0,0,1,1.1h0a.982.982,0,0,0,.989-.878A10.014,10.014,0,0,1,12,2Z" />
  636. <path
  637. d="M22.951,12a.982.982,0,0,0-.989.878A9.986,9.986,0,0,1,4.878,19H8a1,1,0,0,0,1-1H9a1,1,0,0,0-1-1H3.857A1.856,1.856,0,0,0,2,18.857V23a1,1,0,0,0,1,1H3a1,1,0,0,0,1-1V20.922A11.981,11.981,0,0,0,23.95,13.1a1.007,1.007,0,0,0-1-1.1Z" />
  638. </svg>
  639. </span>
  640. <span id="logger" class="fi fi-rs-clipboard-list">
  641. <?xml version="1.0" encoding="UTF-8"?>
  642. <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="24" height="24">
  643. <path
  644. d="M11,12h6v2h-6v-2ZM21,2V21c0,1.654-1.346,3-3,3H6c-1.654,0-3-1.346-3-3V2h5.171c.413-1.164,1.525-2,2.829-2h2c1.304,0,2.416,.836,2.829,2h5.171Zm-2,2h-5v-1c0-.552-.449-1-1-1h-2c-.551,0-1,.448-1,1v1H5V21c0,.552,.449,1,1,1h12c.551,0,1-.448,1-1V4Zm-8,6h6v-2h-6v2Zm0,8h6v-2h-6v2ZM7,10h2v-2h-2v2Zm0,4h2v-2h-2v2Zm0,4h2v-2h-2v2Z" />
  645. </svg>
  646. </span>
  647. <span aria-hidden="true" onclick="ToolsModal.show()" class="fi fi-rr-settings">
  648. <?xml version="1.0" encoding="UTF-8"?>
  649. <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24"
  650. width="24" height="24">
  651. <path d="M12,8a4,4,0,1,0,4,4A4,4,0,0,0,12,8Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,14Z" />
  652. <path
  653. d="M21.294,13.9l-.444-.256a9.1,9.1,0,0,0,0-3.29l.444-.256a3,3,0,1,0-3-5.2l-.445.257A8.977,8.977,0,0,0,15,3.513V3A3,3,0,0,0,9,3v.513A8.977,8.977,0,0,0,6.152,5.159L5.705,4.9a3,3,0,0,0-3,5.2l.444.256a9.1,9.1,0,0,0,0,3.29l-.444.256a3,3,0,1,0,3,5.2l.445-.257A8.977,8.977,0,0,0,9,20.487V21a3,3,0,0,0,6,0v-.513a8.977,8.977,0,0,0,2.848-1.646l.447.258a3,3,0,0,0,3-5.2Zm-2.548-3.776a7.048,7.048,0,0,1,0,3.75,1,1,0,0,0,.464,1.133l1.084.626a1,1,0,0,1-1,1.733l-1.086-.628a1,1,0,0,0-1.215.165,6.984,6.984,0,0,1-3.243,1.875,1,1,0,0,0-.751.969V21a1,1,0,0,1-2,0V19.748a1,1,0,0,0-.751-.969A6.984,6.984,0,0,1,7.006,16.9a1,1,0,0,0-1.215-.165l-1.084.627a1,1,0,1,1-1-1.732l1.084-.626a1,1,0,0,0,.464-1.133,7.048,7.048,0,0,1,0-3.75A1,1,0,0,0,4.79,8.992L3.706,8.366a1,1,0,0,1,1-1.733l1.086.628A1,1,0,0,0,7.006,7.1a6.984,6.984,0,0,1,3.243-1.875A1,1,0,0,0,11,4.252V3a1,1,0,0,1,2,0V4.252a1,1,0,0,0,.751.969A6.984,6.984,0,0,1,16.994,7.1a1,1,0,0,0,1.215.165l1.084-.627a1,1,0,1,1,1,1.732l-1.084.626A1,1,0,0,0,18.746,10.125Z" />
  654. </svg>
  655. </span>
  656. </nav>
  657. </div>
  658. <div class="card my-3 w-100 text-center border-0 p-2 shadow text-light fs-5 text-uppercase fw-bold" id="state"
  659. style="padding: 5px !important; font-size: 15px !important;">
  660. </div>
  661. <div class="modal fade" id="checkUserModal">
  662. <div class="modal-dialog modal-dialog-centered" role="document">
  663. <div class="modal-content rounded-3 shadow">
  664. <div class="modal-header border-bottom-0 pb-0">
  665. <h1 class="modal-title fs-5 chk-title text-light"></h1>
  666. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  667. aria-label="Close"></button>
  668. </div>
  669. <div class="modal-body text-center">
  670. <p class="fs-5 mb-0 chk-message text-light"></p>
  671. </div>
  672. </div>
  673. </div>
  674. </div>
  675. <div class="modal fade" id="errorModal">
  676. <div class="modal-dialog modal-dialog-centered" role="document">
  677. <div class="modal-content rounded-3 shadow">
  678. <div class="modal-header border-bottom-0 pb-0">
  679. <h1 class="modal-title fs-5 err-title text-light"></h1>
  680. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  681. aria-label="Close"></button>
  682. </div>
  683. <div class="modal-body text-center">
  684. <p class="fs-5 mb-0 err-message text-light"></p>
  685. </div>
  686. </div>
  687. </div>
  688. </div>
  689. <div class="modal fade" id="loggerModal">
  690. <div class="modal-dialog modal-dialog-centered" role="document">
  691. <div class="modal-content rounded-3 shadow">
  692. <div class="modal-body p-1 text-center">
  693. <ul class="list-group bg-transparent overflow-y-auto logger-content" style="max-height: 600px;">
  694. </ul>
  695. </div>
  696. <div class="modal-footer flex-nowrap p-0">
  697. <button type="button" class="btn btn-lg btn-dark text-light w-100 clear-logger">LIMPAR</button>
  698. <button type="button" class="btn btn-lg btn-dark text-light w-100"
  699. data-bs-dismiss="modal">FECHAR</button>
  700. </div>
  701. </div>
  702. </div>
  703. </div>
  704. <div class="tool webm modal fade" index="-1" id="ToolsModal">
  705. <div class="modal-dialog modal-dialog-centered" role="document">
  706. <div class="modal-content">
  707. <div class="tool modal-header">
  708. <h5 class="modal-title text_config">Configurações do aplicativo</h5>
  709. </div>
  710. <div class="modal-body">
  711. <button class="tool-bt rounded-2xl text-white" onclick="DtStartApnActivity.execute()"><i
  712. class="info2 bi bi-wifi mr-2"></i>Alterar protocolo de APN</button>
  713. </div>
  714. <div class="modal-body">
  715. <button class="tool-bt rounded-2xl text-white"
  716. onclick="DtIgnoreBatteryOptimizations.execute()"><i
  717. class="info2 bi bi-battery-full mr-2"></i>Otimizar Bateria</button>
  718. </div>
  719. <div class="modal-body">
  720. <button class="tool-bt rounded-2xl text-white" id="btnHotSpot"><i
  721. class="info2 bi bi-trash3 mr-2"></i>Compartilhar Internet</button>
  722. </div>
  723. <div class="modal-body">
  724. <button class="tool-bt rounded-2xl text-white" onclick="DtCleanApp.execute()"><i
  725. class="info2 bi bi-trash3 mr-2"></i>Limpar cachê e dados</button>
  726. </div>
  727. <div class="tool modal-footer">
  728. <button type="button" class="btn btn-primary" data-bs-dismiss="modal"
  729. style="background-color: var(--btn-modal);">FECHAR</button>
  730. </div>
  731. </div>
  732. </div>
  733. </div>
  734. <div class="modal fade" id="configModal">
  735. <div class="modal-dialog modal-dialog-centered" role="document">
  736. <div class="modal-content rounded-3 shadow">
  737. <div class="modal-header border-bottom-0 pb-0">
  738. <h1 class="modal-title fs-5 text-white">CONFIGURAÇÕES</h1>
  739. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  740. aria-label="Close"></button>
  741. </div>
  742. <div class="modal-body p-1 text-center">
  743. <ul class="list-group bg-transparent overflow-y-auto config-body" style="max-height: 600px;">
  744. <li class="list-group-item bg-transparent text-white border-0">
  745. <p>CATEGORIA</p>
  746. <ul class="list-group bg-transparent overflow-y-auto text-start">
  747. <li
  748. class="list-group-item d-flex bg-transparent text-white border-0 border-bottom rounded-0">
  749. <img src="https://cdn-icons-png.flaticon.com/512/3686/3686811.png" width="40"
  750. height="40">
  751. <div class="d-flex flex-column ms-2 w-100">
  752. <span>CONFIG 01</span>
  753. <span>DESC 01</span>
  754. </div>
  755. <div class="d-flex flex-column ms-2 w-100">
  756. <span class="text-end">CONFIG_MODE</span>
  757. </div>
  758. </li>
  759. </ul>
  760. </li>
  761. </ul>
  762. </div>
  763. </div>
  764. </div>
  765. </div>
  766. <div class="modal fade" id="RenovarModal">
  767. <div class="modal-dialog modal-dialog-centered" role="document">
  768. <div class="modal-content rounded-3 shadow">
  769. <div class="modal-header border-bottom-0 py-3">
  770. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  771. aria-label="Close"></button>
  772. </div>
  773. <div class="modal-body ratio rounded-bottom-3" style="height: 600px;">
  774. <div class="spinner d-flex w-100 h-100 align-items-center justify-content-center">
  775. <div class="spinner-border text-light p-5" role="status">
  776. <span class="visually-hidden">Loading...</span>
  777. </div>
  778. </div>
  779. <iframe class="rounded-bottom-3" id="RenovarFrame"></iframe>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
  785. <script>
  786. const startHotSpot = () => {
  787. DtStartHotSpotService.execute();
  788. txtbtn.textContent = 'HOTSPOT';
  789. }
  790. const stopHotSpot = () => {
  791. DtStopHotSpotService.execute();
  792. txtbtn.textContent = 'HOTSPOT';
  793. }
  794. const toggleHotSpot = () => {
  795. const hotSpotStatus = window?.DtGetStatusHotSpotService?.execute() ?? 'STOPPED';
  796. hotSpotStatus == 'RUNNING' ? stopHotSpot() : startHotSpot();
  797. }
  798. const btnHotSpot = document.querySelector("#btnHotSpot");
  799. btnHotSpot.addEventListener('click', toggleHotSpot);
  800. const hotSpotStatus = window?.DtGetStatusHotSpotService?.execute() ?? 'STOPPED';
  801. if (hotSpotStatus == 'RUNNING') {
  802. txtbtn.textContent = 'HOTSPOT';
  803. }
  804. </script>
  805. <script>
  806. class AndroidMock {
  807. static getLocalIP() {
  808. return '192.168.0.1';
  809. }
  810. static getConfig() {
  811. return JSON.stringify({
  812. urlCheckUser: 'URLAQUI'
  813. });
  814. }
  815. static getNetworkName() {
  816. return 'REDE';
  817. }
  818. static openRadioInfo() {
  819. console.log('openRadioInfo');
  820. }
  821. }
  822. </script>
  823. <script>
  824. function showLocalIP(android) {
  825. console.log(android.getNetworkName());
  826. document.getElementById('name').innerHTML = ' ' + android.getNetworkName() + ':';
  827. document.getElementById('ip').innerHTML = android.getLocalIP();
  828. setInterval(() => {
  829. document.getElementById('name').innerHTML =
  830. ' ' + android.getNetworkName() + ':';
  831. document.getElementById('ip').innerHTML = android.getLocalIP();
  832. }, 2000)
  833. }
  834. window.onload = function () {
  835. const android = window.Android || AndroidMock;
  836. showLocalIP(android);
  837. }
  838. function mostrar(id) {
  839. if (document.getElementById(id).style.display !== "none") {
  840. document.getElementById(id).style.display = "none";
  841. return;
  842. }
  843. Array.from(document.getElementsByClassName("hidden")).forEach(
  844. div => (div.style.display = "none")
  845. );
  846. document.getElementById(id).style.display = "block";
  847. }
  848. </script>
  849. <script>
  850. const configArea = document.querySelector('#config-area')
  851. const config = document.querySelector('#config')
  852. const username = document.querySelector('#username')
  853. const password = document.querySelector('#password')
  854. const uuid = document.querySelector('#uuid')
  855. const logger = document.querySelector('#logger')
  856. const networkStatus = document.querySelector('#section.local-ip')
  857. const startStopVpn = document.querySelector('#start-stop')
  858. const stateStatus = document.querySelector('#state')
  859. const loggerModal = new bootstrap.Modal(document.querySelector('#loggerModal'))
  860. const checkUserModal = new bootstrap.Modal(document.querySelector('#checkUserModal'))
  861. const errorModal = new bootstrap.Modal(document.querySelector('#errorModal'))
  862. const configModal = new bootstrap.Modal(document.querySelector('#configModal'))
  863. const ToolsModal = new bootstrap.Modal(document.querySelector('#ToolsModal'))
  864. const clearLogger = document.querySelector('.clear-logger')
  865. const RenovarModal = new bootstrap.Modal(document.querySelector('#RenovarModal'))
  866. configArea.addEventListener('click', e => showConfigsModal())
  867. username.addEventListener('input', e => DtUsername.set(e.target.value))
  868. password.addEventListener('input', e => DtPassword.set(e.target.value))
  869. uuid.addEventListener('input', e => DtUuid.set(e.target.value))
  870. logger.addEventListener('click', e => loggerModal.show())
  871. startStopVpn.addEventListener('click', (e) => {
  872. if (DtGetVpnState.execute() != 'DISCONNECTED') {
  873. DtExecuteVpnStop.execute()
  874. } else {
  875. DtExecuteVpnStart.execute()
  876. }
  877. })
  878. clearLogger.addEventListener('click', () => DtClearLogs.execute())
  879. RenovarModal._element.addEventListener('shown.bs.modal', () => {
  880. const iframe = document.querySelector('#RenovarFrame');
  881. if (!iframe.src) {
  882. iframe.src = 'https://painel.plenonet.com.br/renovar.php'
  883. iframe.addEventListener('load', () => {
  884. mp3Modal._element.querySelector('.spinner').classList.add('d-none')
  885. })
  886. }
  887. })
  888. RenovarModal._element.addEventListener('hide.bs.modal', () => {
  889. const iframe = document.querySelector('#RenovarFrame');
  890. iframe.src = '';
  891. })
  892. Object.defineProperty(String.prototype, 't', {
  893. value: function t() {
  894. return window?.DtTranslateText?.execute('' + this) ?? '' + this
  895. },
  896. writable: true,
  897. configurable: true,
  898. })
  899. const dtConfigClickListener = () => {
  900. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{ "auth": {}, "mode": "v2ray" }`)
  901. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  902. config.placeholder = data.name ?? 'LBL_CHOOSE_CONFIG'.t()
  903. username.parentElement.style.display = !data?.auth?.username && !isV2ray ? 'flex' : 'none';
  904. password.parentElement.style.display = !data?.auth?.password && !isV2ray ? 'flex' : 'none';
  905. uuid.parentElement.style.display = !data?.auth?.v2ray_uuid && isV2ray ? 'flex' : 'none';
  906. }
  907. const dtVpnStateListener = state => {
  908. const isRunning = state != 'DISCONNECTED';
  909. stateStatus.innerHTML = ('LBL_STATE_' + state).t()
  910. startStopVpn.innerHTML = isRunning ? 'LBL_BTN_STOP'.t() : 'LBL_BTN_START'.t()
  911. if (isRunning) {
  912. username.setAttribute('readonly', 'true')
  913. password.setAttribute('readonly', 'true')
  914. } else {
  915. username.removeAttribute('readonly')
  916. password.removeAttribute('readonly')
  917. }
  918. if (state == 'CONNECTING') dtShowSuccessToastListener('Conectando...')
  919. }
  920. const dtCheckUserStartedListener = () => {
  921. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{}`)
  922. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  923. if (isV2ray) return;
  924. const html = `
  925. <div class="d-flex justify-content-center">
  926. <div class="spinner-border p-5" role="status">
  927. <span class="visually-hidden">Loading...</span>
  928. </div>
  929. </div>
  930. `
  931. checkUserModal._element.querySelector('.chk-title').textContent = 'CHECK USER'
  932. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  933. checkUserModal.show()
  934. }
  935. function isBeforeExpiration(expirationDays, daysBefore) {
  936. return expirationDays <= daysBefore;
  937. }
  938. const dtCheckUserModelListener = model => {
  939. const data = JSON.parse(model ?? `{"username": "test"}`);
  940. const html = `
  941. <div class="d-flex flex-column text-white">
  942. <span>👤Nome de usuario: ${data.username}</span>
  943. <span>📆Expira em: ${data.expiration_date}</span>
  944. <span>📆Dias restantes: ${data.expiration_days}</span>
  945. <span>🚫Conexoes: ${data.count_connections}|${data.limit_connections}</span>
  946. ${isBeforeExpiration(data.expiration_days, 3) ? '<span><center>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</center><span><span><center>⚠️Faltando 3 dias para o expirar o usuário⚠️</center></span>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</span></span>' : ''}
  947. ${isBeforeExpiration(data.expiration_days, 2) ? '<span><span><span><center>⚠️Faltando 2 dias para o expirar o usuário⚠️</center></span><center>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</center></span></span>' : ''}
  948. ${isBeforeExpiration(data.expiration_days, 1) ? '<span><span><span><center>⚠️Faltando 1 dias para o expirar o usuário⚠️</center></span><center>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</center></span></span>' : ''}
  949. </div>
  950. `;
  951. checkUserModal._element.querySelector('.chk-title').textContent = '📆 Olá, ' + data.username.toUpperCase() + '👤';
  952. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  953. checkUserModal.show();
  954. }
  955. const dtMessageErrorListener = message => {
  956. const data = JSON.parse(message)
  957. errorModal._element.querySelector('.err-title').textContent = data.title;
  958. errorModal._element.querySelector('.err-message').innerHTML = data.content;
  959. errorModal.show()
  960. }
  961. const dtOnNewLogListener = () => {
  962. const mock = [];
  963. for (let i = 0; i < 30; i++) {
  964. mock.push({ 'TIME': 'MESSAGE ' + i })
  965. }
  966. const log = window?.DtGetLogs?.execute() || JSON.stringify(mock)
  967. const data = JSON.parse(log)
  968. let content = '';
  969. data.forEach(item => {
  970. content += '<li class="list-group-item fs-6 bg-transparent text-white p-0 border-0 text-start ms-2 text-wrap">';
  971. content += Object.keys(item)[0] + " " + item[Object.keys(item)]
  972. content += '</li>';
  973. })
  974. loggerModal._element.querySelector('.logger-content').innerHTML = content;
  975. const listGroup = loggerModal._element.querySelector('.list-group')
  976. listGroup.scrollTo(0, listGroup.scrollHeight)
  977. }
  978. const dtVpnStartedSuccessListener = () => dtShowSuccessToastListener('Conectado com sucesso')
  979. const dtVpnStoppedSuccessListener = () => dtShowSuccessToastListener('Desconectado com sucesso')
  980. const dtShowSuccessToastListener = text => {
  981. Toastify({
  982. text: text,
  983. close: true,
  984. style: {
  985. background: 'linear-gradient(to right, #00b09b, #96c93d)',
  986. marginTop: '35px',
  987. }
  988. }).showToast()
  989. }
  990. const dtShowErrorToastListener = text => {
  991. Toastify({
  992. text: text,
  993. close: true,
  994. style: {
  995. background: 'linear-gradient(to right, #ff5c33, #e69900)',
  996. marginTop: '35px',
  997. }
  998. }).showToast()
  999. }
  1000. const showConfigsModal = () => {
  1001. 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"}]}]'
  1002. const data = JSON.parse(window?.DtGetConfigs?.execute() || mock)
  1003. data.sort((a, b) => a.sorter - b.sorter)
  1004. data.forEach(item => item.items.sort((a, b) => a.sorter - b.sorter))
  1005. const body = configModal._element.querySelector('.config-body')
  1006. body.innerHTML = ''
  1007. data.forEach(category => {
  1008. const categoryElement = document.createElement('li')
  1009. categoryElement.classList.add('list-group-item', 'bg-transparent', 'text-white', 'border-0', 'mb-1', 'rounded-1', 'px-1')
  1010. categoryElement.innerHTML = `<span class="fw-bold btn-dark w-100 d-block p-1 rounded-1 mb-1">${category.name}</span>`
  1011. const configUlElement = document.createElement('ul')
  1012. configUlElement.classList.add('list-group', 'bg-transparent', 'overflow-y-auto')
  1013. category.items.forEach(item => {
  1014. const configElement = document.createElement('li')
  1015. configElement.classList.add('list-group-item', 'd-flex', 'btn-dark', 'text-white', 'border-0', 'rounded-2', 'px-1', 'py-2', 'mb-1')
  1016. configElement.innerHTML = `
  1017. <img src="${item.icon}" width="40" height="40">
  1018. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  1019. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">${item.name}</span>
  1020. <span class="fst-italic fw-bold" style="font-size: 0.7rem;">${item.description || ''}</span>
  1021. </div>
  1022. <div class="d-flex flex-column ms-2">
  1023. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">${item.mode}</span>
  1024. </div>
  1025. </li>
  1026. `
  1027. configElement.addEventListener('click', e => {
  1028. window?.DtSetConfig?.execute(item.id)
  1029. configModal.hide()
  1030. })
  1031. configUlElement.appendChild(configElement)
  1032. })
  1033. categoryElement.appendChild(configUlElement)
  1034. body.appendChild(categoryElement)
  1035. })
  1036. configModal.show()
  1037. }
  1038. username.value = window?.DtUsername?.get() ?? ''
  1039. password.value = window?.DtPassword?.get() ?? ''
  1040. uuid.value = window?.DtUuid?.get() ?? ''
  1041. username.placeholder = 'LBL_USERNAME'.t()
  1042. password.placeholder = 'LBL_PASSWORD'.t()
  1043. uuid.placeholder = 'LBL_UUID'.t()
  1044. dtOnNewLogListener()
  1045. dtVpnStateListener(window?.DtGetVpnState?.execute() ?? 'DISCONNECTED')
  1046. dtConfigClickListener()
  1047. console.log('ODAIR.Dev!🚀')
  1048. </script>
  1049. </body>
  1050. </html>

comments powered by Disqus