METODO LAYOT


SUBMITTED BY: terrorxdroid

DATE: Oct. 2, 2024, 9:52 p.m.

UPDATED: Oct. 4, 2024, 9:54 a.m.

FORMAT: Text only

SIZE: 30.3 kB

HITS: 460

  1. [
  2. {
  3. "id": 8490,
  4. "label": "Nome do app",
  5. "name": "APP_NAME",
  6. "value": "INFINITY TUNNEL",
  7. "type": "STRING",
  8. "status": "ACTIVE",
  9. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  10. },
  11. {
  12. "id": 8491,
  13. "label": "Logo do app",
  14. "name": "APP_LOGO",
  15. "value": "https://infinitycloud.site/PNG/Logo2.png",
  16. "type": "IMAGE",
  17. "status": "ACTIVE",
  18. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  19. },
  20. {
  21. "id": 8492,
  22. "label": "Imagem de fundo",
  23. "name": "APP_BACKGROUND_IMAGE",
  24. "value": "https://i.ibb.co/gt6TJjK/DTseb2igah.jpg",
  25. "type": "IMAGE",
  26. "status": "ACTIVE",
  27. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  28. },
  29. {
  30. "id": 8493,
  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": "IMAGE"
  45. },
  46. "type": "SELECT",
  47. "status": "ACTIVE",
  48. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  49. },
  50. {
  51. "id": 8494,
  52. "label": "Cor de fundo",
  53. "name": "APP_BACKGROUND_COLOR",
  54. "value": "#080e16c7",
  55. "type": "COLOR",
  56. "status": "ACTIVE",
  57. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  58. },
  59. {
  60. "id": 8495,
  61. "label": "Cor do card inicial",
  62. "name": "APP_CARD_COLOR",
  63. "value": "#1d242e73",
  64. "type": "COLOR",
  65. "status": "ACTIVE",
  66. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  67. },
  68. {
  69. "id": 8496,
  70. "label": "Raio do card inicial",
  71. "name": "APP_CARD_RADIUS",
  72. "value": 20,
  73. "type": "INTEGER",
  74. "status": "ACTIVE",
  75. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  76. },
  77. {
  78. "id": 8497,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  85. },
  86. {
  87. "id": 8498,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  94. },
  95. {
  96. "id": 8499,
  97. "label": "Cor do card de configurações",
  98. "name": "APP_CARD_CONFIG_COLOR",
  99. "value": "#0E171EC9",
  100. "type": "COLOR",
  101. "status": "ACTIVE",
  102. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  103. },
  104. {
  105. "id": 8500,
  106. "label": "Cor do fundo dos dialogs",
  107. "name": "APP_DIALOG_BACKGROUND_COLOR",
  108. "value": "#050C5AE4",
  109. "type": "COLOR",
  110. "status": "ACTIVE",
  111. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  112. },
  113. {
  114. "id": 13546,
  115. "label": "Cor do fundo do dialog de log",
  116. "name": "APP_DIALOG_LOGGER_COLOR",
  117. "value": "#080e16c7",
  118. "type": "COLOR",
  119. "status": "ACTIVE",
  120. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  121. },
  122. {
  123. "id": 8501,
  124. "label": "Cor das bordas",
  125. "name": "APP_BORDER_COLOR",
  126. "value": "#1d242e73",
  127. "type": "COLOR",
  128. "status": "ACTIVE",
  129. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  130. },
  131. {
  132. "id": 8502,
  133. "label": "Cor dos inputs",
  134. "name": "APP_INPUT_COLOR",
  135. "value": "#1d242e73",
  136. "type": "COLOR",
  137. "status": "ACTIVE",
  138. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  139. },
  140. {
  141. "id": 8503,
  142. "label": "Raio dos inputs",
  143. "name": "APP_INPUT_RADIUS",
  144. "value": 25,
  145. "type": "INTEGER",
  146. "status": "ACTIVE",
  147. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  148. },
  149. {
  150. "id": 8504,
  151. "label": "Cor dos textos",
  152. "name": "APP_TEXT_COLOR",
  153. "value": "#FFFFFFFF",
  154. "type": "COLOR",
  155. "status": "ACTIVE",
  156. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  157. },
  158. {
  159. "id": 8505,
  160. "label": "Cor dos botões",
  161. "name": "APP_BUTTON_COLOR",
  162. "value": "#1d242e73",
  163. "type": "COLOR",
  164. "status": "ACTIVE",
  165. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  166. },
  167. {
  168. "id": 8506,
  169. "label": "Raio dos botões",
  170. "name": "APP_BUTTON_RADIUS",
  171. "value": 25,
  172. "type": "INTEGER",
  173. "status": "ACTIVE",
  174. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  175. },
  176. {
  177. "id": 8507,
  178. "label": "Cor dos icones",
  179. "name": "APP_ICON_COLOR",
  180. "value": "#FFFFFFFF",
  181. "type": "COLOR",
  182. "status": "ACTIVE",
  183. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  184. },
  185. {
  186. "id": 8508,
  187. "label": "Exibir modo de conexão",
  188. "name": "APP_SHOW_CONNECTION_MODE",
  189. "value": false,
  190. "type": "BOOLEAN",
  191. "status": "ACTIVE",
  192. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  193. },
  194. {
  195. "id": 23434,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  202. },
  203. {
  204. "id": 8509,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  211. },
  212. {
  213. "id": 8510,
  214. "label": "Usar limiter de conexão",
  215. "name": "APP_CONNECTION_LIMITER",
  216. "value": false,
  217. "type": "BOOLEAN",
  218. "status": "ACTIVE",
  219. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  220. },
  221. {
  222. "id": 13547,
  223. "label": "Usar botão de atualizações",
  224. "name": "APP_BTN_UPDATE_ENABLED",
  225. "value": true,
  226. "type": "BOOLEAN",
  227. "status": "ACTIVE",
  228. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  229. },
  230. {
  231. "id": 13548,
  232. "label": "Usar botão de registros",
  233. "name": "APP_BTN_LOGGER_ENABLED",
  234. "value": true,
  235. "type": "BOOLEAN",
  236. "status": "ACTIVE",
  237. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  238. },
  239. {
  240. "id": 13549,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  247. },
  248. {
  249. "id": 13553,
  250. "label": "Ativar dialog de erros",
  251. "name": "APP_DIALOG_ERROR_ENABLED",
  252. "value": true,
  253. "type": "BOOLEAN",
  254. "status": "ACTIVE",
  255. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  256. },
  257. {
  258. "id": 13554,
  259. "label": "Ativar dialog de checkuser",
  260. "name": "APP_CHECKUSER_DIALOG_ENABLED",
  261. "value": false,
  262. "type": "BOOLEAN",
  263. "status": "ACTIVE",
  264. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  265. },
  266. {
  267. "id": 14935,
  268. "label": "Ativar toast de sucesso",
  269. "name": "APP_SUCCESS_TOAST_ENABLED",
  270. "value": true,
  271. "type": "BOOLEAN",
  272. "status": "ACTIVE",
  273. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  274. },
  275. {
  276. "id": 14936,
  277. "label": "Ativar toast de erro",
  278. "name": "APP_ERROR_TOAST_ENABLED",
  279. "value": true,
  280. "type": "BOOLEAN",
  281. "status": "ACTIVE",
  282. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  283. },
  284. {
  285. "id": 14937,
  286. "label": "Usar layout webview",
  287. "name": "APP_LAYOUT_WEBVIEW_ENABLED",
  288. "value": true,
  289. "type": "BOOLEAN",
  290. "status": "ACTIVE",
  291. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  292. },
  293. {
  294. "id": 8511,
  295. "label": "Mensagem",
  296. "name": "APP_MESSAGE",
  297. "value": null,
  298. "type": "TEXT",
  299. "status": "ACTIVE",
  300. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  301. },
  302. {
  303. "id": 8512,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  310. },
  311. {
  312. "id": 8513,
  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": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  339. },
  340. {
  341. "id": 14938,
  342. "label": "LAYOUT WEBVIEW (POR SUA CONTA E RISCO)",
  343. "name": "APP_LAYOUT_WEBVIEW",
  344. "value": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css\">\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css\">\n <title>INFINITY TUNNEL</title>\n <style>\n :root {\n --bg-color: #B721FF;\n /*cores de fundo, a primeira é a parte de cima a segundo a de baixo*/\n --bg-image: linear-gradient(to bottom, #482d80, #855cd6);\n\n --input-border-radius: 6px;\n /*cor dos botões*/\n --input-background-color: #3105479f;\n /*sombra dos botões*/\n --input-shadow-color: #3105479f;\n /*sombra do botão de conectar*/\n --btn-bg-shadow-color: #3105479f;\n --btn-bg-hover-shadow-color: #3105479f;\n --btn-active-bg-color: #0093E9;\n\n --modal-content-bg-shadow-color: #4a148ccc;\n --modal-content-bg-color: #4a148ccc;\n\n --config-bg-color: #0000003f;\n --category-bg-color: #0000003f;\n /*Cor do texto e icone da box de login*/\n --text-color: #ffffff;\n --icon-color: #ffffff;\n }\n\n * {\n margin: ;\n box-sizing: border-box;\n }\n\n \n\n main {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 0.9rem;\n }\n\n .bg-input {\n border-radius: var(--input-border-radius);\n margin: 5px;\n padding: 0.8rem 0.8rem;\n color: var(--icon-color);\n background: var(--input-background-color);\n box-shadow: 0 1px 20px var(--input-shadow-color);\n }\n\n input {\n width: 100%;\n background: transparent;\n border: none;\n outline: none;\n color: var(--text-color);\n }\n\n input::placeholder {\n color: var(--text-color);\n }\n\n main>button {\n margin-top: 14.5rem;\n width: 100px;\n height: 100px;\n border-radius: 50%;\n background: var(--input-background-color);\n box-shadow: 0 1px 20px var(--btn-bg-shadow-color);\n border: none;\n outline: none;\n cursor: pointer;\n transition: all 0.3s ease-in-out;\n -webkit-tap-highlight-color: transparent;\n }\n\n main>button:hover {\n transform: scale(1.1);\n background: var(--input-background-color);\n box-shadow: 0px 0px var(--btn-bg-hover-shadow-color);\n }\n\n main>button:active {\n transform: scale(0.9);\n background: var(--btn-active-bg-color);\n box-shadow: 0 0px 0px var(--btn-active-bg-color);\n }\n\n main>button>i {\n font-size:50px;\n color: var(--icon-color);\n }\n\n .modal {\n backdrop-filter: blur5px);\n }\n\n .modal-content {\n border: none;\n background: var(--modal-content-bg-color);\n box-shadow: 0 5px 10px var(--modal-content-bg-shadow-color);\n color: var(--text-color);\n }\n\n .modal-dialog {\n margin: 0 1rem;\n }\n\n .bg-category {\n background: var(--category-bg-color);\n }\n\n .bg-config {\n background: var(--config-bg-color);\n }\n \n /*AQUI ESTÁ A ADAPTAÇÃO DA LOGO*/\n\n\t\tbody {\n \t\t\tfont-family: Arial, sans-serif;\n \t\t\twidth: 100%;\n \t\t\theight: 100vh;\n \t\t\tdisplay: flex;\n \t\tflex-direction: column;\n \t\tjustify-content: center;\n \t\talign-items: center;\n \t\tbackground-color: var(--bg-color);\n \t\tbackground-image: var(--bg-image);\n\t\t}\n\n\t\theader {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100px;\n background-color: #f1f1f1;\n position: relative;\n}\n\n.logo {\n width: 200px;\n height: 200px;\n position: absolute;\n top: 50%; /* Ajuste a posição vertical aqui */\n transform: translateY(-60%); /* Centralizar verticalmente */\n}\n </style>\n</head>\n\n<body>\n <header>\n <img src=\"https://infinitycloud.site/PNG/Logo2.png\" alt=\"Logo\" class=\"logo\">\n </header>\n\n <!-- Restante do conteúdo do seu aplicativo -->\n\n\n <main>\n <button id=\"vpn-start-stop\"><i class=\"bi bi-power\"></i></button>\n <span class=\"text-uppercase py-3 fw-bold fs-4\" id=\"state\">DESCONECTADO</span>\n <div class=\"position-absolute px-4\" style=\"bottom: 43%;\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center bg-input\">\n <i class=\"bi bi-hdd-network\"></i>\n <input type=\"text\" placeholder=\"CONFIG.\" disabled id=\"config\">\n <i class=\"bi bi-arrow-bar-down\"></i>\n </div>\n <div class=\"d-flex gap-2\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center bg-input\">\n <i class=\"bi bi-person\"></i>\n <input type=\"text\" placeholder=\"Usuário\" id=\"username\">\n\t\t\t\t<i class=\"bi bi-arrow-bar-down\"></i>\n\t\t\t\t</div>\n <!*Div que separa a BOX de login>\n </div>\n\t\t\t<div class=\"d-flex gap-2\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center bg-input\">\n <i class=\"bi bi-lock\"></i>\n <input type=\"text\" placeholder=\"Senha\" id=\"password\">\n <i class=\"bi bi-eye\"></i>\n </div>\n <div class=\"d-flex gap-2 justify-content-center align-items-center bg-input\">\n <i class=\"bi bi-lock\"></i>\n <input type=\"text\" placeholder=\"V2ray UUID\" id=\"uuid\">\n <i class=\"bi bi-eye\"></i>\n </div>\n <!*Aqui está a separação do box baixo>\n \t\t<div class=\"position-absolute px-4\" style=\"bottom: -160%;\">\n <div class=\"d-flex gap-2 justify-content-between align-content-center my-4 fs-3\">\n <button class=\"border-0 bg-input\" onclick=\"DtStartAppUpdate.execute()\">\n <i class=\"bi bi-arrow-repeat\"></i>\n </button>\n <button class=\"border-0 bg-input\" onclick=\"loggerModal.show()\">\n <i class=\"bi bi-file-earmark-medical\"></i>\n </button>\n <button class=\"border-0 bg-input\" onclick=\"DtStartCheckUser.execute()\">\n <i class=\"bi bi-calendar2-day\"></i>\n </button>\n <!AQUI ESTÀ O BOTÂO DE REDIRECIONAMENTO DO CANAL>\n <!<button class=\"border-0 bg-input\" onclick=\"DtStartWebViewActivity.execute('')\">\n <!<i class=\"bi bi-headset\"></i>\n </button>\n <button class=\"border-0 bg-input\" onclick=\"DtIgnoreBatteryOptimizations.execute()\">\n <i class=\"bi bi-battery\"></i>\n </button>\n </div>\n </div>\n </main>\n <div class=\"modal fade\" id=\"checkUserModal\">\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content rounded-3 shadow\">\n <div class=\"modal-header border-bottom-0 pb-0\">\n <h1 class=\"modal-title fs-5 chk-title text-light\"></h1>\n <button type=\"button\" class=\"btn-close btn-close-white\" data-bs-dismiss=\"modal\"></button>\n </div>\n <div class=\"modal-body text-center\">\n <p class=\"fs-5 mb-0 chk-message text-light\"></p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal fade\" id=\"configModal\">\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content rounded-3 shadow\">\n <div class=\"modal-header border-bottom-0 pb-0\">\n <h1 class=\"modal-title fs-5\" style=\"color: var(--text-color);\">CONFIGURAÇÕES</h1>\n <button type=\"button\" class=\"btn-close btn-close-white\" data-bs-dismiss=\"modal\"></button>\n </div>\n <div class=\"modal-body p-1 text-center\">\n <ul class=\"list-group bg-transparent overflow-y-auto config-body\" style=\"max-height: 600px;\"></ul>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal fade\" id=\"loggerModal\">\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content rounded-3 shadow\">\n <div class=\"modal-body p-1 text-center\">\n <ul class=\"list-group bg-transparent overflow-y-auto logger-content\" style=\"max-height: 800px;\">\n </ul>\n </div>\n <div class=\"modal-footer flex-nowrap py-0 px-1 gap-3 border-top-0\">\n <button type=\"button\" class=\"border-0 bg-input w-100 clear-logger\" onclick=\"DtClearLogs.execute()\"\n style=\"color: var(--text-color);\">LIMPAR</button>\n <button type=\"button\" class=\"border-0 bg-input w-100\" style=\"color: var(--text-color);\"\n data-bs-dismiss=\"modal\">FECHAR</button>\n </div>\n </div>\n </div>\n </div>\n <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.min.js\"></script>\n <script>\n Object.defineProperty(String.prototype, 't', {\n value: function t() {\n return window?.DtTranslateText?.execute('' + this) ?? '' + this\n },\n writable: true,\n configurable: true,\n })\n\n const startStopVpn = document.querySelector('#vpn-start-stop')\n startStopVpn.onclick = e => {\n if (DtGetVpnState.execute() != 'DISCONNECTED') {\n DtExecuteVpnStop.execute()\n } else {\n DtExecuteVpnStart.execute()\n }\n }\n\n const config = document.querySelector('#config')\n config.parentElement.onclick = () => showConfigsModal();\n\n const username = document.querySelector('#username')\n username.oninput = e => DtUsername.set(e.target.value)\n\n const password = document.querySelector('#password')\n password.oninput = e => DtPassword.set(e.target.value)\n\n const uuid = document.querySelector('#uuid')\n uuid.oninput = e => DtUuid.set(e.target.value)\n\n const checkUserModal = new bootstrap.Modal(document.querySelector('#checkUserModal'))\n const configModal = new bootstrap.Modal(document.querySelector('#configModal'))\n const loggerModal = new bootstrap.Modal(document.querySelector('#loggerModal'))\n\n const dtConfigClickListener = () => {\n const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{ \"auth\": {\"username\": \"\"} }`)\n const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');\n\n config.placeholder = data.name ?? 'Escolha um servidor';\n username.parentElement.style.setProperty('display', !data?.auth?.username && !isV2ray ? 'flex' : 'none', 'important')\n password.parentElement.style.setProperty('display', !data?.auth?.password && !isV2ray ? 'flex' : 'none', 'important')\n uuid.parentElement.style.setProperty('display', !data?.auth?.v2ray_uuid && isV2ray ? 'flex' : 'none', 'important')\n }\n\n const dtVpnStateListener = state => {\n const isRunning = state != 'DISCONNECTED';\n const status = document.querySelector('#state')\n\n status.innerHTML = ('LBL_STATE_' + state).t()\n\n if (isRunning) {\n username.setAttribute('readonly', 'true')\n password.setAttribute('readonly', 'true')\n status.style.color = '#00ff15'\n } else {\n username.removeAttribute('readonly')\n password.removeAttribute('readonly')\n status.style.color = 'RED'\n }\n }\n\n const dtCheckUserStartedListener = () => {\n const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{}`)\n const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');\n if (isV2ray || !data.urlCheckUser) return;\n\n const html = `\n <div class=\"d-flex justify-content-center\">\n <div class=\"spinner-border p-4\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n `\n\n checkUserModal._element.querySelector('.chk-title').textContent = 'CHECK USER'\n checkUserModal._element.querySelector('.chk-message').innerHTML = html;\n checkUserModal.show()\n }\n\n const dtCheckUserModelListener = model => {\n const data = JSON.parse(model ?? `{\"username\": \"test\"}`)\n const html = `\n <div class=\"d-flex flex-column text-white\">\n <span>Nome de usuario: ${data.username}</span>\n <span>Dias restantes: ${data.expiration_days}</span>\n <span>Conexoes: ${data.count_connections}|${data.limit_connections}</span>\n </div>\n `\n\n checkUserModal._element.querySelector('.chk-title').textContent = ' Olá, ' + data.username.toUpperCase() + ''\n checkUserModal._element.querySelector('.chk-message').innerHTML = html;\n checkUserModal.show()\n }\n\n const showConfigsModal = () => {\n 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\"}]}]'\n const data = JSON.parse(window?.DtGetConfigs?.execute() || mock)\n\n data.sort((a, b) => a.sorter - b.sorter)\n data.forEach(item => item.items.sort((a, b) => a.sorter - b.sorter))\n\n const body = configModal._element.querySelector('.config-body')\n body.innerHTML = ''\n\n data.forEach(category => {\n const categoryElement = document.createElement('li')\n categoryElement.className = 'list-group-item bg-transparent border-0 mb-1 rounded-1 px-1'\n categoryElement.style.color = 'var(--text-color)'\n categoryElement.innerHTML = `<span class=\"fw-bold w-100 d-block p-1 rounded-1 mb-1 bg-category\">${category.name}</span>`\n\n const configUlElement = document.createElement('ul')\n configUlElement.className = 'list-group overflow-y-auto'\n\n category.items.forEach(item => {\n const configElement = document.createElement('li')\n configElement.className = 'list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1'\n configElement.style.color = 'var(--text-color)'\n configElement.innerHTML = `\n <img src=\"${item.icon}\" width=\"40\" height=\"40\">\n <div class=\"text-start d-flex flex-column ms-2 w-100 text-truncate\">\n <span class=\"fw-bold text-uppercase\" style=\"font-size: 0.8rem;\">${item.name}</span>\n <span class=\"fst-italic fw-bold text-uppercase\" style=\"font-size: 0.7rem;\">${item.description || ''}</span>\n </div>\n <div class=\"d-flex flex-column ms-2\">\n <span class=\"fst-italic fw-bold text-end text-uppercase text-nowrap\" style=\"font-size: 0.8rem;\">${item.mode}</span>\n </div>\n </li>\n `\n configElement.addEventListener('click', e => {\n window?.DtSetConfig?.execute(item.id)\n configModal.hide()\n })\n configUlElement.appendChild(configElement)\n })\n\n categoryElement.appendChild(configUlElement)\n body.appendChild(categoryElement)\n })\n configModal.show()\n }\n\n const dtOnNewLogListener = () => {\n const mock = [];\n for (let i = 0; i < 30; i++) {\n mock.push({ 'TIME': 'MESSAGE ' + i })\n }\n\n const log = window?.DtGetLogs?.execute() || JSON.stringify(mock)\n const data = JSON.parse(log)\n\n let content = '';\n data.forEach(item => {\n content += '<li class=\"list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap\" style=\"font-size: 12px; color: var(--text-color);\">';\n content += Object.keys(item)[0] + \" \" + item[Object.keys(item)]\n content += '</li>';\n })\n\n loggerModal._element.querySelector('.logger-content').innerHTML = content;\n const listGroup = loggerModal._element.querySelector('.list-group')\n listGroup.scrollTo(0, listGroup.scrollHeight)\n }\n\n username.value = window?.DtUsername?.get() ?? ''\n password.value = window?.DtPassword?.get() ?? ''\n uuid.value = window?.DtUuid?.get() ?? ''\n\n dtOnNewLogListener()\n dtConfigClickListener()\n dtVpnStateListener(window?.DtGetVpnState?.execute() ?? 'DISCONNECTED')\n </script>\n</body>\n\n</html>",
  345. "type": "HTML",
  346. "status": "ACTIVE",
  347. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  348. },
  349. {
  350. "id": 8514,
  351. "label": "ANDROID WEBVIEW (POR SUA CONTA E RISCO)",
  352. "name": "APP_SUPPORT_BUTTON",
  353. "value": null,
  354. "type": "HTML",
  355. "status": "ACTIVE",
  356. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  357. },
  358. {
  359. "id": 8515,
  360. "label": "PAGINA WEBVIEW (POR SUA CONTA E RISCO)",
  361. "name": "APP_WEB_VIEW",
  362. "value": null,
  363. "type": "HTML",
  364. "status": "ACTIVE",
  365. "user_id": "42e76a53-e72f-413d-afa1-aca5ad0ff453"
  366. }
  367. ]

comments powered by Disqus