Tema online


SUBMITTED BY: anbach

DATE: Nov. 20, 2023, 2:32 a.m.

UPDATED: March 7, 2024, 1:59 a.m.

FORMAT: Text only

SIZE: 50.9 kB

HITS: 7111

  1. [
  2. {
  3. "id": 22166,
  4. "label": "Nome do app",
  5. "name": "APP_NAME",
  6. "value": null,
  7. "type": "STRING",
  8. "status": "ACTIVE",
  9. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  10. },
  11. {
  12. "id": 22167,
  13. "label": "Logo do app",
  14. "name": "APP_LOGO",
  15. "value": "https://i.ibb.co/j4Q48sG/DT040a9i8j.png",
  16. "type": "IMAGE",
  17. "status": "ACTIVE",
  18. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  19. },
  20. {
  21. "id": 22168,
  22. "label": "Imagem de fundo",
  23. "name": "APP_BACKGROUND_IMAGE",
  24. "value": null,
  25. "type": "IMAGE",
  26. "status": "ACTIVE",
  27. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  28. },
  29. {
  30. "id": 22169,
  31. "label": "Tipo do fundo do app",
  32. "name": "APP_BACKGROUND_TYPE",
  33. "value": {
  34. "options": [
  35. {
  36. "label": "Imagem",
  37. "value": "IMAGE"
  38. },
  39. {
  40. "label": "Cor",
  41. "value": "COLOR"
  42. }
  43. ],
  44. "selected": "COLOR"
  45. },
  46. "type": "SELECT",
  47. "status": "ACTIVE",
  48. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  49. },
  50. {
  51. "id": 22170,
  52. "label": "Cor de fundo",
  53. "name": "APP_BACKGROUND_COLOR",
  54. "value": "#080e16c7",
  55. "type": "COLOR",
  56. "status": "ACTIVE",
  57. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  58. },
  59. {
  60. "id": 22171,
  61. "label": "Cor do card inicial",
  62. "name": "APP_CARD_COLOR",
  63. "value": "#1d242e73",
  64. "type": "COLOR",
  65. "status": "ACTIVE",
  66. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  67. },
  68. {
  69. "id": 22172,
  70. "label": "Raio do card inicial",
  71. "name": "APP_CARD_RADIUS",
  72. "value": 20,
  73. "type": "INTEGER",
  74. "status": "ACTIVE",
  75. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  76. },
  77. {
  78. "id": 22173,
  79. "label": "Cor do card de status",
  80. "name": "APP_CARD_STATUS_COLOR",
  81. "value": "#1d242e73",
  82. "type": "COLOR",
  83. "status": "ACTIVE",
  84. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  85. },
  86. {
  87. "id": 22174,
  88. "label": "Raio do card de status",
  89. "name": "APP_CARD_STATUS_RADIUS",
  90. "value": 25,
  91. "type": "INTEGER",
  92. "status": "ACTIVE",
  93. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  94. },
  95. {
  96. "id": 22175,
  97. "label": "Cor do card de configurações",
  98. "name": "APP_CARD_CONFIG_COLOR",
  99. "value": "#4298e182",
  100. "type": "COLOR",
  101. "status": "ACTIVE",
  102. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  103. },
  104. {
  105. "id": 22176,
  106. "label": "Cor do fundo dos dialogs",
  107. "name": "APP_DIALOG_BACKGROUND_COLOR",
  108. "value": "#4298e182",
  109. "type": "COLOR",
  110. "status": "ACTIVE",
  111. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  112. },
  113. {
  114. "id": 22177,
  115. "label": "Cor do fundo do dialog de log",
  116. "name": "APP_DIALOG_LOGGER_COLOR",
  117. "value": "#4298e182",
  118. "type": "COLOR",
  119. "status": "ACTIVE",
  120. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  121. },
  122. {
  123. "id": 22178,
  124. "label": "Cor das bordas",
  125. "name": "APP_BORDER_COLOR",
  126. "value": "#1d242e73",
  127. "type": "COLOR",
  128. "status": "ACTIVE",
  129. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  130. },
  131. {
  132. "id": 22179,
  133. "label": "Cor dos inputs",
  134. "name": "APP_INPUT_COLOR",
  135. "value": "#1d242e73",
  136. "type": "COLOR",
  137. "status": "ACTIVE",
  138. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  139. },
  140. {
  141. "id": 22180,
  142. "label": "Raio dos inputs",
  143. "name": "APP_INPUT_RADIUS",
  144. "value": 25,
  145. "type": "INTEGER",
  146. "status": "ACTIVE",
  147. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  148. },
  149. {
  150. "id": 22181,
  151. "label": "Cor dos textos",
  152. "name": "APP_TEXT_COLOR",
  153. "value": "#FFFFFFFF",
  154. "type": "COLOR",
  155. "status": "ACTIVE",
  156. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  157. },
  158. {
  159. "id": 22182,
  160. "label": "Cor dos botões",
  161. "name": "APP_BUTTON_COLOR",
  162. "value": "#1d242e73",
  163. "type": "COLOR",
  164. "status": "ACTIVE",
  165. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  166. },
  167. {
  168. "id": 22183,
  169. "label": "Raio dos botões",
  170. "name": "APP_BUTTON_RADIUS",
  171. "value": 25,
  172. "type": "INTEGER",
  173. "status": "ACTIVE",
  174. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  175. },
  176. {
  177. "id": 22184,
  178. "label": "Cor dos icones",
  179. "name": "APP_ICON_COLOR",
  180. "value": "#FFFFFFFF",
  181. "type": "COLOR",
  182. "status": "ACTIVE",
  183. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  184. },
  185. {
  186. "id": 22185,
  187. "label": "Exibir modo de conexão",
  188. "name": "APP_SHOW_CONNECTION_MODE",
  189. "value": true,
  190. "type": "BOOLEAN",
  191. "status": "ACTIVE",
  192. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  193. },
  194. {
  195. "id": 22871,
  196. "label": "Atualizar automaticamente as configurações ao lançar uma atualização.",
  197. "name": "APP_CONFIG_AUTO_UPDATE",
  198. "value": true,
  199. "type": "BOOLEAN",
  200. "status": "ACTIVE",
  201. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  202. },
  203. {
  204. "id": 22186,
  205. "label": "Iniciar o app automaticamente ao reiniciar o dispositivo",
  206. "name": "APP_AUTO_START",
  207. "value": false,
  208. "type": "BOOLEAN",
  209. "status": "ACTIVE",
  210. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  211. },
  212. {
  213. "id": 22187,
  214. "label": "Usar limiter de conexão",
  215. "name": "APP_CONNECTION_LIMITER",
  216. "value": false,
  217. "type": "BOOLEAN",
  218. "status": "ACTIVE",
  219. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  220. },
  221. {
  222. "id": 22188,
  223. "label": "Usar botão de atualizações",
  224. "name": "APP_BTN_UPDATE_ENABLED",
  225. "value": false,
  226. "type": "BOOLEAN",
  227. "status": "ACTIVE",
  228. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  229. },
  230. {
  231. "id": 22189,
  232. "label": "Usar botão de registros",
  233. "name": "APP_BTN_LOGGER_ENABLED",
  234. "value": false,
  235. "type": "BOOLEAN",
  236. "status": "ACTIVE",
  237. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  238. },
  239. {
  240. "id": 22190,
  241. "label": "Usar botão de pagina webview",
  242. "name": "APP_BTN_PAGE_ENABLED",
  243. "value": false,
  244. "type": "BOOLEAN",
  245. "status": "ACTIVE",
  246. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  247. },
  248. {
  249. "id": 22191,
  250. "label": "Ativar dialog de erros",
  251. "name": "APP_DIALOG_ERROR_ENABLED",
  252. "value": false,
  253. "type": "BOOLEAN",
  254. "status": "ACTIVE",
  255. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  256. },
  257. {
  258. "id": 22192,
  259. "label": "Ativar dialog de checkuser",
  260. "name": "APP_CHECKUSER_DIALOG_ENABLED",
  261. "value": false,
  262. "type": "BOOLEAN",
  263. "status": "ACTIVE",
  264. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  265. },
  266. {
  267. "id": 22193,
  268. "label": "Ativar toast de sucesso",
  269. "name": "APP_SUCCESS_TOAST_ENABLED",
  270. "value": true,
  271. "type": "BOOLEAN",
  272. "status": "ACTIVE",
  273. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  274. },
  275. {
  276. "id": 22194,
  277. "label": "Ativar toast de erro",
  278. "name": "APP_ERROR_TOAST_ENABLED",
  279. "value": false,
  280. "type": "BOOLEAN",
  281. "status": "ACTIVE",
  282. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  283. },
  284. {
  285. "id": 22195,
  286. "label": "Usar layout webview",
  287. "name": "APP_LAYOUT_WEBVIEW_ENABLED",
  288. "value": true,
  289. "type": "BOOLEAN",
  290. "status": "ACTIVE",
  291. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  292. },
  293. {
  294. "id": 22196,
  295. "label": "Mensagem",
  296. "name": "APP_MESSAGE",
  297. "value": null,
  298. "type": "TEXT",
  299. "status": "ACTIVE",
  300. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  301. },
  302. {
  303. "id": 22197,
  304. "label": "URL de atualização do aplicativo",
  305. "name": "APP_UPDATE_URL",
  306. "value": null,
  307. "type": "URL",
  308. "status": "ACTIVE",
  309. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  310. },
  311. {
  312. "id": 22198,
  313. "label": "Tipo de mensagem",
  314. "name": "APP_MESSAGE_TYPE",
  315. "value": {
  316. "options": [
  317. {
  318. "label": "Alerta",
  319. "value": "ALERT"
  320. },
  321. {
  322. "label": "Informação",
  323. "value": "INFO"
  324. },
  325. {
  326. "label": "Boas vindas",
  327. "value": "WELCOME"
  328. },
  329. {
  330. "label": "Sem mensagem",
  331. "value": "NONE"
  332. }
  333. ],
  334. "selected": "NONE"
  335. },
  336. "type": "SELECT",
  337. "status": "ACTIVE",
  338. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  339. },
  340. {
  341. "id": 22199,
  342. "label": "LAYOUT WEBVIEW (POR SUA CONTA E RISCO)",
  343. "name": "APP_LAYOUT_WEBVIEW",
  344. "value": "<!DOCTYPE html>
  345. <html lang="pt-BR">
  346. <head>
  347. <meta charset="UTF-8" />
  348. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  349. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  350. <title>PicaPau</title>
  351. <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
  352. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
  353. integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
  354. <script type="text/javascript"
  355. src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
  356. integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
  357. crossorigin="anonymous"></script>
  358. <link rel='stylesheet'
  359. href='https://cdn-uicons.flaticon.com/2.0.0/uicons-regular-rounded/css/uicons-regular-rounded.css'>
  360. <style>
  361. @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');
  362. :root {
  363. /*------------------------------------------------------------------------EDITE SOMENTE AQUI INICIAL-----------------------------------------------------------------------------*/
  364. --background-img: url(https://i.ibb.co/4FdBxhq/960402-adapted-1080x2340.jpg);
  365. /* URL da Fundo de vocês... pode ser Gif tambem */
  366. --logo-img-url: url(https://i.ibb.co/jbCDXXC/coollogo-com-27815824.png);
  367. /* URL da Logo de vocês... pode ser Gif tambem... recomendo acima de 256px por 256px no tamanho preferencia sempre padrão quadrado */
  368. --blur-amount: 5px;
  369. /* Valor padrão para o desfoque do vidro */
  370. --cor-gradiente-nav-inicial: #f76c6c21;
  371. /* Cor inicial do gradiente */
  372. --cor-gradiente-nav-final: #f76c6c00;
  373. /* Cor final do gradiente */
  374. --cor-gradiente-btstart-incial: #f76c6c21;
  375. /* Cor Botão Start inicial do gradiente */
  376. --cor-gradiente-btstart-final: #f76c6c00;
  377. /* Cor Botão Start final do gradiente */
  378. /*------------------------------------------------------------------------EDITE SOMENTE AQUI FINALLLL-----------------------------------------------------------------------------*/
  379. --input-border-radius: 5px;
  380. --input-background-color: #0a091a55;
  381. --card-border-radius: 5px;
  382. --card-background-color: #0b092868;
  383. --btn-background-color: #0a091a55;
  384. --btn-border-radius: 5px;
  385. --modal-background-color: #0b092868;
  386. --text-color: #ffffff;
  387. --icon-color: #FFFFFF;
  388. }
  389. * {
  390. margin: 0;
  391. padding: 0;
  392. box-sizing: border-box;
  393. font-family: 'Roboto', sans-serif;
  394. }
  395. body {
  396. height: 100vh;
  397. display: flex;
  398. flex-direction: column;
  399. align-items: center;
  400. justify-content: center;
  401. background-repeat: no-repeat;
  402. background-size: cover;
  403. }
  404. .container {
  405. height: 100%;
  406. display: flex;
  407. flex-direction: column;
  408. justify-content: center;
  409. align-items: center;
  410. max-width: 465px;
  411. background: var(--background-img);
  412. background-position: center;
  413. background-repeat: no-repeat;
  414. background-size: cover;
  415. }
  416. .logo {
  417. width: 100%;
  418. display: block;
  419. margin-top: -89px;
  420. margin-bottom: -65px;
  421. margin-left: auto;
  422. margin-right: auto;
  423. content: var(--logo-img-url);
  424. }
  425. .card {
  426. backdrop-filter: blur(var(--blur-amount));
  427. background: #0808083f;
  428. border-radius: 20px;
  429. border: 1px solid #1e1e1e !important;
  430. box-shadow: -8px 12px 20px 0 rgb(13 15 18 / 63%) !important;
  431. padding: 15px !important;
  432. max-width: 450px;
  433. height: auto;
  434. position: relative;
  435. }
  436. .btn-dark {
  437. border: none;
  438. background: linear-gradient(var(--cor-gradiente-btstart-incial), var(--cor-gradiente-btstart-final));
  439. border-radius: 15px;
  440. }
  441. .modal-content {
  442. background-color: transparent;
  443. backdrop-filter: blur(25px);
  444. }
  445. .tool {
  446. align-items: center;
  447. justify-content: center;
  448. text-align: center;
  449. }
  450. .tool-bt {
  451. background: linear-gradient(to top right, #ff00003f, #1212123f);
  452. border-radius: 20px;
  453. color: #ffffff !important;
  454. height: 35px;
  455. width: 100%;
  456. border: var(--btn-border);
  457. }
  458. .input-group,
  459. .form-control,
  460. .input-group-text {
  461. background: #0808083f;
  462. color: var(--icon-color);
  463. border: none;
  464. border-radius: 15px;
  465. outline: none;
  466. }
  467. .form-control::placeholder {
  468. color: var(--text-color);
  469. }
  470. .form-control:focus {
  471. color: var(--text-color);
  472. outline: none;
  473. box-shadow: none;
  474. }
  475. .input-group-text {
  476. padding-right: 0;
  477. }
  478. .fs-5 {
  479. font-size: 1rem !important;
  480. }
  481. nav {
  482. background: linear-gradient(var(--cor-gradiente-nav-inicial), var(--cor-gradiente-nav-final));
  483. border-radius: 20px;
  484. font-size: 0;
  485. width: 100%;
  486. max-width: 450px;
  487. height: auto;
  488. position: sticky;
  489. margin-top: 20px;
  490. margin-bottom: 10px;
  491. display: flex;
  492. justify-content: space-around;
  493. align-items: center;
  494. }
  495. nav span {
  496. line-height: 45px;
  497. height: 100%;
  498. position: relative;
  499. z-index: 1;
  500. text-decoration: none;
  501. text-align: center;
  502. color: white !important;
  503. cursor: alias;
  504. }
  505. nav span svg {
  506. fill: rgb(255, 255, 255);
  507. }
  508. nav .animation {
  509. position: absolute;
  510. height: 100%;
  511. top: 0;
  512. z-index: 0;
  513. transition: all .5s ease 0s;
  514. border-radius: 8px;
  515. }
  516. a:nth-child(1) {
  517. width: 30%;
  518. }
  519. a:nth-child(2) {
  520. width: 30%;
  521. }
  522. a:nth-child(3) {
  523. width: 40%;
  524. }
  525. nav .start-home,
  526. a:nth-child(1):hover~.animation {
  527. width: 30%;
  528. left: 0;
  529. background-color: #1212123f;
  530. border-radius: 20px;
  531. }
  532. nav .start-about,
  533. a:nth-child(2):hover~.animation {
  534. width: 30%;
  535. ;
  536. left: 30%;
  537. background-color: #1212123f;
  538. border-radius: 20px;
  539. }
  540. nav .start-blog,
  541. a:nth-child(3):hover~.animation {
  542. width: 40%;
  543. left: 60%;
  544. background-color: #1212123f;
  545. border-radius: 20px;
  546. }
  547. body {
  548. font-size: 12px;
  549. font-family: sans-serif;
  550. background: color #1212123f;
  551. }
  552. @media (min-width: 768px) {
  553. .container,
  554. .container-md,
  555. .container-sm {
  556. max-width: 100%;
  557. }
  558. }
  559. .rede {
  560. color: #ff0000;
  561. }
  562. .iplocal {
  563. color: #ffffff;
  564. }
  565. .containerlocal {
  566. background: #0808083f;
  567. border-radius: 20px;
  568. border: 1px solid #1e1e1e !important;
  569. padding: 15px !important;
  570. width: 95%;
  571. max-width: 450px;
  572. height: initial;
  573. position: absolute;
  574. margin-top: 700px;
  575. margin-bottom: -66px;
  576. }
  577. .hidden {
  578. display: none;
  579. }
  580. </style>
  581. </head>
  582. <body>
  583. <div class="containerlocal">
  584. <span class="font-semibold text-xs mr-2"
  585. style="color: #ffffff;"">📢 IP Local da sua operadora:</span><span class=" rede font-semibold text-xs mr-2"
  586. id="name">REDE</span> <span class="iplocal font-semibold text-xs" id="ip">127.0.0.1</span>
  587. </div>
  588. <div class="container">
  589. <div class="card border-0 p-2 shadow mb-3 w-100">
  590. <img class="logo">
  591. <!-- Atualize o atributo src usando JavaScript -->
  592. <script>
  593. document.documentElement.style.setProperty('--logo-img-url',);
  594. </script>
  595. <div class="input-group mb-2 shadow" id="config-area">
  596. <input class="form-control" type="text" placeholder="CONFIGURAÇÃO" readonly title="configurações"
  597. id="config" style="background-color: #0808083f;" />
  598. <span class="input-group-text me-2">
  599. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  600. class="bi bi:bar-chart" viewBox="0 0 16 16">
  601. <path
  602. 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" />
  603. </svg>
  604. </span>
  605. </div>
  606. <div class="input-group input mb-2 shadow">
  607. <span class="input-group-text">
  608. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  609. class="bi bi:file-person" viewBox="0 0 16 16">
  610. <path
  611. 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" />
  612. <path d="M8 10a3 3 0 1 0 0-6a3 3 0 0 0 0 6z" />
  613. </g>
  614. </svg>
  615. </span>
  616. <input class="form-control" type="text" placeholder="usuario" id="username"
  617. style="background-color: #0808083f;" />
  618. </div>
  619. <div class="input-group input mb-2 shadow">
  620. <span class="input-group-text">
  621. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor"
  622. class="bi bi:file-earmark-lock" viewBox="0 0 16 16">
  623. <path
  624. 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" />
  625. <path
  626. 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" />
  627. </g>
  628. </svg>
  629. </span>
  630. <input class="form-control" type="password" placeholder="senha" id="password"
  631. style="background-color: #0808083f;" />
  632. <span class="input-group-text me-2"
  633. onclick="password.type==`text`?password.type = `password`:password.type = `text`">
  634. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye"
  635. viewBox="0 0 16 16">
  636. <path
  637. 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" />
  638. <path
  639. 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" />
  640. </svg>
  641. </span>
  642. </div>
  643. <div class="input-group input mb-2 shadow">
  644. <span class="input-group-text">
  645. <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-key"
  646. viewBox="0 0 16 16">
  647. <path
  648. 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" />
  649. <path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" />
  650. </svg>
  651. </span>
  652. <input class="form-control" type="text" placeholder="V2ray UUID" id="uuid"
  653. style="background: #0808083f;" />
  654. <span class="input-group-text me-2"
  655. onclick="uuid.type==`text`?uuid.type = `password`:uuid.type = `text`">
  656. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye"
  657. viewBox="0 0 16 16">
  658. <path
  659. 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" />
  660. <path
  661. 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" />
  662. </svg>
  663. </span>
  664. </div>
  665. <button class="btn btn-dark w-100 shadow" id="start-stop">INICIAR</button>
  666. <nav>
  667. <span id="sync" onclick="DtStartAppUpdate.execute()" class="fi fi-rr-refresh">
  668. <?xml version="1.0" encoding="UTF-8"?>
  669. <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="24" height="24">
  670. <path
  671. 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" />
  672. <path
  673. 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" />
  674. </svg>
  675. </span>
  676. <span id="logger" class="fi fi-rs-clipboard-list">
  677. <?xml version="1.0" encoding="UTF-8"?>
  678. <svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="24" height="24">
  679. <path
  680. 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" />
  681. </svg>
  682. </span>
  683. <span aria-hidden="true" onclick="ToolsModal.show()" class="fi fi-rr-settings">
  684. <?xml version="1.0" encoding="UTF-8"?>
  685. <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24"
  686. width="24" height="24">
  687. <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" />
  688. <path
  689. 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" />
  690. </svg>
  691. </span>
  692. </nav>
  693. </div>
  694. <div class="card my-3 w-100 text-center border-0 p-2 shadow text-light fs-5 text-uppercase fw-bold" id="state"
  695. style="padding: 5px !important; font-size: 15px !important;">
  696. </div>
  697. <div class="modal fade" id="checkUserModal">
  698. <div class="modal-dialog modal-dialog-centered" role="document">
  699. <div class="modal-content rounded-3 shadow">
  700. <div class="modal-header border-bottom-0 pb-0">
  701. <h1 class="modal-title fs-5 chk-title text-light"></h1>
  702. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  703. aria-label="Close"></button>
  704. </div>
  705. <div class="modal-body text-center">
  706. <p class="fs-5 mb-0 chk-message text-light"></p>
  707. </div>
  708. </div>
  709. </div>
  710. </div>
  711. <div class="modal fade" id="errorModal">
  712. <div class="modal-dialog modal-dialog-centered" role="document">
  713. <div class="modal-content rounded-3 shadow">
  714. <div class="modal-header border-bottom-0 pb-0">
  715. <h1 class="modal-title fs-5 err-title text-light"></h1>
  716. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  717. aria-label="Close"></button>
  718. </div>
  719. <div class="modal-body text-center">
  720. <p class="fs-5 mb-0 err-message text-light"></p>
  721. </div>
  722. </div>
  723. </div>
  724. </div>
  725. <div class="modal fade" id="loggerModal">
  726. <div class="modal-dialog modal-dialog-centered" role="document">
  727. <div class="modal-content rounded-3 shadow">
  728. <div class="modal-body p-1 text-center">
  729. <ul class="list-group bg-transparent overflow-y-auto logger-content" style="max-height: 600px;">
  730. </ul>
  731. </div>
  732. <div class="modal-footer flex-nowrap p-0">
  733. <button type="button" class="btn btn-lg btn-dark text-light w-100 clear-logger">LIMPAR</button>
  734. <button type="button" class="btn btn-lg btn-dark text-light w-100"
  735. data-bs-dismiss="modal">FECHAR</button>
  736. </div>
  737. </div>
  738. </div>
  739. </div>
  740. <div class="tool webm modal fade" index="-1" id="ToolsModal">
  741. <div class="modal-dialog modal-dialog-centered" role="document">
  742. <div class="modal-content">
  743. <div class="tool modal-header">
  744. <h5 class="modal-title" style="color:#ffffff;">Configurações do aplicativo</h5>
  745. </div>
  746. <div class="modal-body">
  747. <button class="tool-bt rounded-2xl text-white" onclick="DtStartApnActivity.execute()"><i
  748. class="info2 bi bi-wifi mr-2"></i>Alterar protocolo de APN</button>
  749. </div>
  750. <div class="modal-body">
  751. <button class="tool-bt rounded-2xl text-white"
  752. onclick="DtIgnoreBatteryOptimizations.execute()"><i
  753. class="info2 bi bi-battery-full mr-2"></i>Otimizar Bateria</button>
  754. </div>
  755. <div class="modal-body">
  756. <button class="tool-bt rounded-2xl text-white" onclick="DtCleanApp.execute()"><i
  757. class="info2 bi bi-trash3 mr-2"></i>Limpar cachê e dados</button>
  758. </div>
  759. <div class="tool modal-footer">
  760. <button type="button" class="btn btn-primary" data-bs-dismiss="modal"
  761. style="background-color: var(--btn-modal);">FECHAR</button>
  762. </div>
  763. </div>
  764. </div>
  765. </div>
  766. <div class="modal fade" id="configModal">
  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 pb-0">
  770. <h1 class="modal-title fs-5 text-white">CONFIGURAÇÕES</h1>
  771. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  772. aria-label="Close"></button>
  773. </div>
  774. <div class="modal-body p-1 text-center">
  775. <ul class="list-group bg-transparent overflow-y-auto config-body" style="max-height: 600px;">
  776. <li class="list-group-item bg-transparent text-white border-0">
  777. <p>CATEGORIA</p>
  778. <ul class="list-group bg-transparent overflow-y-auto text-start">
  779. <li
  780. class="list-group-item d-flex bg-transparent text-white border-0 border-bottom rounded-0">
  781. <img src="https://cdn-icons-png.flaticon.com/512/3686/3686811.png" width="40"
  782. height="40">
  783. <div class="d-flex flex-column ms-2 w-100">
  784. <span>CONFIG 01</span>
  785. <span>DESC 01</span>
  786. </div>
  787. <div class="d-flex flex-column ms-2 w-100">
  788. <span class="text-end">CONFIG_MODE</span>
  789. </div>
  790. </li>
  791. </ul>
  792. </li>
  793. </ul>
  794. </div>
  795. </div>
  796. </div>
  797. </div>
  798. <div class="modal fade" id="RenovarModal">
  799. <div class="modal-dialog modal-dialog-centered" role="document">
  800. <div class="modal-content rounded-3 shadow">
  801. <div class="modal-header border-bottom-0 py-3">
  802. <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
  803. aria-label="Close"></button>
  804. </div>
  805. <div class="modal-body ratio rounded-bottom-3" style="height: 600px;">
  806. <div class="spinner d-flex w-100 h-100 align-items-center justify-content-center">
  807. <div class="spinner-border text-light p-5" role="status">
  808. <span class="visually-hidden">Loading...</span>
  809. </div>
  810. </div>
  811. <iframe class="rounded-bottom-3" id="RenovarFrame"></iframe>
  812. </div>
  813. </div>
  814. </div>
  815. </div>
  816. <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
  817. <script>
  818. class AndroidMock {
  819. static getLocalIP() {
  820. return '192.168.0.1';
  821. }
  822. static getConfig() {
  823. return JSON.stringify({
  824. urlCheckUser: 'URLAQUI'
  825. });
  826. }
  827. static getNetworkName() {
  828. return 'REDE';
  829. }
  830. static openRadioInfo() {
  831. console.log('openRadioInfo');
  832. }
  833. }
  834. </script>
  835. <script>
  836. function showLocalIP(android) {
  837. console.log(android.getNetworkName());
  838. document.getElementById('name').innerHTML = ' ' + android.getNetworkName() + ':';
  839. document.getElementById('ip').innerHTML = android.getLocalIP();
  840. setInterval(() => {
  841. document.getElementById('name').innerHTML =
  842. ' ' + android.getNetworkName() + ':';
  843. document.getElementById('ip').innerHTML = android.getLocalIP();
  844. }, 2000)
  845. }
  846. window.onload = function () {
  847. const android = window.Android || AndroidMock;
  848. showLocalIP(android);
  849. }
  850. function mostrar(id) {
  851. if (document.getElementById(id).style.display !== "none") {
  852. document.getElementById(id).style.display = "none";
  853. return;
  854. }
  855. Array.from(document.getElementsByClassName("hidden")).forEach(
  856. div => (div.style.display = "none")
  857. );
  858. document.getElementById(id).style.display = "block";
  859. }
  860. </script>
  861. <script>
  862. const configArea = document.querySelector('#config-area')
  863. const config = document.querySelector('#config')
  864. const username = document.querySelector('#username')
  865. const password = document.querySelector('#password')
  866. const uuid = document.querySelector('#uuid')
  867. const logger = document.querySelector('#logger')
  868. const networkStatus = document.querySelector('#section.local-ip')
  869. const startStopVpn = document.querySelector('#start-stop')
  870. const stateStatus = document.querySelector('#state')
  871. const loggerModal = new bootstrap.Modal(document.querySelector('#loggerModal'))
  872. const checkUserModal = new bootstrap.Modal(document.querySelector('#checkUserModal'))
  873. const errorModal = new bootstrap.Modal(document.querySelector('#errorModal'))
  874. const configModal = new bootstrap.Modal(document.querySelector('#configModal'))
  875. const ToolsModal = new bootstrap.Modal(document.querySelector('#ToolsModal'))
  876. const clearLogger = document.querySelector('.clear-logger')
  877. const RenovarModal = new bootstrap.Modal(document.querySelector('#RenovarModal'))
  878. configArea.addEventListener('click', e => showConfigsModal())
  879. username.addEventListener('input', e => DtUsername.set(e.target.value))
  880. password.addEventListener('input', e => DtPassword.set(e.target.value))
  881. uuid.addEventListener('input', e => DtUuid.set(e.target.value))
  882. logger.addEventListener('click', e => loggerModal.show())
  883. startStopVpn.addEventListener('click', (e) => {
  884. if (DtGetVpnState.execute() != 'DISCONNECTED') {
  885. DtExecuteVpnStop.execute()
  886. } else {
  887. DtExecuteVpnStart.execute()
  888. }
  889. })
  890. clearLogger.addEventListener('click', () => DtClearLogs.execute())
  891. RenovarModal._element.addEventListener('shown.bs.modal', () => {
  892. const iframe = document.querySelector('#RenovarFrame');
  893. if (!iframe.src) {
  894. iframe.src = 'https://painel.plenonet.com.br/renovar.php'
  895. iframe.addEventListener('load', () => {
  896. mp3Modal._element.querySelector('.spinner').classList.add('d-none')
  897. })
  898. }
  899. })
  900. RenovarModal._element.addEventListener('hide.bs.modal', () => {
  901. const iframe = document.querySelector('#RenovarFrame');
  902. iframe.src = '';
  903. })
  904. Object.defineProperty(String.prototype, 't', {
  905. value: function t() {
  906. return window?.DtTranslateText?.execute('' + this) ?? '' + this
  907. },
  908. writable: true,
  909. configurable: true,
  910. })
  911. const dtConfigClickListener = () => {
  912. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{ "auth": {}, "mode": "v2ray" }`)
  913. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  914. config.placeholder = data.name ?? 'LBL_CHOOSE_CONFIG'.t()
  915. username.parentElement.style.display = !data?.auth?.username && !isV2ray ? 'flex' : 'none';
  916. password.parentElement.style.display = !data?.auth?.password && !isV2ray ? 'flex' : 'none';
  917. uuid.parentElement.style.display = !data?.auth?.v2ray_uuid && isV2ray ? 'flex' : 'none';
  918. }
  919. const dtVpnStateListener = state => {
  920. const isRunning = state != 'DISCONNECTED';
  921. stateStatus.innerHTML = ('LBL_STATE_' + state).t()
  922. startStopVpn.innerHTML = isRunning ? 'LBL_BTN_STOP'.t() : 'LBL_BTN_START'.t()
  923. if (isRunning) {
  924. username.setAttribute('readonly', 'true')
  925. password.setAttribute('readonly', 'true')
  926. } else {
  927. username.removeAttribute('readonly')
  928. password.removeAttribute('readonly')
  929. }
  930. if (state == 'CONNECTING') dtShowSuccessToastListener('Conectando...')
  931. }
  932. const dtCheckUserStartedListener = () => {
  933. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{}`)
  934. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  935. if (isV2ray) return;
  936. const html = `
  937. <div class="d-flex justify-content-center">
  938. <div class="spinner-border p-5" role="status">
  939. <span class="visually-hidden">Loading...</span>
  940. </div>
  941. </div>
  942. `
  943. checkUserModal._element.querySelector('.chk-title').textContent = 'CHECK USER'
  944. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  945. checkUserModal.show()
  946. }
  947. const dtCheckUserModelListener = model => {
  948. const data = JSON.parse(model ?? `{"username": "test"}`)
  949. const html = `
  950. <div class="d-flex flex-column text-white">
  951. <span>👤Nome de usuario: ${data.username}</span>
  952. <span>📆Expira em: ${data.expiration_date}</span>
  953. <span>📆Dias restantes: ${data.expiration_days}</span>
  954. <span>🚫Conexoes: ${data.count_connections}|${data.limit_connections}</span>
  955. </div>
  956. `
  957. checkUserModal._element.querySelector('.chk-title').textContent = '📆 Olá, ' + data.username.toUpperCase() + '👤'
  958. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  959. checkUserModal.show()
  960. }
  961. const dtMessageErrorListener = message => {
  962. const data = JSON.parse(message)
  963. errorModal._element.querySelector('.err-title').textContent = data.title;
  964. errorModal._element.querySelector('.err-message').innerHTML = data.content;
  965. errorModal.show()
  966. }
  967. const dtOnNewLogListener = () => {
  968. const mock = [];
  969. for (let i = 0; i < 30; i++) {
  970. mock.push({ 'TIME': 'MESSAGE ' + i })
  971. }
  972. const log = window?.DtGetLogs?.execute() || JSON.stringify(mock)
  973. const data = JSON.parse(log)
  974. let content = '';
  975. data.forEach(item => {
  976. content += '<li class="list-group-item fs-6 bg-transparent text-white p-0 border-0 text-start ms-2 text-wrap">';
  977. content += Object.keys(item)[0] + " " + item[Object.keys(item)]
  978. content += '</li>';
  979. })
  980. loggerModal._element.querySelector('.logger-content').innerHTML = content;
  981. const listGroup = loggerModal._element.querySelector('.list-group')
  982. listGroup.scrollTo(0, listGroup.scrollHeight)
  983. }
  984. const dtVpnStartedSuccessListener = () => dtShowSuccessToastListener('Conectado com sucesso')
  985. const dtVpnStoppedSuccessListener = () => dtShowSuccessToastListener('Desconectado com sucesso')
  986. const dtShowSuccessToastListener = text => {
  987. Toastify({
  988. text: text,
  989. close: true,
  990. style: {
  991. background: 'linear-gradient(to right, #00b09b, #96c93d)',
  992. marginTop: '35px',
  993. }
  994. }).showToast()
  995. }
  996. const dtShowErrorToastListener = text => {
  997. Toastify({
  998. text: text,
  999. close: true,
  1000. style: {
  1001. background: 'linear-gradient(to right, #ff5c33, #e69900)',
  1002. marginTop: '35px',
  1003. }
  1004. }).showToast()
  1005. }
  1006. const showConfigsModal = () => {
  1007. 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"}]}]'
  1008. const data = JSON.parse(window?.DtGetConfigs?.execute() || mock)
  1009. data.sort((a, b) => a.sorter - b.sorter)
  1010. data.forEach(item => item.items.sort((a, b) => a.sorter - b.sorter))
  1011. const body = configModal._element.querySelector('.config-body')
  1012. body.innerHTML = ''
  1013. data.forEach(category => {
  1014. const categoryElement = document.createElement('li')
  1015. categoryElement.classList.add('list-group-item', 'bg-transparent', 'text-white', 'border-0', 'mb-1', 'rounded-1', 'px-1')
  1016. categoryElement.innerHTML = `<span class="fw-bold btn-dark w-100 d-block p-1 rounded-1 mb-1">${category.name}</span>`
  1017. const configUlElement = document.createElement('ul')
  1018. configUlElement.classList.add('list-group', 'bg-transparent', 'overflow-y-auto')
  1019. category.items.forEach(item => {
  1020. const configElement = document.createElement('li')
  1021. configElement.classList.add('list-group-item', 'd-flex', 'btn-dark', 'text-white', 'border-0', 'rounded-2', 'px-1', 'py-2', 'mb-1')
  1022. configElement.innerHTML = `
  1023. <img src="${item.icon}" width="40" height="40">
  1024. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  1025. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">${item.name}</span>
  1026. <span class="fst-italic fw-bold" style="font-size: 0.7rem;">${item.description || ''}</span>
  1027. </div>
  1028. <div class="d-flex flex-column ms-2">
  1029. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">${item.mode}</span>
  1030. </div>
  1031. </li>
  1032. `
  1033. configElement.addEventListener('click', e => {
  1034. window?.DtSetConfig?.execute(item.id)
  1035. configModal.hide()
  1036. })
  1037. configUlElement.appendChild(configElement)
  1038. })
  1039. categoryElement.appendChild(configUlElement)
  1040. body.appendChild(categoryElement)
  1041. })
  1042. configModal.show()
  1043. }
  1044. username.value = window?.DtUsername?.get() ?? ''
  1045. password.value = window?.DtPassword?.get() ?? ''
  1046. uuid.value = window?.DtUuid?.get() ?? ''
  1047. username.placeholder = 'LBL_USERNAME'.t()
  1048. password.placeholder = 'LBL_PASSWORD'.t()
  1049. uuid.placeholder = 'LBL_UUID'.t()
  1050. dtOnNewLogListener()
  1051. dtVpnStateListener(window?.DtGetVpnState?.execute() ?? 'DISCONNECTED')
  1052. dtConfigClickListener()
  1053. console.log('ODAIR.Dev!🚀')
  1054. </script>
  1055. </body>
  1056. </html>",
  1057. "type": "HTML",
  1058. "status": "ACTIVE",
  1059. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  1060. },
  1061. {
  1062. "id": 22200,
  1063. "label": "ANDROID WEBVIEW (POR SUA CONTA E RISCO)",
  1064. "name": "APP_SUPPORT_BUTTON",
  1065. "value": null,
  1066. "type": "HTML",
  1067. "status": "ACTIVE",
  1068. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  1069. },
  1070. {
  1071. "id": 22201,
  1072. "label": "PAGINA WEBVIEW (POR SUA CONTA E RISCO)",
  1073. "name": "APP_WEB_VIEW",
  1074. "value": null,
  1075. "type": "HTML",
  1076. "status": "ACTIVE",
  1077. "user_id": "d37036c7-833d-4246-8b45-c0ce6e8daaa2"
  1078. }
  1079. ]

comments powered by Disqus