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: 51.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/jbCDXXC/coollogo-com-27815824.png);
  23. --logotamanho: 50%;
  24. /* Cria uma sombra na LOGO */
  25. /*
  26. --shadow1-offset-x: -5px;
  27. --shadow1-offset-y: 8px;
  28. --shadow1-blur: 3px;
  29. --shadow1-color: black;
  30. */
  31. /*------------------------------------------------------------------------*/
  32. --background-img: url(https://i.ibb.co/SxGh3Cd/243481-adapted-1080x2340.jpg);
  33. /* Defina o texto desejado */
  34. --textonovo: ANO NOVO;
  35. --tamanhotexto: 30px;
  36. --cortexto: #ffffff;
  37. /* Contagem Ano Novo */
  38. --color-white: #ffffff;
  39. --color-black: #202020;
  40. --color-glass: rgba(255, 255, 255, 0.05);
  41. --color-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  42. /* Valor padrão para o desfoque do vidro */
  43. --blur-amount2: 5px;
  44. --vidro-color: rgba(0, 0, 0, 0.158);
  45. /* Cria uma sombra no Vidro */
  46. /*
  47. --shadow-offset-x: -5px;
  48. --shadow-offset-y: 8px;
  49. --shadow-blur: 3px;
  50. --shadow-color: black;
  51. */
  52. /*------------------------------------------------------------------------*/
  53. /*Cores Dos Botao de iniciar*/
  54. --cor-gradiente-nav-inicial: #f1292912;
  55. --cor-gradiente-nav-final: #ff7f0017;
  56. --cor-icon-config: #ffffff;
  57. /*------------------------------------------------------------------------*/
  58. /*Cores Dos Botao de conectar*/
  59. --cor-gradiente-btstart-incial: #f1292912;
  60. --cor-gradiente-btstart-final: #ff7f0017;
  61. /*------------------------------------------------------------------------*/
  62. /*Cores Dos icones e TexTo*/
  63. --text-color: #ffffff;
  64. --icon-color: #FFFFFF;
  65. /*------------------------------------------------------------------------*/
  66. /*Cores Dos config*/
  67. --cor-text-config: #e70000;
  68. --cor-gradiente-config-incial: #f1292912;
  69. --cor-gradiente-config-final: #ff7f0017;
  70. /*------------------------------------------------------------------------EDITE SOMENTE AQUI FINALLLL-----------------------------------------------------------------------------*/
  71. --input-border-radius: 5px;
  72. --input-background-color: #0a091a55;
  73. --card-border-radius: 5px;
  74. --card-background-color: #0b092868;
  75. --btn-background-color: #0a091a55;
  76. --btn-border-radius: 15px;
  77. --modal-background-color: #0b092868;
  78. }
  79. * {
  80. margin: 0;
  81. padding: 0;
  82. box-sizing: border-box;
  83. font-family: 'Roboto', sans-serif;
  84. }
  85. body {
  86. height: 100vh;
  87. display: flex;
  88. flex-direction: column;
  89. align-items: center;
  90. justify-content: center;
  91. background-repeat: no-repeat;
  92. background-size: cover;
  93. background-color: var(--cor-background);
  94. color: #fff;
  95. font-family: 'Lato', sans-serif;
  96. }
  97. /*Contagem Regressiva*/
  98. .wrapper {
  99. position: absolute;
  100. transform: translate(0%, 0%);
  101. margin: 10px;
  102. top: 1%;
  103. left: 0%;
  104. font-size: 4px;
  105. }
  106. .heading {
  107. text-align: center;
  108. padding: 0px;
  109. margin: 0px;
  110. }
  111. .heading h1 {
  112. text-shadow: var(--color-shadow);
  113. font-size: 15.2em;
  114. font-weight: 800;
  115. letter-spacing: 0.15em;
  116. }
  117. .heading h3 {
  118. font-size: 7.6em;
  119. letter-spacing: 0.05em;
  120. text-transform: uppercase;
  121. font-weight: 600;
  122. background-color: var(--color-glass);
  123. backdrop-filter: blur(12px);
  124. box-shadow: var(--color-shadow);
  125. margin-top: 10px;
  126. padding: 8px 30px;
  127. display: inline-block;
  128. }
  129. .countdown {
  130. width: 95vw;
  131. margin-top: 133vw;
  132. display: flex;
  133. justify-content: space-around;
  134. gap: 10px;
  135. }
  136. .box {
  137. width: 28vmin;
  138. height: 29vmin;
  139. display: flex;
  140. flex-direction: column;
  141. align-items: center;
  142. justify-content: space-evenly;
  143. position: relative;
  144. }
  145. span.num {
  146. background-color: var(--color-glass);
  147. backdrop-filter: blur(12px);
  148. height: 100%;
  149. width: 100%;
  150. display: grid;
  151. place-items: center;
  152. font-size: 10em;
  153. box-shadow: var(--color-shadow);
  154. border-radius: 0.1em;
  155. }
  156. span.num:after {
  157. content: "";
  158. position: absolute;
  159. background-color: var(--color-glass);
  160. height: 100%;
  161. width: 50%;
  162. left: 0;
  163. }
  164. span.text {
  165. font-size: 3em;
  166. background-color: var(--color-white);
  167. color: var(--color-black);
  168. display: block;
  169. width: 90%;
  170. position: relative;
  171. text-align: center;
  172. bottom: 22px;
  173. padding: 0em 0em;
  174. font-weight: 600;
  175. border-radius: 0.3em;
  176. box-shadow: var(--color-shadow);
  177. }
  178. /*LOADING SPACE*/
  179. .contain {
  180. animation-delay: 4s;
  181. z-index: 1000;
  182. position: fixed;
  183. top: 0;
  184. left: 0;
  185. bottom: 0;
  186. right: 0;
  187. display: -webkit-box;
  188. display: -ms-flexbox;
  189. display: flex;
  190. -ms-flex-flow: row nowrap;
  191. flex-flow: row nowrap;
  192. -webkit-box-pack: center;
  193. -ms-flex-pack: center;
  194. justify-content: center;
  195. -webkit-box-align: center;
  196. -ms-flex-align: center;
  197. align-items: center;
  198. background: #25a7d7;
  199. background: -webkit-linear-gradient(#25a7d7, #2962FF);
  200. background: linear-gradient(#25a7d7, #25a7d7);
  201. }
  202. .icon {
  203. width: 100px;
  204. height: 100px;
  205. margin: 0 5px;
  206. }
  207. /*Animation*/
  208. .icon:nth-child(2) img {
  209. -webkit-animation-delay: 0.2s;
  210. animation-delay: 0.2s
  211. }
  212. .icon:nth-child(3) img {
  213. -webkit-animation-delay: 0.3s;
  214. animation-delay: 0.3s
  215. }
  216. .icon:nth-child(4) img {
  217. -webkit-animation-delay: 0.4s;
  218. animation-delay: 0.4s
  219. }
  220. .icon img {
  221. -webkit-animation: anim 2s ease infinite;
  222. animation: anim 2s ease infinite;
  223. -webkit-transform: scale(0, 0) rotateZ(180deg);
  224. transform: scale(0, 0) rotateZ(180deg);
  225. }
  226. @-webkit-keyframes anim {
  227. 0% {
  228. -webkit-transform: scale(0, 0) rotateZ(-90deg);
  229. transform: scale(0, 0) rotateZ(-90deg);
  230. opacity: 0
  231. }
  232. 30% {
  233. -webkit-transform: scale(1, 1) rotateZ(0deg);
  234. transform: scale(1, 1) rotateZ(0deg);
  235. opacity: 1
  236. }
  237. 50% {
  238. -webkit-transform: scale(1, 1) rotateZ(0deg);
  239. transform: scale(1, 1) rotateZ(0deg);
  240. opacity: 1
  241. }
  242. 80% {
  243. -webkit-transform: scale(0, 0) rotateZ(90deg);
  244. transform: scale(0, 0) rotateZ(90deg);
  245. opacity: 0
  246. }
  247. }
  248. @keyframes anim {
  249. 0% {
  250. -webkit-transform: scale(0, 0) rotateZ(-90deg);
  251. transform: scale(0, 0) rotateZ(-90deg);
  252. opacity: 0
  253. }
  254. 30% {
  255. -webkit-transform: scale(1, 1) rotateZ(0deg);
  256. transform: scale(1, 1) rotateZ(0deg);
  257. opacity: 1
  258. }
  259. 50% {
  260. -webkit-transform: scale(1, 1) rotateZ(0deg);
  261. transform: scale(1, 1) rotateZ(0deg);
  262. opacity: 1
  263. }
  264. 80% {
  265. -webkit-transform: scale(0, 0) rotateZ(90deg);
  266. transform: scale(0, 0) rotateZ(90deg);
  267. opacity: 0
  268. }
  269. }
  270. .container {
  271. height: 100%;
  272. display: flex;
  273. flex-direction: column;
  274. justify-content: center;
  275. align-items: center;
  276. max-width: 465px;
  277. background: var(--background-img);
  278. background-position: center;
  279. background-repeat: no-repeat;
  280. background-size: cover;
  281. }
  282. .text_config {
  283. color: var(--cor-text-config) !important;
  284. }
  285. .logo {
  286. width: var(--logotamanho);
  287. display: block;
  288. margin-top: 0px;
  289. margin-bottom: 15px;
  290. margin-left: auto;
  291. margin-right: auto;
  292. content: var(--logo-img-url);
  293. filter: drop-shadow(var(--shadow1-offset-x) var(--shadow1-offset-y) var(--shadow1-blur) var(--shadow1-color));
  294. }
  295. .card {
  296. backdrop-filter: blur(var(--blur-amount2));
  297. background: var(--vidro-color);
  298. border-radius: 20px;
  299. border: 1px solid #1e1e1e !important;
  300. box-shadow: -8px 12px 20px 0 rgb(13 15 18 / 63%) !important;
  301. padding: 15px !important;
  302. max-width: 450px;
  303. height: auto;
  304. position: relative;
  305. filter: drop-shadow(var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color));
  306. }
  307. .btn-dark {
  308. border: none;
  309. background: linear-gradient(var(--cor-gradiente-btstart-incial), var(--cor-gradiente-btstart-final));
  310. border-radius: 15px;
  311. --bs-btn-hover-bg: #4b8d4b18 !important;
  312. --bs-btn-hover-border-color: #47593f2f !important;
  313. }
  314. .modal-content {
  315. background-color: transparent;
  316. backdrop-filter: blur(25px);
  317. }
  318. .tool {
  319. align-items: center;
  320. justify-content: center;
  321. text-align: center;
  322. }
  323. .tool-bt {
  324. background: linear-gradient(var(--cor-gradiente-config-incial), var(--cor-gradiente-config-final));
  325. border-radius: 20px;
  326. color: var(--cor-text-config) !important;
  327. height: 35px;
  328. width: 100%;
  329. border: var(--btn-border);
  330. }
  331. .input-group,
  332. .form-control,
  333. .input-group-text {
  334. background: #0808083f;
  335. color: var(--icon-color);
  336. border: none;
  337. border-radius: 15px;
  338. outline: none;
  339. }
  340. .form-control::placeholder {
  341. color: var(--text-color);
  342. }
  343. .form-control:focus {
  344. color: var(--text-color);
  345. outline: none;
  346. box-shadow: none;
  347. }
  348. .input-group-text {
  349. padding-right: 0;
  350. }
  351. .fs-5 {
  352. font-size: 1rem !important;
  353. }
  354. nav {
  355. background: linear-gradient(var(--cor-gradiente-nav-inicial), var(--cor-gradiente-nav-final));
  356. border-radius: 20px;
  357. font-size: 0;
  358. width: 100%;
  359. max-width: 450px;
  360. height: auto;
  361. position: sticky;
  362. margin-top: 20px;
  363. margin-bottom: 10px;
  364. display: flex;
  365. justify-content: space-around;
  366. align-items: center;
  367. }
  368. nav span {
  369. line-height: 45px;
  370. height: 100%;
  371. position: relative;
  372. z-index: 1;
  373. text-decoration: none;
  374. text-align: center;
  375. color: white !important;
  376. cursor: alias;
  377. }
  378. nav span svg {
  379. fill: var(--cor-icon-config);
  380. }
  381. nav .animation {
  382. position: absolute;
  383. height: 100%;
  384. top: 0;
  385. z-index: 0;
  386. transition: all .5s ease 0s;
  387. border-radius: 8px;
  388. }
  389. a:nth-child(1) {
  390. width: 30%;
  391. }
  392. a:nth-child(2) {
  393. width: 30%;
  394. }
  395. a:nth-child(3) {
  396. width: 40%;
  397. }
  398. nav .start-home,
  399. a:nth-child(1):hover~.animation {
  400. width: 30%;
  401. left: 0;
  402. background-color: #1212123f;
  403. border-radius: 20px;
  404. }
  405. nav .start-about,
  406. a:nth-child(2):hover~.animation {
  407. width: 30%;
  408. ;
  409. left: 30%;
  410. background-color: #1212123f;
  411. border-radius: 20px;
  412. }
  413. nav .start-blog,
  414. a:nth-child(3):hover~.animation {
  415. width: 40%;
  416. left: 60%;
  417. background-color: #1212123f;
  418. border-radius: 20px;
  419. }
  420. body {
  421. font-size: 12px;
  422. font-family: sans-serif;
  423. background: color #1212123f;
  424. }
  425. @media (min-width: 768px) {
  426. .container,
  427. .container-md,
  428. .container-sm {
  429. max-width: 100%;
  430. }
  431. }
  432. .rede {
  433. color: #ff0000;
  434. }
  435. .iplocal {
  436. color: #ffffff;
  437. }
  438. .containerlocal {
  439. background: #0808083f;
  440. border-radius: 20px;
  441. border: 1px solid #1e1e1e !important;
  442. padding: 15px !important;
  443. width: 95%;
  444. max-width: 450px;
  445. height: initial;
  446. position: absolute;
  447. margin-top: 700px;
  448. margin-bottom: -66px;
  449. }
  450. .hidden {
  451. display: none;
  452. }
  453. </style>
  454. </head>
  455. <body>
  456. <div class="containerlocal">
  457. <span class="font-semibold text-xs mr-2"
  458. style="color: #ffffff;"">📢 IP Local da sua operadora:</span><span class=" rede font-semibold text-xs mr-2"
  459. id="name">REDE</span> <span class="iplocal font-semibold text-xs" id="ip">127.0.0.1</span>
  460. </div>
  461. <div class="container">
  462. <div class="wrapper">
  463. <div class="heading">
  464. <h3>ANO NOVO</h3>
  465. <h1>2024</h1>
  466. </div>
  467. <div class="countdown">
  468. <div class="box">
  469. <span class="num" id="day-box">00</span>
  470. <span class="text">Dias</span>
  471. </div>
  472. <div class="box">
  473. <span class="num" id="hr-box">00</span>
  474. <span class="text">Horas</span>
  475. </div>
  476. <div class="box">
  477. <span class="num" id="min-box">00</span>
  478. <span class="text">Minutos</span>
  479. </div>
  480. <div class="box">
  481. <span class="num" id="sec-box">00</span>
  482. <span class="text">Segundos</span>
  483. </div>
  484. </div>
  485. </div>
  486. <!-- Script -->
  487. <script>
  488. let dayBox = document.getElementById("day-box");
  489. let hrBox = document.getElementById("hr-box");
  490. let minBox = document.getElementById("min-box");
  491. let secBox = document.getElementById("sec-box");
  492. let endDate = new Date(2024, 0, 1, 00, 00);
  493. let endTime = endDate.getTime();
  494. function countdown() {
  495. let todayDate = new Date();
  496. let todayTime = todayDate.getTime();
  497. let remainingTime = endTime - todayTime;
  498. let oneMin = 60 * 1000;
  499. let oneHr = 60 * oneMin;
  500. let oneDay = 24 * oneHr;
  501. let addZeroes = (num) => (num < 10 ? `0${num}` : num);
  502. if (endTime < todayTime) {
  503. clearInterval(i);
  504. document.querySelector(
  505. ".countdown"
  506. ).innerHTML = `<h1>Countdown Has Expired</h1>`;
  507. } else {
  508. let daysLeft = Math.floor(remainingTime / oneDay);
  509. let hrsLeft = Math.floor((remainingTime % oneDay) / oneHr);
  510. let minsLeft = Math.floor((remainingTime % oneHr) / oneMin);
  511. let secsLeft = Math.floor((remainingTime % oneMin) / 1000);
  512. dayBox.textContent = addZeroes(daysLeft);
  513. hrBox.textContent = addZeroes(hrsLeft);
  514. minBox.textContent = addZeroes(minsLeft);
  515. secBox.textContent = addZeroes(secsLeft);
  516. }
  517. }
  518. let i = setInterval(countdown, 1000);
  519. countdown();
  520. </script>
  521. <div class="card border-0 p-2 shadow mb-3 w-100">
  522. <img class="logo">
  523. <script>
  524. document.documentElement.style.setProperty('--logo-img-url',);
  525. </script>
  526. <div class="input-group mb-2 shadow" id="config-area">
  527. <input class="form-control" type="text" placeholder="CONFIGURAÇÃO" readonly title="configurações"
  528. id="config" style="background-color: #0808083f;" />
  529. <span class="input-group-text me-2">
  530. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  531. class="bi bi:bar-chart" viewBox="0 0 16 16">
  532. <path
  533. 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" />
  534. </svg>
  535. </span>
  536. </div>
  537. <div class="input-group input mb-2 shadow">
  538. <span class="input-group-text">
  539. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  540. class="bi bi:file-person" viewBox="0 0 16 16">
  541. <path
  542. 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" />
  543. <path d="M8 10a3 3 0 1 0 0-6a3 3 0 0 0 0 6z" />
  544. </g>
  545. </svg>
  546. </span>
  547. <input class="form-control" type="text" placeholder="usuario" id="username"
  548. style="background-color: #0808083f;" />
  549. </div>
  550. <div class="input-group input mb-2 shadow">
  551. <span class="input-group-text">
  552. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  553. class="bi bi:file-earmark-lock" viewBox="0 0 16 16">
  554. <path
  555. 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" />
  556. <path
  557. 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" />
  558. </g>
  559. </svg>
  560. </span>
  561. <input class="form-control" type="password" placeholder="senha" id="password"
  562. style="background-color: #0808083f;" />
  563. <span class="input-group-text me-2"
  564. onclick="password.type==`text`?password.type = `password`:password.type = `text`">
  565. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye"
  566. viewBox="0 0 16 16">
  567. <path
  568. 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" />
  569. <path
  570. 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" />
  571. </svg>
  572. </span>
  573. </div>
  574. <div class="input-group input mb-2 shadow">
  575. <span class="input-group-text">
  576. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-key"
  577. viewBox="0 0 16 16">
  578. <path
  579. 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" />
  580. <path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" />
  581. </svg>
  582. </span>
  583. <input class="form-control" type="text" placeholder="V2ray UUID" id="uuid"
  584. style="background: #0808083f;" />
  585. <span class="input-group-text me-2"
  586. onclick="uuid.type==`text`?uuid.type = `password`:uuid.type = `text`">
  587. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye"
  588. viewBox="0 0 16 16">
  589. <path
  590. 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" />
  591. <path
  592. 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" />
  593. </svg>
  594. </span>
  595. </div>
  596. <button class="btn btn-dark w-100 shadow" id="start-stop">INICIAR</button>
  597. <nav>
  598. <span id="sync" onclick="DtStartAppUpdate.execute()" class="fi fi-rr-refresh">
  599. <?xml version="1.0" encoding="UTF-8"?>
  600. <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="24" height="24">
  601. <path
  602. 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" />
  603. <path
  604. 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" />
  605. </svg>
  606. </span>
  607. <span id="logger" class="fi fi-rs-clipboard-list">
  608. <?xml version="1.0" encoding="UTF-8"?>
  609. <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="24" height="24">
  610. <path
  611. 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" />
  612. </svg>
  613. </span>
  614. <span aria-hidden="true" onclick="ToolsModal.show()" class="fi fi-rr-settings">
  615. <?xml version="1.0" encoding="UTF-8"?>
  616. <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24"
  617. width="24" height="24">
  618. <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" />
  619. <path
  620. 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" />
  621. </svg>
  622. </span>
  623. </nav>
  624. </div>
  625. <div class="card my-3 w-100 text-center border-0 p-2 shadow text-light fs-5 text-uppercase fw-bold" id="state"
  626. style="padding: 5px !important; font-size: 15px !important;">
  627. </div>
  628. <div class="modal fade" id="checkUserModal">
  629. <div class="modal-dialog modal-dialog-centered" role="document">
  630. <div class="modal-content rounded-3 shadow">
  631. <div class="modal-header border-bottom-0 pb-0">
  632. <h1 class="modal-title fs-5 chk-title text-light"></h1>
  633. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  634. aria-label="Close"></button>
  635. </div>
  636. <div class="modal-body text-center">
  637. <p class="fs-5 mb-0 chk-message text-light"></p>
  638. </div>
  639. </div>
  640. </div>
  641. </div>
  642. <div class="modal fade" id="errorModal">
  643. <div class="modal-dialog modal-dialog-centered" role="document">
  644. <div class="modal-content rounded-3 shadow">
  645. <div class="modal-header border-bottom-0 pb-0">
  646. <h1 class="modal-title fs-5 err-title text-light"></h1>
  647. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  648. aria-label="Close"></button>
  649. </div>
  650. <div class="modal-body text-center">
  651. <p class="fs-5 mb-0 err-message text-light"></p>
  652. </div>
  653. </div>
  654. </div>
  655. </div>
  656. <div class="modal fade" id="loggerModal">
  657. <div class="modal-dialog modal-dialog-centered" role="document">
  658. <div class="modal-content rounded-3 shadow">
  659. <div class="modal-body p-1 text-center">
  660. <ul class="list-group bg-transparent overflow-y-auto logger-content" style="max-height: 600px;">
  661. </ul>
  662. </div>
  663. <div class="modal-footer flex-nowrap p-0">
  664. <button type="button" class="btn btn-lg btn-dark text-light w-100 clear-logger">LIMPAR</button>
  665. <button type="button" class="btn btn-lg btn-dark text-light w-100"
  666. data-bs-dismiss="modal">FECHAR</button>
  667. </div>
  668. </div>
  669. </div>
  670. </div>
  671. <div class="tool webm modal fade" index="-1" id="ToolsModal">
  672. <div class="modal-dialog modal-dialog-centered" role="document">
  673. <div class="modal-content">
  674. <div class="tool modal-header">
  675. <h5 class="modal-title text_config">Configurações do aplicativo</h5>
  676. </div>
  677. <div class="modal-body">
  678. <button class="tool-bt rounded-2xl text-white" onclick="DtStartApnActivity.execute()"><i
  679. class="info2 bi bi-wifi mr-2"></i>Alterar protocolo de APN</button>
  680. </div>
  681. <div class="modal-body">
  682. <button class="tool-bt rounded-2xl text-white"
  683. onclick="DtIgnoreBatteryOptimizations.execute()"><i
  684. class="info2 bi bi-battery-full mr-2"></i>Otimizar Bateria</button>
  685. </div>
  686. <div class="modal-body">
  687. <button class="tool-bt rounded-2xl text-white" id="btnHotSpot"><i
  688. class="info2 bi bi-trash3 mr-2"></i>Compartilhar Internet</button>
  689. </div>
  690. <div class="modal-body">
  691. <button class="tool-bt rounded-2xl text-white" onclick="DtCleanApp.execute()"><i
  692. class="info2 bi bi-trash3 mr-2"></i>Limpar cachê e dados</button>
  693. </div>
  694. <div class="tool modal-footer">
  695. <button type="button" class="btn btn-primary" data-bs-dismiss="modal"
  696. style="background-color: var(--btn-modal);">FECHAR</button>
  697. </div>
  698. </div>
  699. </div>
  700. </div>
  701. <div class="modal fade" id="configModal">
  702. <div class="modal-dialog modal-dialog-centered" role="document">
  703. <div class="modal-content rounded-3 shadow">
  704. <div class="modal-header border-bottom-0 pb-0">
  705. <h1 class="modal-title fs-5 text-white">CONFIGURAÇÕES</h1>
  706. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  707. aria-label="Close"></button>
  708. </div>
  709. <div class="modal-body p-1 text-center">
  710. <ul class="list-group bg-transparent overflow-y-auto config-body" style="max-height: 600px;">
  711. <li class="list-group-item bg-transparent text-white border-0">
  712. <p>CATEGORIA</p>
  713. <ul class="list-group bg-transparent overflow-y-auto text-start">
  714. <li
  715. class="list-group-item d-flex bg-transparent text-white border-0 border-bottom rounded-0">
  716. <img src="https://cdn-icons-png.flaticon.com/512/3686/3686811.png" width="40"
  717. height="40">
  718. <div class="d-flex flex-column ms-2 w-100">
  719. <span>CONFIG 01</span>
  720. <span>DESC 01</span>
  721. </div>
  722. <div class="d-flex flex-column ms-2 w-100">
  723. <span class="text-end">CONFIG_MODE</span>
  724. </div>
  725. </li>
  726. </ul>
  727. </li>
  728. </ul>
  729. </div>
  730. </div>
  731. </div>
  732. </div>
  733. <div class="modal fade" id="RenovarModal">
  734. <div class="modal-dialog modal-dialog-centered" role="document">
  735. <div class="modal-content rounded-3 shadow">
  736. <div class="modal-header border-bottom-0 py-3">
  737. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  738. aria-label="Close"></button>
  739. </div>
  740. <div class="modal-body ratio rounded-bottom-3" style="height: 600px;">
  741. <div class="spinner d-flex w-100 h-100 align-items-center justify-content-center">
  742. <div class="spinner-border text-light p-5" role="status">
  743. <span class="visually-hidden">Loading...</span>
  744. </div>
  745. </div>
  746. <iframe class="rounded-bottom-3" id="RenovarFrame"></iframe>
  747. </div>
  748. </div>
  749. </div>
  750. </div>
  751. <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
  752. <script>
  753. const startHotSpot = () => {
  754. DtStartHotSpotService.execute();
  755. txtbtn.textContent = 'HOTSPOT';
  756. }
  757. const stopHotSpot = () => {
  758. DtStopHotSpotService.execute();
  759. txtbtn.textContent = 'HOTSPOT';
  760. }
  761. const toggleHotSpot = () => {
  762. const hotSpotStatus = window?.DtGetStatusHotSpotService?.execute() ?? 'STOPPED';
  763. hotSpotStatus == 'RUNNING' ? stopHotSpot() : startHotSpot();
  764. }
  765. const btnHotSpot = document.querySelector("#btnHotSpot");
  766. btnHotSpot.addEventListener('click', toggleHotSpot);
  767. const hotSpotStatus = window?.DtGetStatusHotSpotService?.execute() ?? 'STOPPED';
  768. if (hotSpotStatus == 'RUNNING') {
  769. txtbtn.textContent = 'HOTSPOT';
  770. }
  771. </script>
  772. <script>
  773. class AndroidMock {
  774. static getLocalIP() {
  775. return '192.168.0.1';
  776. }
  777. static getConfig() {
  778. return JSON.stringify({
  779. urlCheckUser: 'URLAQUI'
  780. });
  781. }
  782. static getNetworkName() {
  783. return 'REDE';
  784. }
  785. static openRadioInfo() {
  786. console.log('openRadioInfo');
  787. }
  788. }
  789. </script>
  790. <script>
  791. function showLocalIP(android) {
  792. console.log(android.getNetworkName());
  793. document.getElementById('name').innerHTML = ' ' + android.getNetworkName() + ':';
  794. document.getElementById('ip').innerHTML = android.getLocalIP();
  795. setInterval(() => {
  796. document.getElementById('name').innerHTML =
  797. ' ' + android.getNetworkName() + ':';
  798. document.getElementById('ip').innerHTML = android.getLocalIP();
  799. }, 2000)
  800. }
  801. window.onload = function () {
  802. const android = window.Android || AndroidMock;
  803. showLocalIP(android);
  804. }
  805. function mostrar(id) {
  806. if (document.getElementById(id).style.display !== "none") {
  807. document.getElementById(id).style.display = "none";
  808. return;
  809. }
  810. Array.from(document.getElementsByClassName("hidden")).forEach(
  811. div => (div.style.display = "none")
  812. );
  813. document.getElementById(id).style.display = "block";
  814. }
  815. </script>
  816. <script>
  817. const configArea = document.querySelector('#config-area')
  818. const config = document.querySelector('#config')
  819. const username = document.querySelector('#username')
  820. const password = document.querySelector('#password')
  821. const uuid = document.querySelector('#uuid')
  822. const logger = document.querySelector('#logger')
  823. const networkStatus = document.querySelector('#section.local-ip')
  824. const startStopVpn = document.querySelector('#start-stop')
  825. const stateStatus = document.querySelector('#state')
  826. const loggerModal = new bootstrap.Modal(document.querySelector('#loggerModal'))
  827. const checkUserModal = new bootstrap.Modal(document.querySelector('#checkUserModal'))
  828. const errorModal = new bootstrap.Modal(document.querySelector('#errorModal'))
  829. const configModal = new bootstrap.Modal(document.querySelector('#configModal'))
  830. const ToolsModal = new bootstrap.Modal(document.querySelector('#ToolsModal'))
  831. const clearLogger = document.querySelector('.clear-logger')
  832. const RenovarModal = new bootstrap.Modal(document.querySelector('#RenovarModal'))
  833. configArea.addEventListener('click', e => showConfigsModal())
  834. username.addEventListener('input', e => DtUsername.set(e.target.value))
  835. password.addEventListener('input', e => DtPassword.set(e.target.value))
  836. uuid.addEventListener('input', e => DtUuid.set(e.target.value))
  837. logger.addEventListener('click', e => loggerModal.show())
  838. startStopVpn.addEventListener('click', (e) => {
  839. if (DtGetVpnState.execute() != 'DISCONNECTED') {
  840. DtExecuteVpnStop.execute()
  841. } else {
  842. DtExecuteVpnStart.execute()
  843. }
  844. })
  845. clearLogger.addEventListener('click', () => DtClearLogs.execute())
  846. RenovarModal._element.addEventListener('shown.bs.modal', () => {
  847. const iframe = document.querySelector('#RenovarFrame');
  848. if (!iframe.src) {
  849. iframe.src = 'https://painel.plenonet.com.br/renovar.php'
  850. iframe.addEventListener('load', () => {
  851. mp3Modal._element.querySelector('.spinner').classList.add('d-none')
  852. })
  853. }
  854. })
  855. RenovarModal._element.addEventListener('hide.bs.modal', () => {
  856. const iframe = document.querySelector('#RenovarFrame');
  857. iframe.src = '';
  858. })
  859. Object.defineProperty(String.prototype, 't', {
  860. value: function t() {
  861. return window?.DtTranslateText?.execute('' + this) ?? '' + this
  862. },
  863. writable: true,
  864. configurable: true,
  865. })
  866. const dtConfigClickListener = () => {
  867. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{ "auth": {}, "mode": "v2ray" }`)
  868. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  869. config.placeholder = data.name ?? 'LBL_CHOOSE_CONFIG'.t()
  870. username.parentElement.style.display = !data?.auth?.username && !isV2ray ? 'flex' : 'none';
  871. password.parentElement.style.display = !data?.auth?.password && !isV2ray ? 'flex' : 'none';
  872. uuid.parentElement.style.display = !data?.auth?.v2ray_uuid && isV2ray ? 'flex' : 'none';
  873. }
  874. const dtVpnStateListener = state => {
  875. const isRunning = state != 'DISCONNECTED';
  876. stateStatus.innerHTML = ('LBL_STATE_' + state).t()
  877. startStopVpn.innerHTML = isRunning ? 'LBL_BTN_STOP'.t() : 'LBL_BTN_START'.t()
  878. if (isRunning) {
  879. username.setAttribute('readonly', 'true')
  880. password.setAttribute('readonly', 'true')
  881. } else {
  882. username.removeAttribute('readonly')
  883. password.removeAttribute('readonly')
  884. }
  885. if (state == 'CONNECTING') dtShowSuccessToastListener('Conectando...')
  886. }
  887. const dtCheckUserStartedListener = () => {
  888. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{}`)
  889. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  890. if (isV2ray) return;
  891. const html = `
  892. <div class="d-flex justify-content-center">
  893. <div class="spinner-border p-5" role="status">
  894. <span class="visually-hidden">Loading...</span>
  895. </div>
  896. </div>
  897. `
  898. checkUserModal._element.querySelector('.chk-title').textContent = 'CHECK USER'
  899. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  900. checkUserModal.show()
  901. }
  902. function isBeforeExpiration(expirationDays, daysBefore) {
  903. return expirationDays <= daysBefore;
  904. }
  905. const dtCheckUserModelListener = model => {
  906. const data = JSON.parse(model ?? `{"username": "test"}`);
  907. const html = `
  908. <div class="d-flex flex-column text-white">
  909. <span>👤Nome de usuario: ${data.username}</span>
  910. <span>📆Expira em: ${data.expiration_date}</span>
  911. <span>📆Dias restantes: ${data.expiration_days}</span>
  912. <span>🚫Conexoes: ${data.count_connections}|${data.limit_connections}</span>
  913. ${isBeforeExpiration(data.expiration_days, 3) ? '<span><center>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</center><span><span><center>⚠️Faltando 3 dias para o expirar o usuário⚠️</center></span>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</span></span>' : ''}
  914. ${isBeforeExpiration(data.expiration_days, 2) ? '<span><span><span><center>⚠️Faltando 2 dias para o expirar o usuário⚠️</center></span><center>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</center></span></span>' : ''}
  915. ${isBeforeExpiration(data.expiration_days, 1) ? '<span><span><span><center>⚠️Faltando 1 dias para o expirar o usuário⚠️</center></span><center>🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨</center></span></span>' : ''}
  916. </div>
  917. `;
  918. checkUserModal._element.querySelector('.chk-title').textContent = '📆 Olá, ' + data.username.toUpperCase() + '👤';
  919. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  920. checkUserModal.show();
  921. }
  922. const dtMessageErrorListener = message => {
  923. const data = JSON.parse(message)
  924. errorModal._element.querySelector('.err-title').textContent = data.title;
  925. errorModal._element.querySelector('.err-message').innerHTML = data.content;
  926. errorModal.show()
  927. }
  928. const dtOnNewLogListener = () => {
  929. const mock = [];
  930. for (let i = 0; i < 30; i++) {
  931. mock.push({ 'TIME': 'MESSAGE ' + i })
  932. }
  933. const log = window?.DtGetLogs?.execute() || JSON.stringify(mock)
  934. const data = JSON.parse(log)
  935. let content = '';
  936. data.forEach(item => {
  937. content += '<li class="list-group-item fs-6 bg-transparent text-white p-0 border-0 text-start ms-2 text-wrap">';
  938. content += Object.keys(item)[0] + " " + item[Object.keys(item)]
  939. content += '</li>';
  940. })
  941. loggerModal._element.querySelector('.logger-content').innerHTML = content;
  942. const listGroup = loggerModal._element.querySelector('.list-group')
  943. listGroup.scrollTo(0, listGroup.scrollHeight)
  944. }
  945. const dtVpnStartedSuccessListener = () => dtShowSuccessToastListener('Conectado com sucesso')
  946. const dtVpnStoppedSuccessListener = () => dtShowSuccessToastListener('Desconectado com sucesso')
  947. const dtShowSuccessToastListener = text => {
  948. Toastify({
  949. text: text,
  950. close: true,
  951. style: {
  952. background: 'linear-gradient(to right, #00b09b, #96c93d)',
  953. marginTop: '35px',
  954. }
  955. }).showToast()
  956. }
  957. const dtShowErrorToastListener = text => {
  958. Toastify({
  959. text: text,
  960. close: true,
  961. style: {
  962. background: 'linear-gradient(to right, #ff5c33, #e69900)',
  963. marginTop: '35px',
  964. }
  965. }).showToast()
  966. }
  967. const showConfigsModal = () => {
  968. 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"}]}]'
  969. const data = JSON.parse(window?.DtGetConfigs?.execute() || mock)
  970. data.sort((a, b) => a.sorter - b.sorter)
  971. data.forEach(item => item.items.sort((a, b) => a.sorter - b.sorter))
  972. const body = configModal._element.querySelector('.config-body')
  973. body.innerHTML = ''
  974. data.forEach(category => {
  975. const categoryElement = document.createElement('li')
  976. categoryElement.classList.add('list-group-item', 'bg-transparent', 'text-white', 'border-0', 'mb-1', 'rounded-1', 'px-1')
  977. categoryElement.innerHTML = `<span class="fw-bold btn-dark w-100 d-block p-1 rounded-1 mb-1">${category.name}</span>`
  978. const configUlElement = document.createElement('ul')
  979. configUlElement.classList.add('list-group', 'bg-transparent', 'overflow-y-auto')
  980. category.items.forEach(item => {
  981. const configElement = document.createElement('li')
  982. configElement.classList.add('list-group-item', 'd-flex', 'btn-dark', 'text-white', 'border-0', 'rounded-2', 'px-1', 'py-2', 'mb-1')
  983. configElement.innerHTML = `
  984. <img src="${item.icon}" width="40" height="40">
  985. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  986. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">${item.name}</span>
  987. <span class="fst-italic fw-bold" style="font-size: 0.7rem;">${item.description || ''}</span>
  988. </div>
  989. <div class="d-flex flex-column ms-2">
  990. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">${item.mode}</span>
  991. </div>
  992. </li>
  993. `
  994. configElement.addEventListener('click', e => {
  995. window?.DtSetConfig?.execute(item.id)
  996. configModal.hide()
  997. })
  998. configUlElement.appendChild(configElement)
  999. })
  1000. categoryElement.appendChild(configUlElement)
  1001. body.appendChild(categoryElement)
  1002. })
  1003. configModal.show()
  1004. }
  1005. username.value = window?.DtUsername?.get() ?? ''
  1006. password.value = window?.DtPassword?.get() ?? ''
  1007. uuid.value = window?.DtUuid?.get() ?? ''
  1008. username.placeholder = 'LBL_USERNAME'.t()
  1009. password.placeholder = 'LBL_PASSWORD'.t()
  1010. uuid.placeholder = 'LBL_UUID'.t()
  1011. dtOnNewLogListener()
  1012. dtVpnStateListener(window?.DtGetVpnState?.execute() ?? 'DISCONNECTED')
  1013. dtConfigClickListener()
  1014. console.log('ODAIR.Dev!🚀')
  1015. </script>
  1016. </body>
  1017. </html>

comments powered by Disqus