cognova 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-mGU8_Hv.js +1 -0
  3. package/.output/public/_nuxt/0GqCtQ9S.js +1 -0
  4. package/.output/public/_nuxt/{DFpmIy6J.js → 1wCoXZ14.js} +1 -1
  5. package/.output/public/_nuxt/2J1KxdHv.js +1 -0
  6. package/.output/public/_nuxt/6VDUZECX.js +1 -0
  7. package/.output/public/_nuxt/{C7m9zGMG.js → 8WMJQbWG.js} +1 -1
  8. package/.output/public/_nuxt/9Rw88G6h.js +1 -0
  9. package/.output/public/_nuxt/{BjsKx597.js → B-yW4SD3.js} +1 -1
  10. package/.output/public/_nuxt/B20jNAhm.js +1 -0
  11. package/.output/public/_nuxt/B3OpTH_e.js +1 -0
  12. package/.output/public/_nuxt/B9Y3_B5G.js +1 -0
  13. package/.output/public/_nuxt/B9_vmatf.js +1 -0
  14. package/.output/public/_nuxt/B9o6sFST.js +1 -0
  15. package/.output/public/_nuxt/{CseYuM6E.js → BAY3_Hrq.js} +1 -1
  16. package/.output/public/_nuxt/{B_9zJTqe.js → BD5rPkc2.js} +3 -3
  17. package/.output/public/_nuxt/BGYoW3kO.js +1 -0
  18. package/.output/public/_nuxt/BHUy5EAj.js +1 -0
  19. package/.output/public/_nuxt/BLdMRpJD.js +1 -0
  20. package/.output/public/_nuxt/{D6tVZcRs.js → BOCn_SGf.js} +12 -12
  21. package/.output/public/_nuxt/BQi8LIrn.js +1 -0
  22. package/.output/public/_nuxt/BS1t375R.js +1 -0
  23. package/.output/public/_nuxt/BTGeP1bA.js +1 -0
  24. package/.output/public/_nuxt/{pdYvpiud.js → BVYYP4eQ.js} +5 -5
  25. package/.output/public/_nuxt/BWQ7zE01.js +1 -0
  26. package/.output/public/_nuxt/BWqJInD3.js +1 -0
  27. package/.output/public/_nuxt/BXdQ9ASJ.js +1 -0
  28. package/.output/public/_nuxt/{DQhm-UPG.js → BXxZokD_.js} +2 -2
  29. package/.output/public/_nuxt/BZ7DAtPi.js +1 -0
  30. package/.output/public/_nuxt/BZm9w7en.js +1 -0
  31. package/.output/public/_nuxt/B_hNqC64.js +1 -0
  32. package/.output/public/_nuxt/Be47YE2L.js +1 -0
  33. package/.output/public/_nuxt/BgIS9_ti.js +39 -0
  34. package/.output/public/_nuxt/BgavRUl_.js +1 -0
  35. package/.output/public/_nuxt/Bh0yGTzr.js +1 -0
  36. package/.output/public/_nuxt/BhhMUror.js +1 -0
  37. package/.output/public/_nuxt/Bj5e7QPz.js +1 -0
  38. package/.output/public/_nuxt/{9kAKMaPC.js → Bnn59-FS.js} +1 -1
  39. package/.output/public/_nuxt/BoCU3mWu.js +1 -0
  40. package/.output/public/_nuxt/Br6epbzY.js +1 -0
  41. package/.output/public/_nuxt/Br81Sr2R.js +1 -0
  42. package/.output/public/_nuxt/BrkEOLHu.js +9 -0
  43. package/.output/public/_nuxt/BtrNCc2S.js +1 -0
  44. package/.output/public/_nuxt/BxsQlbgl.js +1 -0
  45. package/.output/public/_nuxt/BzrhNhdT.js +1 -0
  46. package/.output/public/_nuxt/{B-DMcEU9.js → C-78dDNd.js} +1 -1
  47. package/.output/public/_nuxt/C1oaoi1p.js +1 -0
  48. package/.output/public/_nuxt/C2-_hcwB.js +1 -0
  49. package/.output/public/_nuxt/{TxMdabnL.js → C2Gh3qqr.js} +1 -1
  50. package/.output/public/_nuxt/C2OHaW6l.js +1 -0
  51. package/.output/public/_nuxt/C3szZmvA.js +1 -0
  52. package/.output/public/_nuxt/C3xzleKP.js +1 -0
  53. package/.output/public/_nuxt/C4sG6rdW.js +1 -0
  54. package/.output/public/_nuxt/C5Cu9Fx6.js +1 -0
  55. package/.output/public/_nuxt/{LRO7YHoH.js → C5gfF7J1.js} +1 -1
  56. package/.output/public/_nuxt/C6Eoiclo.js +1 -0
  57. package/.output/public/_nuxt/C7hFztZL.js +1 -0
  58. package/.output/public/_nuxt/CAVUAxNU.js +2 -0
  59. package/.output/public/_nuxt/{CiNxIhaq.js → CCeM5lW2.js} +1 -1
  60. package/.output/public/_nuxt/CDcQ31Eh.js +1 -0
  61. package/.output/public/_nuxt/CHbHVtCy.js +1 -0
  62. package/.output/public/_nuxt/CHnVFnBW.js +1 -0
  63. package/.output/public/_nuxt/CLNcmNQS.js +1 -0
  64. package/.output/public/_nuxt/{D7N3EZ-I.js → CPwCTHun.js} +1 -1
  65. package/.output/public/_nuxt/{CFmvNggn.js → CS8SdmH2.js} +1 -1
  66. package/.output/public/_nuxt/CTGm_mc8.js +1 -0
  67. package/.output/public/_nuxt/{DNcOC5zj.js → CTQFGHjS.js} +1 -1
  68. package/.output/public/_nuxt/{B0nzD8Sk.js → CVVtVzXC.js} +1 -1
  69. package/.output/public/_nuxt/CZNOaqeX.js +1 -0
  70. package/.output/public/_nuxt/C_A_NkeC.js +2 -0
  71. package/.output/public/_nuxt/{CGplHfmR.js → C_doutX-.js} +1 -1
  72. package/.output/public/_nuxt/{BrX-PnSK.js → CbDLhrNA.js} +2 -2
  73. package/.output/public/_nuxt/CePKCqSb.js +1 -0
  74. package/.output/public/_nuxt/Cet4T_yO.js +1 -0
  75. package/.output/public/_nuxt/{C6OSRpRd.js → CjJPkhbc.js} +1 -1
  76. package/.output/public/_nuxt/CkZT4LGq.js +1 -0
  77. package/.output/public/_nuxt/CkrW8sGL.js +1 -0
  78. package/.output/public/_nuxt/Co0UxVsx.js +1 -0
  79. package/.output/public/_nuxt/CqS0zXYQ.js +1 -0
  80. package/.output/public/_nuxt/CskGv_Km.js +1 -0
  81. package/.output/public/_nuxt/{DuzpliIL.js → CuvkTsqs.js} +1 -1
  82. package/.output/public/_nuxt/{B2wI_pYg.js → CxMuZEwX.js} +1 -1
  83. package/.output/public/_nuxt/{9O1MXkck.js → CxSijT71.js} +8 -8
  84. package/.output/public/_nuxt/Cywo6tZI.js +1 -0
  85. package/.output/public/_nuxt/D1reIfpX.js +1 -0
  86. package/.output/public/_nuxt/D1uV2uir.js +1 -0
  87. package/.output/public/_nuxt/{BWuL2CzO.js → D2edadpd.js} +1 -1
  88. package/.output/public/_nuxt/D3cEeQh7.js +1 -0
  89. package/.output/public/_nuxt/D41A2mE2.js +1 -0
  90. package/.output/public/_nuxt/D49P2RhG.js +1 -0
  91. package/.output/public/_nuxt/D867g6Ds.js +1 -0
  92. package/.output/public/_nuxt/DEFWIjWl.js +1 -0
  93. package/.output/public/_nuxt/DFTEBTzZ.js +1 -0
  94. package/.output/public/_nuxt/{-HePz7lp.js → DHRexj9X.js} +2 -2
  95. package/.output/public/_nuxt/DL4EpgqQ.js +1 -0
  96. package/.output/public/_nuxt/DLHnP6tw.js +1 -0
  97. package/.output/public/_nuxt/DM20WaLq.js +1 -0
  98. package/.output/public/_nuxt/{B8DFEjxA.js → DNAMjHbb.js} +1 -1
  99. package/.output/public/_nuxt/{CLkkdThv.js → DP8t9VWs.js} +24 -24
  100. package/.output/public/_nuxt/DTR31rjp.js +1 -0
  101. package/.output/public/_nuxt/{Bc8bTnkd.js → DTlSLSo1.js} +3 -3
  102. package/.output/public/_nuxt/{DowkFZ2V.js → DVdnhfXT.js} +1 -1
  103. package/.output/public/_nuxt/{DvHS7_h2.js → DZikIgHK.js} +1 -1
  104. package/.output/public/_nuxt/D_YGqvw_.js +1 -0
  105. package/.output/public/_nuxt/D_k1YwXm.js +1 -0
  106. package/.output/public/_nuxt/Daf2MbWG.js +7 -0
  107. package/.output/public/_nuxt/DcJ0GstJ.js +1 -0
  108. package/.output/public/_nuxt/DcYKh6QA.js +1 -0
  109. package/.output/public/_nuxt/DhN3_DYH.js +1 -0
  110. package/.output/public/_nuxt/DhSvBSt3.js +1 -0
  111. package/.output/public/_nuxt/DhlIWT8K.js +1 -0
  112. package/.output/public/_nuxt/DjsqyRqt.js +1 -0
  113. package/.output/public/_nuxt/DpSM97eH.js +1 -0
  114. package/.output/public/_nuxt/DqR9SdeU.js +1 -0
  115. package/.output/public/_nuxt/DqmQtg6Y.js +1 -0
  116. package/.output/public/_nuxt/Dsuag_iW.js +1 -0
  117. package/.output/public/_nuxt/Dtr_0IbE.js +1 -0
  118. package/.output/public/_nuxt/DwrmFEZN.js +1 -0
  119. package/.output/public/_nuxt/DxE8r3r4.js +1 -0
  120. package/.output/public/_nuxt/G_CsVlOR.js +1 -0
  121. package/.output/public/_nuxt/Gyw_2f6x.js +1 -0
  122. package/.output/public/_nuxt/HStC1ZyE.js +1 -0
  123. package/.output/public/_nuxt/Hh9mv0Ek.js +1 -0
  124. package/.output/public/_nuxt/LR0kCjbe.js +1 -0
  125. package/.output/public/_nuxt/MYeLvJGV.js +1 -0
  126. package/.output/public/_nuxt/NKs0EGrh.js +1 -0
  127. package/.output/public/_nuxt/PY5EGujn.js +1 -0
  128. package/.output/public/_nuxt/PamJNol9.js +1 -0
  129. package/.output/public/_nuxt/RlvwEbHv.js +1 -0
  130. package/.output/public/_nuxt/{BghuwIGa.js → TNpdJOlc.js} +1 -1
  131. package/.output/public/_nuxt/TSYrPbLR.js +1 -0
  132. package/.output/public/_nuxt/U-eBrbR4.js +1 -0
  133. package/.output/public/_nuxt/UuqXScSw.js +1 -0
  134. package/.output/public/_nuxt/V04-MrLN.js +1 -0
  135. package/.output/public/_nuxt/X0o5GcBb.js +1 -0
  136. package/.output/public/_nuxt/XQNzmQy9.js +1 -0
  137. package/.output/public/_nuxt/Y59XKprr.js +1 -0
  138. package/.output/public/_nuxt/YZQjZgsH.js +1 -0
  139. package/.output/public/_nuxt/_-TGPiLQ.js +1 -0
  140. package/.output/public/_nuxt/builds/latest.json +1 -1
  141. package/.output/public/_nuxt/builds/meta/d7188f50-b42c-4d2c-afab-066d318f0af8.json +1 -0
  142. package/.output/public/_nuxt/dashboard.ByJQ-Wzh.css +1 -0
  143. package/.output/public/_nuxt/entry.ZJxWCrU6.css +1 -0
  144. package/.output/public/_nuxt/{D12qPplu.js → hCeWb_38.js} +1 -1
  145. package/.output/public/_nuxt/{sBzyvWMJ.js → hrPTRWjM.js} +1 -1
  146. package/.output/public/_nuxt/jC4pIK1p.js +1 -0
  147. package/.output/public/_nuxt/jTT1R-Vz.js +1 -0
  148. package/.output/public/_nuxt/{CRRw0Thu.js → kkAMoB43.js} +1 -1
  149. package/.output/public/_nuxt/{h_bXa-f2.js → mzM4BGtv.js} +1 -1
  150. package/.output/public/_nuxt/o-s8JBm2.js +1 -0
  151. package/.output/public/_nuxt/pwJTkIQ4.js +1 -0
  152. package/.output/public/_nuxt/{BL1mkqgd.js → rIgg2Arf.js} +3 -3
  153. package/.output/public/_nuxt/subdxgSQ.js +1 -0
  154. package/.output/public/_nuxt/t8B72leH.js +1 -0
  155. package/.output/public/_nuxt/vCFAHwdt.js +1 -0
  156. package/.output/public/_nuxt/z-MP0bB7.js +1 -0
  157. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
  158. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
  159. package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs → EditorToolbar-B9OwSI5e.mjs} +3 -3
  160. package/.output/server/chunks/build/{EditorToolbar-DIfb5arC.mjs.map → EditorToolbar-B9OwSI5e.mjs.map} +1 -1
  161. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
  162. package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
  163. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
  164. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
  165. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
  166. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
  167. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
  168. package/.output/server/chunks/build/{_id_-DN00UDdO.mjs → _id_-CwBeklIM.mjs} +296 -430
  169. package/.output/server/chunks/build/_id_-CwBeklIM.mjs.map +1 -0
  170. package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs → _name_-D7MtW4Vu.mjs} +2 -2
  171. package/.output/server/chunks/build/{_name_-BnS_KEfX.mjs.map → _name_-D7MtW4Vu.mjs.map} +1 -1
  172. package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs → _uuid_-lvG92ein.mjs} +4 -4
  173. package/.output/server/chunks/build/{_uuid_-DfJaumTE.mjs.map → _uuid_-lvG92ein.mjs.map} +1 -1
  174. package/.output/server/chunks/build/account-LDZ4TL6x.mjs +513 -0
  175. package/.output/server/chunks/build/account-LDZ4TL6x.mjs.map +1 -0
  176. package/.output/server/chunks/build/app-CGhRZPNT.mjs +252 -0
  177. package/.output/server/chunks/build/app-CGhRZPNT.mjs.map +1 -0
  178. package/.output/server/chunks/build/{chat-m4-n9vC6.mjs → chat-BphuYhvA.mjs} +18 -27
  179. package/.output/server/chunks/build/chat-BphuYhvA.mjs.map +1 -0
  180. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  181. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
  182. package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs → dashboard-nDujDyOg.mjs} +55 -16
  183. package/.output/server/chunks/build/{dashboard-CiVTAZuF.mjs.map → dashboard-nDujDyOg.mjs.map} +1 -1
  184. package/.output/server/chunks/build/{docs-ChGwOPg5.mjs → docs-Bwucwp0r.mjs} +664 -592
  185. package/.output/server/chunks/build/docs-Bwucwp0r.mjs.map +1 -0
  186. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
  187. package/.output/server/chunks/build/{hooks-D328DcO6.mjs → hooks-D6PmTth8.mjs} +19 -29
  188. package/.output/server/chunks/build/hooks-D6PmTth8.mjs.map +1 -0
  189. package/.output/server/chunks/build/{index-CAnGTRlu.mjs → index-CJkn2jiM.mjs} +2 -2
  190. package/.output/server/chunks/build/{index-CAnGTRlu.mjs.map → index-CJkn2jiM.mjs.map} +1 -1
  191. package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
  192. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs +723 -0
  193. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs.map +1 -0
  194. package/.output/server/chunks/build/index-hwhuKhuZ.mjs +76 -0
  195. package/.output/server/chunks/build/index-hwhuKhuZ.mjs.map +1 -0
  196. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs +1499 -0
  197. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs.map +1 -0
  198. package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs → library-DxRdgP6X.mjs} +2 -2
  199. package/.output/server/chunks/build/{library-Aeg7_Lsb.mjs.map → library-DxRdgP6X.mjs.map} +1 -1
  200. package/.output/server/chunks/build/{login-DnnElTl2.mjs → login-BmER_VoU.mjs} +2 -2
  201. package/.output/server/chunks/build/{login-DnnElTl2.mjs.map → login-BmER_VoU.mjs.map} +1 -1
  202. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs +669 -0
  203. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs.map +1 -0
  204. package/.output/server/chunks/build/server.mjs +65 -34
  205. package/.output/server/chunks/build/server.mjs.map +1 -1
  206. package/.output/server/chunks/build/settings-neokAVE5.mjs +154 -0
  207. package/.output/server/chunks/build/settings-neokAVE5.mjs.map +1 -0
  208. package/.output/server/chunks/build/styles.mjs +2 -2
  209. package/.output/server/chunks/build/{tasks-DnAFqbtt.mjs → tasks-CnpIQNpS.mjs} +27 -37
  210. package/.output/server/chunks/build/tasks-CnpIQNpS.mjs.map +1 -0
  211. package/.output/server/chunks/build/{useAgents-DHEXiFSc.mjs → useAgents-nmbkB9-_.mjs} +5 -26
  212. package/.output/server/chunks/build/useAgents-nmbkB9-_.mjs.map +1 -0
  213. package/.output/server/chunks/build/{view-n2sYa4Zh.mjs → view-mb0ISqfM.mjs} +3 -3
  214. package/.output/server/chunks/build/{view-n2sYa4Zh.mjs.map → view-mb0ISqfM.mjs.map} +1 -1
  215. package/.output/server/chunks/nitro/nitro.mjs +1000 -858
  216. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  217. package/.output/server/chunks/routes/api/index.get.mjs +17 -2
  218. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  219. package/.output/server/chunks/routes/api/index.get3.mjs +21 -3
  220. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  221. package/.output/server/chunks/routes/api/index.get4.mjs +10 -9
  222. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  223. package/.output/server/chunks/routes/api/index.get9.mjs +10 -8
  224. package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -1
  225. package/.output/server/chunks/routes/api/memory/search.get.mjs +10 -5
  226. package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
  227. package/.output/server/chunks/routes/renderer.mjs +1 -1
  228. package/.output/server/index.mjs +1 -1
  229. package/.output/server/package.json +1 -1
  230. package/app/components/AssistantPanel.client.vue +16 -314
  231. package/app/components/agents/AgentCard.vue +111 -0
  232. package/app/components/agents/AgentInfoCard.vue +54 -0
  233. package/app/components/agents/AgentRunHistory.vue +103 -0
  234. package/app/components/agents/AgentRunModal.vue +1 -24
  235. package/app/components/agents/AgentStatsCards.vue +1 -26
  236. package/app/components/assistant/AssistantChat.vue +156 -0
  237. package/app/components/assistant/AssistantTerminal.client.vue +178 -0
  238. package/app/components/chat/ConversationList.vue +2 -12
  239. package/app/components/files/FileTree.vue +23 -202
  240. package/app/components/files/FileTreeModals.vue +226 -0
  241. package/app/components/hooks/HookStatsCards.vue +1 -6
  242. package/app/components/hooks/ToolBreakdownTable.vue +1 -6
  243. package/app/components/search/DashboardSearch.vue +38 -1
  244. package/app/components/tasks/TaskCard.vue +2 -7
  245. package/app/components/tasks/TaskDetail.vue +4 -9
  246. package/app/composables/useSearch.ts +21 -11
  247. package/app/layouts/dashboard.vue +1 -1
  248. package/app/pages/agents/[id].vue +6 -197
  249. package/app/pages/agents/index.vue +9 -142
  250. package/app/pages/settings/account.vue +243 -0
  251. package/app/pages/settings/app.vue +230 -0
  252. package/app/pages/settings/index.vue +12 -0
  253. package/app/pages/settings/integrations.vue +794 -0
  254. package/app/pages/settings/manage-secrets.vue +295 -0
  255. package/app/pages/settings.vue +20 -1581
  256. package/dist/cli/index.js +26 -2
  257. package/package.json +1 -1
  258. package/server/api/agents/index.get.ts +20 -1
  259. package/server/api/conversations/index.get.ts +23 -5
  260. package/server/api/documents/index.get.ts +11 -9
  261. package/server/api/memory/search.get.ts +11 -6
  262. package/server/api/tasks/index.get.ts +11 -9
  263. package/server/drizzle/migrations/0016_full_text_search.sql +127 -0
  264. package/server/drizzle/migrations/meta/_journal.json +7 -0
  265. package/shared/types/index.ts +7 -1
  266. package/shared/utils/formatting.ts +105 -0
  267. package/.output/public/_nuxt/4ALIM-zZ.js +0 -1
  268. package/.output/public/_nuxt/5sUbkh_6.js +0 -16
  269. package/.output/public/_nuxt/6bB8Ev7a.js +0 -1
  270. package/.output/public/_nuxt/7rT1DCe2.js +0 -1
  271. package/.output/public/_nuxt/B2PqR2Vu.js +0 -1
  272. package/.output/public/_nuxt/B5FuOh7E.js +0 -1
  273. package/.output/public/_nuxt/B6om4MW2.js +0 -1
  274. package/.output/public/_nuxt/B7ikW4eF.js +0 -1
  275. package/.output/public/_nuxt/B9kWNcU7.js +0 -1
  276. package/.output/public/_nuxt/BAZ8sewA.js +0 -1
  277. package/.output/public/_nuxt/BCPwL4ma.js +0 -1
  278. package/.output/public/_nuxt/BCrlmHh_.js +0 -1
  279. package/.output/public/_nuxt/BD-AFJWW.js +0 -1
  280. package/.output/public/_nuxt/BGcQMReV.js +0 -1
  281. package/.output/public/_nuxt/BNJJSRKh.js +0 -1
  282. package/.output/public/_nuxt/BNeeERBt.js +0 -1
  283. package/.output/public/_nuxt/BSJb5amZ.js +0 -1
  284. package/.output/public/_nuxt/BSsaE9Db.js +0 -1
  285. package/.output/public/_nuxt/BVO3XpHT.js +0 -1
  286. package/.output/public/_nuxt/B_Lr1vlV.js +0 -1
  287. package/.output/public/_nuxt/Bl0qBhCG.js +0 -1
  288. package/.output/public/_nuxt/Bl43dkDq.js +0 -1
  289. package/.output/public/_nuxt/BnMTFF5R.js +0 -1
  290. package/.output/public/_nuxt/BtV7oNn3.js +0 -1
  291. package/.output/public/_nuxt/BvFYnRMR.js +0 -1
  292. package/.output/public/_nuxt/BvTUBUNN.js +0 -1
  293. package/.output/public/_nuxt/ByLsRRoQ.js +0 -1
  294. package/.output/public/_nuxt/C1LcEMwB.js +0 -1
  295. package/.output/public/_nuxt/C2IiXp9N.js +0 -2
  296. package/.output/public/_nuxt/C796kFT9.js +0 -1
  297. package/.output/public/_nuxt/C8AtdrMH.js +0 -1
  298. package/.output/public/_nuxt/CAWbHTgy.js +0 -1
  299. package/.output/public/_nuxt/CJPrV25_.js +0 -1
  300. package/.output/public/_nuxt/CKKEWapF.js +0 -1
  301. package/.output/public/_nuxt/CNjv28J2.js +0 -1
  302. package/.output/public/_nuxt/CT8s4rqa.js +0 -1
  303. package/.output/public/_nuxt/CZSOrxUy.js +0 -1
  304. package/.output/public/_nuxt/CaNEL9JC.js +0 -39
  305. package/.output/public/_nuxt/CbTLg9oX.js +0 -1
  306. package/.output/public/_nuxt/CfCXpVn5.js +0 -1
  307. package/.output/public/_nuxt/ChmNlvWR.js +0 -1
  308. package/.output/public/_nuxt/Ck0QYdxe.js +0 -1
  309. package/.output/public/_nuxt/Ckb0pu4-.js +0 -1
  310. package/.output/public/_nuxt/CkwPRs1D.js +0 -1
  311. package/.output/public/_nuxt/CmEJg8C6.js +0 -2
  312. package/.output/public/_nuxt/CmL_vMJD.js +0 -1
  313. package/.output/public/_nuxt/Cq8zPxkT.js +0 -1
  314. package/.output/public/_nuxt/CxRnB4NC.js +0 -1
  315. package/.output/public/_nuxt/D0zMyG8n.js +0 -1
  316. package/.output/public/_nuxt/D1XYB283.js +0 -1
  317. package/.output/public/_nuxt/D2NxqyzW.js +0 -1
  318. package/.output/public/_nuxt/D5xyrvFu.js +0 -1
  319. package/.output/public/_nuxt/D8iBB0Py.js +0 -1
  320. package/.output/public/_nuxt/D8oIH8m1.js +0 -1
  321. package/.output/public/_nuxt/DB2zZev7.js +0 -1
  322. package/.output/public/_nuxt/DBrOAqkm.js +0 -1
  323. package/.output/public/_nuxt/DDXDFweK.js +0 -1
  324. package/.output/public/_nuxt/DFZkCmLQ.js +0 -1
  325. package/.output/public/_nuxt/DKZmgHNU.js +0 -1
  326. package/.output/public/_nuxt/DR8tGJhL.js +0 -1
  327. package/.output/public/_nuxt/DVAEVTjy.js +0 -1
  328. package/.output/public/_nuxt/DVqrPkCJ.js +0 -1
  329. package/.output/public/_nuxt/DWZ9ieYa.js +0 -1
  330. package/.output/public/_nuxt/DWj6VsZv.js +0 -1
  331. package/.output/public/_nuxt/DXJ9PxCv.js +0 -1
  332. package/.output/public/_nuxt/D_ziPROx.js +0 -1
  333. package/.output/public/_nuxt/Da2vwoYG.js +0 -1
  334. package/.output/public/_nuxt/Ddz3HcBB.js +0 -1
  335. package/.output/public/_nuxt/DgYei0bK.js +0 -1
  336. package/.output/public/_nuxt/Di_3GV_R.js +0 -1
  337. package/.output/public/_nuxt/Djog1f_e.js +0 -1
  338. package/.output/public/_nuxt/Dkap2-Pj.js +0 -7
  339. package/.output/public/_nuxt/DlJe_sHk.js +0 -1
  340. package/.output/public/_nuxt/DlPOQpH_.js +0 -1
  341. package/.output/public/_nuxt/DmYWMtVA.js +0 -1
  342. package/.output/public/_nuxt/DmxKU7sH.js +0 -1
  343. package/.output/public/_nuxt/DsodHRrQ.js +0 -1
  344. package/.output/public/_nuxt/DwSY6_2U.js +0 -1
  345. package/.output/public/_nuxt/DypJaSm-.js +0 -1
  346. package/.output/public/_nuxt/DzKaXH6P.js +0 -1
  347. package/.output/public/_nuxt/FK-jSuOT.js +0 -1
  348. package/.output/public/_nuxt/Fc2JsQt4.js +0 -1
  349. package/.output/public/_nuxt/IYCBGuRS.js +0 -1
  350. package/.output/public/_nuxt/NrRzUJNY.js +0 -1
  351. package/.output/public/_nuxt/OeVS0Rsb.js +0 -1
  352. package/.output/public/_nuxt/OlF0QnKF.js +0 -1
  353. package/.output/public/_nuxt/QuAoqY7t.js +0 -1
  354. package/.output/public/_nuxt/RlXHkmOd.js +0 -9
  355. package/.output/public/_nuxt/WZnvL9Dh.js +0 -1
  356. package/.output/public/_nuxt/ZvG7a1W3.js +0 -1
  357. package/.output/public/_nuxt/aPNZBVrG.js +0 -1
  358. package/.output/public/_nuxt/builds/meta/495aca73-bfa5-456e-b96a-f02e009c72d3.json +0 -1
  359. package/.output/public/_nuxt/dashboard.BxCOkJwt.css +0 -1
  360. package/.output/public/_nuxt/entry.C_udkZt9.css +0 -1
  361. package/.output/public/_nuxt/evY81hM3.js +0 -1
  362. package/.output/public/_nuxt/i6QBzaEi.js +0 -1
  363. package/.output/public/_nuxt/iTVKJ1kw.js +0 -1
  364. package/.output/public/_nuxt/j92uR3uR.js +0 -1
  365. package/.output/public/_nuxt/jdUkeAj_.js +0 -1
  366. package/.output/public/_nuxt/jeRvcMHU.js +0 -1
  367. package/.output/public/_nuxt/kuv0zpKq.js +0 -1
  368. package/.output/public/_nuxt/l3lKQs7b.js +0 -1
  369. package/.output/public/_nuxt/qIgZ7OXa.js +0 -1
  370. package/.output/public/_nuxt/qcVwZv8e.js +0 -1
  371. package/.output/public/_nuxt/ru8fqqWs.js +0 -1
  372. package/.output/public/_nuxt/sgmhgpCS.js +0 -1
  373. package/.output/public/_nuxt/y2jv0da-.js +0 -1
  374. package/.output/public/_nuxt/yyS4-kAX.js +0 -1
  375. package/.output/public/_nuxt/zIoBLBHF.js +0 -1
  376. package/.output/public/_nuxt/zpazwPgx.js +0 -1
  377. package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +0 -1
  378. package/.output/server/chunks/build/chat-m4-n9vC6.mjs.map +0 -1
  379. package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +0 -1
  380. package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +0 -1
  381. package/.output/server/chunks/build/index-C9PuieXh.mjs +0 -820
  382. package/.output/server/chunks/build/index-C9PuieXh.mjs.map +0 -1
  383. package/.output/server/chunks/build/settings-B2KXoGcz.mjs +0 -3232
  384. package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +0 -1
  385. package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +0 -1
  386. package/.output/server/chunks/build/useAgents-DHEXiFSc.mjs.map +0 -1
@@ -1,3232 +0,0 @@
1
- import { _ as _sfc_main$1, a as _sfc_main$2 } from './DashboardNavbar-Cpq8yKA0.mjs';
2
- import { _ as _sfc_main$3 } from './ColorModeButton-CiS8E1tc.mjs';
3
- import { i as useToast, z as __nuxt_component_3$1, _ as _sfc_main$8$1, g as _sfc_main$d } from './server.mjs';
4
- import { _ as _sfc_main$a } from './Tabs-B6vgKDY9.mjs';
5
- import { _ as _sfc_main$6 } from './Form-X6hlUv6q.mjs';
6
- import { _ as _sfc_main$7 } from './FormField-Caux_FCv.mjs';
7
- import { _ as _sfc_main$8 } from './Input-CV2hlBHo.mjs';
8
- import { _ as _sfc_main$b } from './Separator-CYbxFNTe.mjs';
9
- import { _ as _sfc_main$e } from './Table-DCwTlhCj.mjs';
10
- import { _ as _sfc_main$4 } from './Skeleton-DZqsQzFi.mjs';
11
- import { _ as _sfc_main$c } from './Switch-GWdksmY6.mjs';
12
- import { _ as _sfc_main$5 } from './Modal-Z_SoWhh-.mjs';
13
- import { _ as _sfc_main$9 } from './Select-BB1oLrCD.mjs';
14
- import { defineComponent, reactive, ref, watch, mergeProps, withCtx, createVNode, unref, isRef, createTextVNode, toDisplayString, createBlock, createCommentVNode, openBlock, Fragment, renderList, withModifiers, useSSRContext } from 'vue';
15
- import { ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrIncludeBooleanAttr } from 'vue/server-renderer';
16
- import { V as defaultNotificationPreferences } from '../nitro/nitro.mjs';
17
- import { u as useAuth } from './useAuth-rW9toE_m.mjs';
18
- import { u as useNotificationBus } from './useNotificationBus-BG5JNQf1.mjs';
19
- import './DashboardSidebarToggle-Chnqv04k.mjs';
20
- import '@vueuse/core';
21
- import './cookie-C_iulBi6.mjs';
22
- import './ssr-Bqnw2a-w.mjs';
23
- import 'reka-ui';
24
- import 'vue-router';
25
- import 'tailwindcss/colors';
26
- import '@iconify/vue';
27
- import 'tailwind-variants';
28
- import '@iconify/utils/lib/css/icon';
29
- import 'perfect-debounce';
30
- import '../routes/renderer.mjs';
31
- import 'vue-bundle-renderer/runtime';
32
- import 'unhead/server';
33
- import 'devalue';
34
- import 'unhead/plugins';
35
- import 'unhead/utils';
36
- import './Badge-C1RKkIgG.mjs';
37
- import '@tanstack/vue-table';
38
- import '@tanstack/vue-virtual';
39
- import '@anthropic-ai/claude-agent-sdk';
40
- import 'module';
41
- import 'path';
42
- import 'os';
43
- import 'node:http';
44
- import 'node:https';
45
- import 'node:crypto';
46
- import 'stream';
47
- import 'events';
48
- import 'http';
49
- import 'crypto';
50
- import 'buffer';
51
- import 'zlib';
52
- import 'https';
53
- import 'net';
54
- import 'tls';
55
- import 'url';
56
- import 'node:events';
57
- import 'node:buffer';
58
- import 'node:fs';
59
- import 'node:path';
60
- import 'fs';
61
- import 'drizzle-orm/postgres-js/migrator';
62
- import 'drizzle-orm';
63
- import 'drizzle-orm/postgres-js';
64
- import 'postgres';
65
- import 'drizzle-orm/pg-core';
66
- import 'better-auth';
67
- import 'better-auth/adapters/drizzle';
68
- import 'chokidar';
69
- import 'fs/promises';
70
- import 'gray-matter';
71
- import 'cron';
72
- import 'child_process';
73
- import 'util';
74
- import 'node:url';
75
- import '@iconify/utils';
76
- import 'consola';
77
- import 'better-auth/vue';
78
-
79
- const _sfc_main = /* @__PURE__ */ defineComponent({
80
- __name: "settings",
81
- __ssrInlineRender: true,
82
- setup(__props) {
83
- const { user, updateProfile, changeEmail, changePassword } = useAuth();
84
- const toast = useToast();
85
- const { updatePreferences } = useNotificationBus();
86
- const profileState = reactive({
87
- name: ""
88
- });
89
- const profileLoading = ref(false);
90
- const emailState = reactive({
91
- newEmail: ""
92
- });
93
- const emailLoading = ref(false);
94
- const passwordState = reactive({
95
- currentPassword: "",
96
- newPassword: "",
97
- confirmPassword: ""
98
- });
99
- const passwordLoading = ref(false);
100
- const secretsData = ref([]);
101
- const secretsLoading = ref(false);
102
- const secretModal = ref(false);
103
- const secretDeleteConfirm = ref(false);
104
- const secretToDelete = ref(null);
105
- const secretSaving = ref(false);
106
- const editingSecret = ref(null);
107
- const secretForm = reactive({
108
- key: "",
109
- value: "",
110
- description: ""
111
- });
112
- watch(() => user.value, (u) => {
113
- if (u) {
114
- profileState.name = u.name || "";
115
- emailState.newEmail = u.email || "";
116
- }
117
- }, { immediate: true });
118
- async function fetchSecrets() {
119
- secretsLoading.value = true;
120
- try {
121
- const { data } = await $fetch("/api/secrets");
122
- secretsData.value = data;
123
- } catch {
124
- toast.add({
125
- title: "Failed to load secrets",
126
- color: "error"
127
- });
128
- }
129
- secretsLoading.value = false;
130
- }
131
- const tabs = [
132
- { label: "Account", icon: "i-lucide-user", value: "account", slot: "account" },
133
- { label: "Secrets", icon: "i-lucide-key", value: "secrets", slot: "secrets" },
134
- { label: "Integrations", icon: "i-lucide-plug", value: "integrations", slot: "integrations" },
135
- { label: "App", icon: "i-lucide-settings", value: "app", slot: "app" }
136
- ];
137
- const secretColumns = [
138
- { accessorKey: "key", header: "Key" },
139
- { accessorKey: "description", header: "Description" },
140
- { accessorKey: "updatedAt", header: "Last Updated" },
141
- { accessorKey: "actions", header: "" }
142
- ];
143
- function openCreateSecret() {
144
- editingSecret.value = null;
145
- secretForm.key = "";
146
- secretForm.value = "";
147
- secretForm.description = "";
148
- secretModal.value = true;
149
- }
150
- function openEditSecret(secret) {
151
- editingSecret.value = secret;
152
- secretForm.key = secret.key;
153
- secretForm.value = "";
154
- secretForm.description = secret.description || "";
155
- secretModal.value = true;
156
- }
157
- function confirmDeleteSecret(secret) {
158
- secretToDelete.value = secret;
159
- secretDeleteConfirm.value = true;
160
- }
161
- async function handleSecretSubmit() {
162
- if (!secretForm.key || !editingSecret.value && !secretForm.value) {
163
- toast.add({
164
- title: "Missing fields",
165
- description: editingSecret.value ? "Key is required." : "Key and value are required.",
166
- color: "error"
167
- });
168
- return;
169
- }
170
- secretSaving.value = true;
171
- try {
172
- if (editingSecret.value) {
173
- await $fetch(`/api/secrets/${editingSecret.value.key}`, {
174
- method: "PUT",
175
- body: {
176
- value: secretForm.value || void 0,
177
- description: secretForm.description || void 0
178
- }
179
- });
180
- toast.add({
181
- title: "Secret updated",
182
- color: "success"
183
- });
184
- } else {
185
- await $fetch("/api/secrets", {
186
- method: "POST",
187
- body: {
188
- key: secretForm.key,
189
- value: secretForm.value,
190
- description: secretForm.description || void 0
191
- }
192
- });
193
- toast.add({
194
- title: "Secret created",
195
- color: "success"
196
- });
197
- }
198
- secretModal.value = false;
199
- await fetchSecrets();
200
- } catch (err) {
201
- const error = err;
202
- toast.add({
203
- title: editingSecret.value ? "Failed to update secret" : "Failed to create secret",
204
- description: error.data?.message || "An error occurred",
205
- color: "error"
206
- });
207
- }
208
- secretSaving.value = false;
209
- }
210
- async function handleDeleteSecret() {
211
- if (!secretToDelete.value) return;
212
- try {
213
- await $fetch(`/api/secrets/${secretToDelete.value.key}`, {
214
- method: "DELETE"
215
- });
216
- toast.add({
217
- title: "Secret deleted",
218
- color: "success"
219
- });
220
- secretDeleteConfirm.value = false;
221
- secretToDelete.value = null;
222
- await fetchSecrets();
223
- } catch {
224
- toast.add({
225
- title: "Failed to delete secret",
226
- color: "error"
227
- });
228
- }
229
- }
230
- function formatDate(dateStr) {
231
- return new Date(dateStr).toLocaleDateString("en-US", {
232
- month: "short",
233
- day: "numeric",
234
- year: "numeric"
235
- });
236
- }
237
- const appUrl = ref("");
238
- const appUrlSaving = ref(false);
239
- async function saveAppUrl() {
240
- appUrlSaving.value = true;
241
- try {
242
- if (appUrl.value) {
243
- const exists = secretsData.value.some((s) => s.key === "APP_URL");
244
- if (exists) {
245
- await $fetch("/api/secrets/APP_URL", {
246
- method: "PUT",
247
- body: { value: appUrl.value, description: "Public URL for webhooks and auth callbacks" }
248
- });
249
- } else {
250
- await $fetch("/api/secrets", {
251
- method: "POST",
252
- body: { key: "APP_URL", value: appUrl.value, description: "Public URL for webhooks and auth callbacks" }
253
- });
254
- }
255
- } else {
256
- const exists = secretsData.value.some((s) => s.key === "APP_URL");
257
- if (exists)
258
- await $fetch("/api/secrets/APP_URL", { method: "DELETE" });
259
- }
260
- toast.add({ title: "Public URL saved", description: "Restart running integrations for changes to take effect.", color: "success" });
261
- await fetchSecrets();
262
- } catch {
263
- toast.add({ title: "Failed to save URL", color: "error" });
264
- }
265
- appUrlSaving.value = false;
266
- }
267
- const notifPrefs = ref({ ...defaultNotificationPreferences });
268
- const notifLoading = ref(false);
269
- const notifSaving = ref(false);
270
- const expandedResources = ref(/* @__PURE__ */ new Set());
271
- const resourceConfig = [
272
- { key: "task", label: "Tasks", icon: "i-lucide-check-square", subtypes: ["create", "edit", "delete", "restore"] },
273
- { key: "project", label: "Projects", icon: "i-lucide-folder", subtypes: ["create", "edit", "delete"] },
274
- { key: "agent", label: "Agents", icon: "i-lucide-bot", subtypes: ["create", "edit", "delete", "run", "complete", "fail", "cancel"] },
275
- { key: "document", label: "Documents", icon: "i-lucide-file-text", subtypes: ["edit", "delete", "restore"] },
276
- { key: "memory", label: "Memories", icon: "i-lucide-brain", subtypes: ["create", "delete"] },
277
- { key: "reminder", label: "Reminders", icon: "i-lucide-bell", subtypes: ["create"] },
278
- { key: "secret", label: "Secrets", icon: "i-lucide-key-round", subtypes: ["create", "edit", "delete"] },
279
- { key: "hook", label: "Hooks", icon: "i-lucide-webhook", subtypes: ["create"] },
280
- { key: "conversation", label: "Conversations", icon: "i-lucide-message-square", subtypes: ["delete"] },
281
- { key: "bridge", label: "Bridges", icon: "i-lucide-plug", subtypes: ["create", "edit", "delete", "complete", "fail"] }
282
- ];
283
- async function saveNotificationPrefs() {
284
- notifSaving.value = true;
285
- try {
286
- await $fetch("/api/settings", {
287
- method: "PUT",
288
- body: { notifications: notifPrefs.value }
289
- });
290
- updatePreferences(notifPrefs.value);
291
- toast.add({ title: "Notification preferences saved", color: "success" });
292
- } catch {
293
- toast.add({ title: "Failed to save preferences", color: "error" });
294
- }
295
- notifSaving.value = false;
296
- }
297
- function toggleResourceExpand(key) {
298
- if (expandedResources.value.has(key))
299
- expandedResources.value.delete(key);
300
- else
301
- expandedResources.value.add(key);
302
- }
303
- function setResourceEnabled(key, enabled) {
304
- notifPrefs.value[key] = { ...notifPrefs.value[key], enabled };
305
- }
306
- function setSubtypeEnabled(key, subtype, enabled) {
307
- const current = notifPrefs.value[key];
308
- notifPrefs.value[key] = {
309
- ...current,
310
- subtypes: { ...current?.subtypes, [subtype]: enabled }
311
- };
312
- }
313
- const bridgesData = ref([]);
314
- const bridgesLoading = ref(false);
315
- const bridgeModal = ref(false);
316
- const bridgeSaving = ref(false);
317
- const bridgeDeleteConfirm = ref(false);
318
- const bridgeToDelete = ref(null);
319
- const bridgeForm = reactive({
320
- platform: "telegram",
321
- name: ""
322
- });
323
- const bridgeConfigModal = ref(false);
324
- const editingBridge = ref(null);
325
- const bridgeConfigSaving = ref(false);
326
- const bridgeConfigForm = reactive({
327
- name: "",
328
- // Telegram
329
- botUsername: "",
330
- allowedChatIds: "",
331
- // Discord
332
- listenMode: "mentions",
333
- guildId: "",
334
- channelId: "",
335
- // iMessage
336
- strategy: "imsg",
337
- allowedNumbers: "",
338
- blueBubblesUrl: "",
339
- // Google
340
- enabledServices: [],
341
- account: "",
342
- // Email
343
- imapHost: "",
344
- imapPort: "",
345
- smtpHost: "",
346
- smtpPort: "",
347
- emailAddress: ""
348
- });
349
- const discordListenModeOptions = [
350
- { value: "mentions", label: "Mentions & DMs" },
351
- { value: "dm", label: "DMs only" },
352
- { value: "all", label: "All messages" }
353
- ];
354
- const imessageStrategyOptions = [
355
- { value: "imsg", label: "Local (imsg CLI)" },
356
- { value: "bluebubbles", label: "BlueBubbles" }
357
- ];
358
- const googleServiceOptions = [
359
- { value: "gmail", label: "Gmail" },
360
- { value: "calendar", label: "Calendar" },
361
- { value: "drive", label: "Drive" },
362
- { value: "contacts", label: "Contacts" },
363
- { value: "tasks", label: "Tasks" }
364
- ];
365
- const platformNamePlaceholders = {
366
- telegram: "My Telegram Bot",
367
- discord: "My Discord Bot",
368
- imessage: "iMessage Bridge",
369
- google: "Google Suite",
370
- email: "Work Email"
371
- };
372
- const platformRequiredSecrets = {
373
- telegram: ["TELEGRAM_BOT_TOKEN"],
374
- discord: ["DISCORD_BOT_TOKEN"],
375
- imessage: [],
376
- google: [],
377
- email: []
378
- };
379
- const platformOptions = [
380
- { value: "telegram", label: "Telegram", icon: "i-lucide-send" },
381
- { value: "discord", label: "Discord", icon: "i-lucide-message-circle" },
382
- { value: "imessage", label: "iMessage", icon: "i-lucide-smartphone" },
383
- { value: "google", label: "Google Suite", icon: "i-lucide-mail" },
384
- { value: "email", label: "Email (IMAP)", icon: "i-lucide-at-sign" }
385
- ];
386
- function getMissingSecrets(platform) {
387
- const required = platformRequiredSecrets[platform];
388
- if (!required.length) return [];
389
- const existing = new Set(secretsData.value.map((s) => s.key));
390
- return required.filter((k) => !existing.has(k));
391
- }
392
- const healthColors = {
393
- connected: "text-success",
394
- disconnected: "text-dimmed",
395
- error: "text-error",
396
- unconfigured: "text-dimmed"
397
- };
398
- async function fetchBridges() {
399
- bridgesLoading.value = true;
400
- try {
401
- const { data } = await $fetch("/api/bridges");
402
- bridgesData.value = data;
403
- } catch {
404
- toast.add({ title: "Failed to load integrations", color: "error" });
405
- }
406
- bridgesLoading.value = false;
407
- }
408
- function openBridgeConfig(bridge) {
409
- editingBridge.value = bridge;
410
- bridgeConfigForm.name = bridge.name;
411
- const config = bridge.config ? JSON.parse(bridge.config) : {};
412
- bridgeConfigForm.botUsername = "";
413
- bridgeConfigForm.allowedChatIds = "";
414
- bridgeConfigForm.listenMode = "mentions";
415
- bridgeConfigForm.guildId = "";
416
- bridgeConfigForm.channelId = "";
417
- bridgeConfigForm.strategy = "imsg";
418
- bridgeConfigForm.allowedNumbers = "";
419
- bridgeConfigForm.blueBubblesUrl = "";
420
- bridgeConfigForm.enabledServices = [];
421
- bridgeConfigForm.account = "";
422
- bridgeConfigForm.imapHost = "";
423
- bridgeConfigForm.imapPort = "";
424
- bridgeConfigForm.smtpHost = "";
425
- bridgeConfigForm.smtpPort = "";
426
- bridgeConfigForm.emailAddress = "";
427
- switch (bridge.platform) {
428
- case "telegram":
429
- bridgeConfigForm.botUsername = config.botUsername || "";
430
- bridgeConfigForm.allowedChatIds = (config.allowedChatIds || []).join(", ");
431
- break;
432
- case "discord":
433
- bridgeConfigForm.listenMode = config.listenMode || "mentions";
434
- bridgeConfigForm.guildId = config.guildId || "";
435
- bridgeConfigForm.channelId = config.channelId || "";
436
- break;
437
- case "imessage":
438
- bridgeConfigForm.strategy = config.strategy || "imsg";
439
- bridgeConfigForm.allowedNumbers = (config.allowedNumbers || []).join(", ");
440
- bridgeConfigForm.blueBubblesUrl = config.blueBubblesUrl || "";
441
- break;
442
- case "google":
443
- bridgeConfigForm.enabledServices = config.enabledServices || [];
444
- bridgeConfigForm.account = config.account || "";
445
- break;
446
- case "email":
447
- bridgeConfigForm.imapHost = config.imapHost || "";
448
- bridgeConfigForm.imapPort = config.imapPort?.toString() || "";
449
- bridgeConfigForm.smtpHost = config.smtpHost || "";
450
- bridgeConfigForm.smtpPort = config.smtpPort?.toString() || "";
451
- bridgeConfigForm.emailAddress = config.emailAddress || "";
452
- break;
453
- }
454
- bridgeConfigModal.value = true;
455
- }
456
- async function handleBridgeConfigSave() {
457
- if (!editingBridge.value) return;
458
- const platform = editingBridge.value.platform;
459
- let config = {};
460
- if (editingBridge.value.config)
461
- config = JSON.parse(editingBridge.value.config);
462
- switch (platform) {
463
- case "telegram":
464
- config.botUsername = bridgeConfigForm.botUsername || void 0;
465
- config.allowedChatIds = bridgeConfigForm.allowedChatIds ? bridgeConfigForm.allowedChatIds.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
466
- break;
467
- case "discord":
468
- config.listenMode = bridgeConfigForm.listenMode;
469
- config.guildId = bridgeConfigForm.guildId || void 0;
470
- config.channelId = bridgeConfigForm.channelId || void 0;
471
- break;
472
- case "imessage":
473
- config.strategy = bridgeConfigForm.strategy;
474
- config.allowedNumbers = bridgeConfigForm.allowedNumbers ? bridgeConfigForm.allowedNumbers.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
475
- config.blueBubblesUrl = bridgeConfigForm.blueBubblesUrl || void 0;
476
- break;
477
- case "google":
478
- config.enabledServices = bridgeConfigForm.enabledServices;
479
- config.account = bridgeConfigForm.account || void 0;
480
- break;
481
- case "email":
482
- config.imapHost = bridgeConfigForm.imapHost || void 0;
483
- config.imapPort = bridgeConfigForm.imapPort ? Number(bridgeConfigForm.imapPort) : void 0;
484
- config.smtpHost = bridgeConfigForm.smtpHost || void 0;
485
- config.smtpPort = bridgeConfigForm.smtpPort ? Number(bridgeConfigForm.smtpPort) : void 0;
486
- config.emailAddress = bridgeConfigForm.emailAddress || void 0;
487
- break;
488
- }
489
- bridgeConfigSaving.value = true;
490
- try {
491
- await $fetch(`/api/bridges/${editingBridge.value.id}`, {
492
- method: "PUT",
493
- body: { name: bridgeConfigForm.name, config }
494
- });
495
- toast.add({ title: "Integration updated", color: "success" });
496
- bridgeConfigModal.value = false;
497
- await fetchBridges();
498
- } catch (err) {
499
- const error = err;
500
- toast.add({ title: "Failed to update integration", description: error.data?.message, color: "error" });
501
- }
502
- bridgeConfigSaving.value = false;
503
- }
504
- function openCreateBridge() {
505
- bridgeForm.platform = "telegram";
506
- bridgeForm.name = "";
507
- bridgeModal.value = true;
508
- }
509
- async function handleBridgeCreate() {
510
- if (!bridgeForm.name) {
511
- toast.add({ title: "Name is required", color: "error" });
512
- return;
513
- }
514
- const missing = getMissingSecrets(bridgeForm.platform);
515
- if (missing.length) {
516
- toast.add({
517
- title: "Missing required secrets",
518
- description: `Add ${missing.join(", ")} in the Secrets tab first.`,
519
- color: "error"
520
- });
521
- return;
522
- }
523
- bridgeSaving.value = true;
524
- try {
525
- await $fetch("/api/bridges", {
526
- method: "POST",
527
- body: { platform: bridgeForm.platform, name: bridgeForm.name }
528
- });
529
- toast.add({ title: "Integration created", color: "success" });
530
- bridgeModal.value = false;
531
- await fetchBridges();
532
- } catch (err) {
533
- const error = err;
534
- toast.add({ title: "Failed to create integration", description: error.data?.message, color: "error" });
535
- }
536
- bridgeSaving.value = false;
537
- }
538
- async function toggleBridge(bridge) {
539
- try {
540
- await $fetch(`/api/bridges/${bridge.id}`, {
541
- method: "PUT",
542
- body: { enabled: !bridge.enabled }
543
- });
544
- await fetchBridges();
545
- } catch {
546
- toast.add({ title: "Failed to update integration", color: "error" });
547
- }
548
- }
549
- function confirmDeleteBridge(bridge) {
550
- bridgeToDelete.value = bridge;
551
- bridgeDeleteConfirm.value = true;
552
- }
553
- async function handleDeleteBridge() {
554
- if (!bridgeToDelete.value) return;
555
- try {
556
- await $fetch(`/api/bridges/${bridgeToDelete.value.id}`, { method: "DELETE" });
557
- toast.add({ title: "Integration deleted", color: "success" });
558
- bridgeDeleteConfirm.value = false;
559
- bridgeToDelete.value = null;
560
- await fetchBridges();
561
- } catch {
562
- toast.add({ title: "Failed to delete integration", color: "error" });
563
- }
564
- }
565
- async function handleProfileSubmit() {
566
- profileLoading.value = true;
567
- const result = await updateProfile({
568
- name: profileState.name
569
- });
570
- if (result.error) {
571
- toast.add({
572
- title: "Update failed",
573
- description: result.error.message,
574
- color: "error"
575
- });
576
- } else {
577
- toast.add({
578
- title: "Profile updated",
579
- description: "Your name has been updated successfully.",
580
- color: "success"
581
- });
582
- }
583
- profileLoading.value = false;
584
- }
585
- async function handleEmailSubmit() {
586
- if (!emailState.newEmail) {
587
- toast.add({
588
- title: "Email required",
589
- description: "Please enter a new email address.",
590
- color: "error"
591
- });
592
- return;
593
- }
594
- emailLoading.value = true;
595
- const result = await changeEmail(emailState.newEmail);
596
- if (result.error) {
597
- toast.add({
598
- title: "Email change failed",
599
- description: result.error.message,
600
- color: "error"
601
- });
602
- } else {
603
- toast.add({
604
- title: "Email updated",
605
- description: "Your email has been changed successfully.",
606
- color: "success"
607
- });
608
- }
609
- emailLoading.value = false;
610
- }
611
- async function handlePasswordSubmit() {
612
- if (passwordState.newPassword !== passwordState.confirmPassword) {
613
- toast.add({
614
- title: "Passwords do not match",
615
- description: "Please make sure your new passwords match.",
616
- color: "error"
617
- });
618
- return;
619
- }
620
- if (!passwordState.currentPassword || !passwordState.newPassword) {
621
- toast.add({
622
- title: "Missing fields",
623
- description: "Please fill in all password fields.",
624
- color: "error"
625
- });
626
- return;
627
- }
628
- passwordLoading.value = true;
629
- const result = await changePassword({
630
- currentPassword: passwordState.currentPassword,
631
- newPassword: passwordState.newPassword
632
- });
633
- if (result.error) {
634
- toast.add({
635
- title: "Password change failed",
636
- description: result.error.message,
637
- color: "error"
638
- });
639
- } else {
640
- toast.add({
641
- title: "Password changed",
642
- description: "Your password has been changed successfully.",
643
- color: "success"
644
- });
645
- passwordState.currentPassword = "";
646
- passwordState.newPassword = "";
647
- passwordState.confirmPassword = "";
648
- }
649
- passwordLoading.value = false;
650
- }
651
- return (_ctx, _push, _parent, _attrs) => {
652
- const _component_UDashboardPanel = _sfc_main$1;
653
- const _component_UDashboardNavbar = _sfc_main$2;
654
- const _component_UColorModeButton = _sfc_main$3;
655
- const _component_ClientOnly = __nuxt_component_3$1;
656
- const _component_UTabs = _sfc_main$a;
657
- const _component_UForm = _sfc_main$6;
658
- const _component_UFormField = _sfc_main$7;
659
- const _component_UInput = _sfc_main$8;
660
- const _component_UButton = _sfc_main$8$1;
661
- const _component_USeparator = _sfc_main$b;
662
- const _component_UTable = _sfc_main$e;
663
- const _component_UIcon = _sfc_main$d;
664
- const _component_USkeleton = _sfc_main$4;
665
- const _component_USwitch = _sfc_main$c;
666
- const _component_UModal = _sfc_main$5;
667
- const _component_USelect = _sfc_main$9;
668
- _push(ssrRenderComponent(_component_UDashboardPanel, mergeProps({
669
- id: "settings",
670
- grow: ""
671
- }, _attrs), {
672
- default: withCtx((_, _push2, _parent2, _scopeId) => {
673
- if (_push2) {
674
- _push2(ssrRenderComponent(_component_UDashboardNavbar, { title: "Settings" }, {
675
- right: withCtx((_2, _push3, _parent3, _scopeId2) => {
676
- if (_push3) {
677
- _push3(ssrRenderComponent(_component_UColorModeButton, null, null, _parent3, _scopeId2));
678
- } else {
679
- return [
680
- createVNode(_component_UColorModeButton)
681
- ];
682
- }
683
- }),
684
- _: 1
685
- }, _parent2, _scopeId));
686
- _push2(`<div class="p-6"${_scopeId}>`);
687
- _push2(ssrRenderComponent(_component_ClientOnly, null, {
688
- fallback: withCtx((_2, _push3, _parent3, _scopeId2) => {
689
- if (_push3) {
690
- _push3(`<div class="space-y-8 max-w-xl mx-auto py-6"${_scopeId2}>`);
691
- _push3(ssrRenderComponent(_component_USkeleton, { class: "h-10 w-full" }, null, _parent3, _scopeId2));
692
- _push3(`<div class="space-y-4"${_scopeId2}>`);
693
- _push3(ssrRenderComponent(_component_USkeleton, { class: "h-5 w-20" }, null, _parent3, _scopeId2));
694
- _push3(ssrRenderComponent(_component_USkeleton, { class: "h-10 w-full" }, null, _parent3, _scopeId2));
695
- _push3(ssrRenderComponent(_component_USkeleton, { class: "h-10 w-28" }, null, _parent3, _scopeId2));
696
- _push3(`</div></div>`);
697
- } else {
698
- return [
699
- createVNode("div", { class: "space-y-8 max-w-xl mx-auto py-6" }, [
700
- createVNode(_component_USkeleton, { class: "h-10 w-full" }),
701
- createVNode("div", { class: "space-y-4" }, [
702
- createVNode(_component_USkeleton, { class: "h-5 w-20" }),
703
- createVNode(_component_USkeleton, { class: "h-10 w-full" }),
704
- createVNode(_component_USkeleton, { class: "h-10 w-28" })
705
- ])
706
- ])
707
- ];
708
- }
709
- })
710
- }, _parent2, _scopeId));
711
- _push2(`</div>`);
712
- _push2(ssrRenderComponent(_component_UModal, {
713
- open: unref(secretModal),
714
- "onUpdate:open": ($event) => isRef(secretModal) ? secretModal.value = $event : null
715
- }, {
716
- header: withCtx((_2, _push3, _parent3, _scopeId2) => {
717
- if (_push3) {
718
- _push3(`<h3 class="text-lg font-semibold"${_scopeId2}>${ssrInterpolate(unref(editingSecret) ? "Edit Secret" : "Add Secret")}</h3>`);
719
- } else {
720
- return [
721
- createVNode("h3", { class: "text-lg font-semibold" }, toDisplayString(unref(editingSecret) ? "Edit Secret" : "Add Secret"), 1)
722
- ];
723
- }
724
- }),
725
- body: withCtx((_2, _push3, _parent3, _scopeId2) => {
726
- if (_push3) {
727
- _push3(ssrRenderComponent(_component_UForm, {
728
- state: unref(secretForm),
729
- class: "space-y-4",
730
- onSubmit: handleSecretSubmit
731
- }, {
732
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
733
- if (_push4) {
734
- _push4(ssrRenderComponent(_component_UFormField, {
735
- label: "Key",
736
- name: "key",
737
- hint: unref(editingSecret) ? "" : "SCREAMING_SNAKE_CASE"
738
- }, {
739
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
740
- if (_push5) {
741
- _push5(ssrRenderComponent(_component_UInput, {
742
- modelValue: unref(secretForm).key,
743
- "onUpdate:modelValue": ($event) => unref(secretForm).key = $event,
744
- disabled: !!unref(editingSecret),
745
- placeholder: "MY_API_KEY",
746
- class: "w-full font-mono"
747
- }, null, _parent5, _scopeId4));
748
- } else {
749
- return [
750
- createVNode(_component_UInput, {
751
- modelValue: unref(secretForm).key,
752
- "onUpdate:modelValue": ($event) => unref(secretForm).key = $event,
753
- disabled: !!unref(editingSecret),
754
- placeholder: "MY_API_KEY",
755
- class: "w-full font-mono"
756
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
757
- ];
758
- }
759
- }),
760
- _: 1
761
- }, _parent4, _scopeId3));
762
- _push4(ssrRenderComponent(_component_UFormField, {
763
- label: "Value",
764
- name: "value",
765
- hint: unref(editingSecret) ? "Leave empty to keep current value" : ""
766
- }, {
767
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
768
- if (_push5) {
769
- _push5(ssrRenderComponent(_component_UInput, {
770
- modelValue: unref(secretForm).value,
771
- "onUpdate:modelValue": ($event) => unref(secretForm).value = $event,
772
- type: "password",
773
- placeholder: unref(editingSecret) ? "••••••••" : "Secret value",
774
- class: "w-full"
775
- }, null, _parent5, _scopeId4));
776
- } else {
777
- return [
778
- createVNode(_component_UInput, {
779
- modelValue: unref(secretForm).value,
780
- "onUpdate:modelValue": ($event) => unref(secretForm).value = $event,
781
- type: "password",
782
- placeholder: unref(editingSecret) ? "••••••••" : "Secret value",
783
- class: "w-full"
784
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
785
- ];
786
- }
787
- }),
788
- _: 1
789
- }, _parent4, _scopeId3));
790
- _push4(ssrRenderComponent(_component_UFormField, {
791
- label: "Description",
792
- name: "description"
793
- }, {
794
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
795
- if (_push5) {
796
- _push5(ssrRenderComponent(_component_UInput, {
797
- modelValue: unref(secretForm).description,
798
- "onUpdate:modelValue": ($event) => unref(secretForm).description = $event,
799
- placeholder: "Optional description",
800
- class: "w-full"
801
- }, null, _parent5, _scopeId4));
802
- } else {
803
- return [
804
- createVNode(_component_UInput, {
805
- modelValue: unref(secretForm).description,
806
- "onUpdate:modelValue": ($event) => unref(secretForm).description = $event,
807
- placeholder: "Optional description",
808
- class: "w-full"
809
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
810
- ];
811
- }
812
- }),
813
- _: 1
814
- }, _parent4, _scopeId3));
815
- _push4(`<div class="flex justify-end gap-2 pt-4"${_scopeId3}>`);
816
- _push4(ssrRenderComponent(_component_UButton, {
817
- variant: "ghost",
818
- onClick: ($event) => secretModal.value = false
819
- }, {
820
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
821
- if (_push5) {
822
- _push5(` Cancel `);
823
- } else {
824
- return [
825
- createTextVNode(" Cancel ")
826
- ];
827
- }
828
- }),
829
- _: 1
830
- }, _parent4, _scopeId3));
831
- _push4(ssrRenderComponent(_component_UButton, {
832
- type: "submit",
833
- loading: unref(secretSaving)
834
- }, {
835
- default: withCtx((_4, _push5, _parent5, _scopeId4) => {
836
- if (_push5) {
837
- _push5(`${ssrInterpolate(unref(editingSecret) ? "Update" : "Create")}`);
838
- } else {
839
- return [
840
- createTextVNode(toDisplayString(unref(editingSecret) ? "Update" : "Create"), 1)
841
- ];
842
- }
843
- }),
844
- _: 1
845
- }, _parent4, _scopeId3));
846
- _push4(`</div>`);
847
- } else {
848
- return [
849
- createVNode(_component_UFormField, {
850
- label: "Key",
851
- name: "key",
852
- hint: unref(editingSecret) ? "" : "SCREAMING_SNAKE_CASE"
853
- }, {
854
- default: withCtx(() => [
855
- createVNode(_component_UInput, {
856
- modelValue: unref(secretForm).key,
857
- "onUpdate:modelValue": ($event) => unref(secretForm).key = $event,
858
- disabled: !!unref(editingSecret),
859
- placeholder: "MY_API_KEY",
860
- class: "w-full font-mono"
861
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
862
- ]),
863
- _: 1
864
- }, 8, ["hint"]),
865
- createVNode(_component_UFormField, {
866
- label: "Value",
867
- name: "value",
868
- hint: unref(editingSecret) ? "Leave empty to keep current value" : ""
869
- }, {
870
- default: withCtx(() => [
871
- createVNode(_component_UInput, {
872
- modelValue: unref(secretForm).value,
873
- "onUpdate:modelValue": ($event) => unref(secretForm).value = $event,
874
- type: "password",
875
- placeholder: unref(editingSecret) ? "••••••••" : "Secret value",
876
- class: "w-full"
877
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
878
- ]),
879
- _: 1
880
- }, 8, ["hint"]),
881
- createVNode(_component_UFormField, {
882
- label: "Description",
883
- name: "description"
884
- }, {
885
- default: withCtx(() => [
886
- createVNode(_component_UInput, {
887
- modelValue: unref(secretForm).description,
888
- "onUpdate:modelValue": ($event) => unref(secretForm).description = $event,
889
- placeholder: "Optional description",
890
- class: "w-full"
891
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
892
- ]),
893
- _: 1
894
- }),
895
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
896
- createVNode(_component_UButton, {
897
- variant: "ghost",
898
- onClick: ($event) => secretModal.value = false
899
- }, {
900
- default: withCtx(() => [
901
- createTextVNode(" Cancel ")
902
- ]),
903
- _: 1
904
- }, 8, ["onClick"]),
905
- createVNode(_component_UButton, {
906
- type: "submit",
907
- loading: unref(secretSaving)
908
- }, {
909
- default: withCtx(() => [
910
- createTextVNode(toDisplayString(unref(editingSecret) ? "Update" : "Create"), 1)
911
- ]),
912
- _: 1
913
- }, 8, ["loading"])
914
- ])
915
- ];
916
- }
917
- }),
918
- _: 1
919
- }, _parent3, _scopeId2));
920
- } else {
921
- return [
922
- createVNode(_component_UForm, {
923
- state: unref(secretForm),
924
- class: "space-y-4",
925
- onSubmit: handleSecretSubmit
926
- }, {
927
- default: withCtx(() => [
928
- createVNode(_component_UFormField, {
929
- label: "Key",
930
- name: "key",
931
- hint: unref(editingSecret) ? "" : "SCREAMING_SNAKE_CASE"
932
- }, {
933
- default: withCtx(() => [
934
- createVNode(_component_UInput, {
935
- modelValue: unref(secretForm).key,
936
- "onUpdate:modelValue": ($event) => unref(secretForm).key = $event,
937
- disabled: !!unref(editingSecret),
938
- placeholder: "MY_API_KEY",
939
- class: "w-full font-mono"
940
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
941
- ]),
942
- _: 1
943
- }, 8, ["hint"]),
944
- createVNode(_component_UFormField, {
945
- label: "Value",
946
- name: "value",
947
- hint: unref(editingSecret) ? "Leave empty to keep current value" : ""
948
- }, {
949
- default: withCtx(() => [
950
- createVNode(_component_UInput, {
951
- modelValue: unref(secretForm).value,
952
- "onUpdate:modelValue": ($event) => unref(secretForm).value = $event,
953
- type: "password",
954
- placeholder: unref(editingSecret) ? "••••••••" : "Secret value",
955
- class: "w-full"
956
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
957
- ]),
958
- _: 1
959
- }, 8, ["hint"]),
960
- createVNode(_component_UFormField, {
961
- label: "Description",
962
- name: "description"
963
- }, {
964
- default: withCtx(() => [
965
- createVNode(_component_UInput, {
966
- modelValue: unref(secretForm).description,
967
- "onUpdate:modelValue": ($event) => unref(secretForm).description = $event,
968
- placeholder: "Optional description",
969
- class: "w-full"
970
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
971
- ]),
972
- _: 1
973
- }),
974
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
975
- createVNode(_component_UButton, {
976
- variant: "ghost",
977
- onClick: ($event) => secretModal.value = false
978
- }, {
979
- default: withCtx(() => [
980
- createTextVNode(" Cancel ")
981
- ]),
982
- _: 1
983
- }, 8, ["onClick"]),
984
- createVNode(_component_UButton, {
985
- type: "submit",
986
- loading: unref(secretSaving)
987
- }, {
988
- default: withCtx(() => [
989
- createTextVNode(toDisplayString(unref(editingSecret) ? "Update" : "Create"), 1)
990
- ]),
991
- _: 1
992
- }, 8, ["loading"])
993
- ])
994
- ]),
995
- _: 1
996
- }, 8, ["state"])
997
- ];
998
- }
999
- }),
1000
- _: 1
1001
- }, _parent2, _scopeId));
1002
- _push2(ssrRenderComponent(_component_UModal, {
1003
- open: unref(secretDeleteConfirm),
1004
- "onUpdate:open": ($event) => isRef(secretDeleteConfirm) ? secretDeleteConfirm.value = $event : null
1005
- }, {
1006
- header: withCtx((_2, _push3, _parent3, _scopeId2) => {
1007
- if (_push3) {
1008
- _push3(`<h3 class="text-lg font-semibold"${_scopeId2}> Delete Secret </h3>`);
1009
- } else {
1010
- return [
1011
- createVNode("h3", { class: "text-lg font-semibold" }, " Delete Secret ")
1012
- ];
1013
- }
1014
- }),
1015
- body: withCtx((_2, _push3, _parent3, _scopeId2) => {
1016
- if (_push3) {
1017
- _push3(`<p class="mb-4"${_scopeId2}> Are you sure you want to delete <code class="bg-elevated px-2 py-0.5 rounded"${_scopeId2}>${ssrInterpolate(unref(secretToDelete)?.key)}</code>? </p><p class="text-sm text-dimmed"${_scopeId2}> This action cannot be undone. Any skills using this secret will stop working. </p><div class="flex justify-end gap-2 pt-6"${_scopeId2}>`);
1018
- _push3(ssrRenderComponent(_component_UButton, {
1019
- variant: "ghost",
1020
- onClick: ($event) => secretDeleteConfirm.value = false
1021
- }, {
1022
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1023
- if (_push4) {
1024
- _push4(` Cancel `);
1025
- } else {
1026
- return [
1027
- createTextVNode(" Cancel ")
1028
- ];
1029
- }
1030
- }),
1031
- _: 1
1032
- }, _parent3, _scopeId2));
1033
- _push3(ssrRenderComponent(_component_UButton, {
1034
- color: "error",
1035
- onClick: handleDeleteSecret
1036
- }, {
1037
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1038
- if (_push4) {
1039
- _push4(` Delete `);
1040
- } else {
1041
- return [
1042
- createTextVNode(" Delete ")
1043
- ];
1044
- }
1045
- }),
1046
- _: 1
1047
- }, _parent3, _scopeId2));
1048
- _push3(`</div>`);
1049
- } else {
1050
- return [
1051
- createVNode("p", { class: "mb-4" }, [
1052
- createTextVNode(" Are you sure you want to delete "),
1053
- createVNode("code", { class: "bg-elevated px-2 py-0.5 rounded" }, toDisplayString(unref(secretToDelete)?.key), 1),
1054
- createTextVNode("? ")
1055
- ]),
1056
- createVNode("p", { class: "text-sm text-dimmed" }, " This action cannot be undone. Any skills using this secret will stop working. "),
1057
- createVNode("div", { class: "flex justify-end gap-2 pt-6" }, [
1058
- createVNode(_component_UButton, {
1059
- variant: "ghost",
1060
- onClick: ($event) => secretDeleteConfirm.value = false
1061
- }, {
1062
- default: withCtx(() => [
1063
- createTextVNode(" Cancel ")
1064
- ]),
1065
- _: 1
1066
- }, 8, ["onClick"]),
1067
- createVNode(_component_UButton, {
1068
- color: "error",
1069
- onClick: handleDeleteSecret
1070
- }, {
1071
- default: withCtx(() => [
1072
- createTextVNode(" Delete ")
1073
- ]),
1074
- _: 1
1075
- })
1076
- ])
1077
- ];
1078
- }
1079
- }),
1080
- _: 1
1081
- }, _parent2, _scopeId));
1082
- _push2(ssrRenderComponent(_component_UModal, {
1083
- open: unref(bridgeModal),
1084
- "onUpdate:open": ($event) => isRef(bridgeModal) ? bridgeModal.value = $event : null
1085
- }, {
1086
- header: withCtx((_2, _push3, _parent3, _scopeId2) => {
1087
- if (_push3) {
1088
- _push3(`<h3 class="text-lg font-semibold"${_scopeId2}> Add Integration </h3>`);
1089
- } else {
1090
- return [
1091
- createVNode("h3", { class: "text-lg font-semibold" }, " Add Integration ")
1092
- ];
1093
- }
1094
- }),
1095
- body: withCtx((_2, _push3, _parent3, _scopeId2) => {
1096
- if (_push3) {
1097
- _push3(`<div class="space-y-4"${_scopeId2}>`);
1098
- _push3(ssrRenderComponent(_component_UFormField, {
1099
- label: "Platform",
1100
- name: "platform"
1101
- }, {
1102
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1103
- if (_push4) {
1104
- _push4(ssrRenderComponent(_component_USelect, {
1105
- modelValue: unref(bridgeForm).platform,
1106
- "onUpdate:modelValue": ($event) => unref(bridgeForm).platform = $event,
1107
- items: platformOptions,
1108
- "value-key": "value",
1109
- class: "w-full"
1110
- }, null, _parent4, _scopeId3));
1111
- } else {
1112
- return [
1113
- createVNode(_component_USelect, {
1114
- modelValue: unref(bridgeForm).platform,
1115
- "onUpdate:modelValue": ($event) => unref(bridgeForm).platform = $event,
1116
- items: platformOptions,
1117
- "value-key": "value",
1118
- class: "w-full"
1119
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1120
- ];
1121
- }
1122
- }),
1123
- _: 1
1124
- }, _parent3, _scopeId2));
1125
- if (getMissingSecrets(unref(bridgeForm).platform).length) {
1126
- _push3(`<div class="flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"${_scopeId2}>`);
1127
- _push3(ssrRenderComponent(_component_UIcon, {
1128
- name: "i-lucide-alert-triangle",
1129
- class: "size-4 mt-0.5 text-error shrink-0"
1130
- }, null, _parent3, _scopeId2));
1131
- _push3(`<div${_scopeId2}><p class="font-medium text-error"${_scopeId2}> Missing required secrets </p><p class="text-dimmed mt-1"${_scopeId2}> Add the following in Settings → Secrets before creating: </p><ul class="mt-1 space-y-0.5"${_scopeId2}><!--[-->`);
1132
- ssrRenderList(getMissingSecrets(unref(bridgeForm).platform), (key) => {
1133
- _push3(`<li${_scopeId2}><code class="text-xs bg-elevated px-1.5 py-0.5 rounded"${_scopeId2}>${ssrInterpolate(key)}</code></li>`);
1134
- });
1135
- _push3(`<!--]--></ul></div></div>`);
1136
- } else {
1137
- _push3(`<!---->`);
1138
- }
1139
- _push3(ssrRenderComponent(_component_UFormField, {
1140
- label: "Name",
1141
- name: "name"
1142
- }, {
1143
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1144
- if (_push4) {
1145
- _push4(ssrRenderComponent(_component_UInput, {
1146
- modelValue: unref(bridgeForm).name,
1147
- "onUpdate:modelValue": ($event) => unref(bridgeForm).name = $event,
1148
- placeholder: platformNamePlaceholders[unref(bridgeForm).platform],
1149
- class: "w-full"
1150
- }, null, _parent4, _scopeId3));
1151
- } else {
1152
- return [
1153
- createVNode(_component_UInput, {
1154
- modelValue: unref(bridgeForm).name,
1155
- "onUpdate:modelValue": ($event) => unref(bridgeForm).name = $event,
1156
- placeholder: platformNamePlaceholders[unref(bridgeForm).platform],
1157
- class: "w-full"
1158
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
1159
- ];
1160
- }
1161
- }),
1162
- _: 1
1163
- }, _parent3, _scopeId2));
1164
- _push3(`<div class="flex justify-end gap-2 pt-4"${_scopeId2}>`);
1165
- _push3(ssrRenderComponent(_component_UButton, {
1166
- variant: "ghost",
1167
- onClick: ($event) => bridgeModal.value = false
1168
- }, {
1169
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1170
- if (_push4) {
1171
- _push4(` Cancel `);
1172
- } else {
1173
- return [
1174
- createTextVNode(" Cancel ")
1175
- ];
1176
- }
1177
- }),
1178
- _: 1
1179
- }, _parent3, _scopeId2));
1180
- _push3(ssrRenderComponent(_component_UButton, {
1181
- loading: unref(bridgeSaving),
1182
- disabled: getMissingSecrets(unref(bridgeForm).platform).length > 0,
1183
- onClick: handleBridgeCreate
1184
- }, {
1185
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1186
- if (_push4) {
1187
- _push4(` Create `);
1188
- } else {
1189
- return [
1190
- createTextVNode(" Create ")
1191
- ];
1192
- }
1193
- }),
1194
- _: 1
1195
- }, _parent3, _scopeId2));
1196
- _push3(`</div></div>`);
1197
- } else {
1198
- return [
1199
- createVNode("div", { class: "space-y-4" }, [
1200
- createVNode(_component_UFormField, {
1201
- label: "Platform",
1202
- name: "platform"
1203
- }, {
1204
- default: withCtx(() => [
1205
- createVNode(_component_USelect, {
1206
- modelValue: unref(bridgeForm).platform,
1207
- "onUpdate:modelValue": ($event) => unref(bridgeForm).platform = $event,
1208
- items: platformOptions,
1209
- "value-key": "value",
1210
- class: "w-full"
1211
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1212
- ]),
1213
- _: 1
1214
- }),
1215
- getMissingSecrets(unref(bridgeForm).platform).length ? (openBlock(), createBlock("div", {
1216
- key: 0,
1217
- class: "flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"
1218
- }, [
1219
- createVNode(_component_UIcon, {
1220
- name: "i-lucide-alert-triangle",
1221
- class: "size-4 mt-0.5 text-error shrink-0"
1222
- }),
1223
- createVNode("div", null, [
1224
- createVNode("p", { class: "font-medium text-error" }, " Missing required secrets "),
1225
- createVNode("p", { class: "text-dimmed mt-1" }, " Add the following in Settings → Secrets before creating: "),
1226
- createVNode("ul", { class: "mt-1 space-y-0.5" }, [
1227
- (openBlock(true), createBlock(Fragment, null, renderList(getMissingSecrets(unref(bridgeForm).platform), (key) => {
1228
- return openBlock(), createBlock("li", { key }, [
1229
- createVNode("code", { class: "text-xs bg-elevated px-1.5 py-0.5 rounded" }, toDisplayString(key), 1)
1230
- ]);
1231
- }), 128))
1232
- ])
1233
- ])
1234
- ])) : createCommentVNode("", true),
1235
- createVNode(_component_UFormField, {
1236
- label: "Name",
1237
- name: "name"
1238
- }, {
1239
- default: withCtx(() => [
1240
- createVNode(_component_UInput, {
1241
- modelValue: unref(bridgeForm).name,
1242
- "onUpdate:modelValue": ($event) => unref(bridgeForm).name = $event,
1243
- placeholder: platformNamePlaceholders[unref(bridgeForm).platform],
1244
- class: "w-full"
1245
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
1246
- ]),
1247
- _: 1
1248
- }),
1249
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
1250
- createVNode(_component_UButton, {
1251
- variant: "ghost",
1252
- onClick: ($event) => bridgeModal.value = false
1253
- }, {
1254
- default: withCtx(() => [
1255
- createTextVNode(" Cancel ")
1256
- ]),
1257
- _: 1
1258
- }, 8, ["onClick"]),
1259
- createVNode(_component_UButton, {
1260
- loading: unref(bridgeSaving),
1261
- disabled: getMissingSecrets(unref(bridgeForm).platform).length > 0,
1262
- onClick: handleBridgeCreate
1263
- }, {
1264
- default: withCtx(() => [
1265
- createTextVNode(" Create ")
1266
- ]),
1267
- _: 1
1268
- }, 8, ["loading", "disabled"])
1269
- ])
1270
- ])
1271
- ];
1272
- }
1273
- }),
1274
- _: 1
1275
- }, _parent2, _scopeId));
1276
- _push2(ssrRenderComponent(_component_UModal, {
1277
- open: unref(bridgeDeleteConfirm),
1278
- "onUpdate:open": ($event) => isRef(bridgeDeleteConfirm) ? bridgeDeleteConfirm.value = $event : null
1279
- }, {
1280
- header: withCtx((_2, _push3, _parent3, _scopeId2) => {
1281
- if (_push3) {
1282
- _push3(`<h3 class="text-lg font-semibold"${_scopeId2}> Delete Integration </h3>`);
1283
- } else {
1284
- return [
1285
- createVNode("h3", { class: "text-lg font-semibold" }, " Delete Integration ")
1286
- ];
1287
- }
1288
- }),
1289
- body: withCtx((_2, _push3, _parent3, _scopeId2) => {
1290
- if (_push3) {
1291
- _push3(`<p class="mb-4"${_scopeId2}> Are you sure you want to delete <strong${_scopeId2}>${ssrInterpolate(unref(bridgeToDelete)?.name)}</strong>? </p><p class="text-sm text-dimmed"${_scopeId2}> This will remove the integration and all associated message history. </p><div class="flex justify-end gap-2 pt-6"${_scopeId2}>`);
1292
- _push3(ssrRenderComponent(_component_UButton, {
1293
- variant: "ghost",
1294
- onClick: ($event) => bridgeDeleteConfirm.value = false
1295
- }, {
1296
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1297
- if (_push4) {
1298
- _push4(` Cancel `);
1299
- } else {
1300
- return [
1301
- createTextVNode(" Cancel ")
1302
- ];
1303
- }
1304
- }),
1305
- _: 1
1306
- }, _parent3, _scopeId2));
1307
- _push3(ssrRenderComponent(_component_UButton, {
1308
- color: "error",
1309
- onClick: handleDeleteBridge
1310
- }, {
1311
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1312
- if (_push4) {
1313
- _push4(` Delete `);
1314
- } else {
1315
- return [
1316
- createTextVNode(" Delete ")
1317
- ];
1318
- }
1319
- }),
1320
- _: 1
1321
- }, _parent3, _scopeId2));
1322
- _push3(`</div>`);
1323
- } else {
1324
- return [
1325
- createVNode("p", { class: "mb-4" }, [
1326
- createTextVNode(" Are you sure you want to delete "),
1327
- createVNode("strong", null, toDisplayString(unref(bridgeToDelete)?.name), 1),
1328
- createTextVNode("? ")
1329
- ]),
1330
- createVNode("p", { class: "text-sm text-dimmed" }, " This will remove the integration and all associated message history. "),
1331
- createVNode("div", { class: "flex justify-end gap-2 pt-6" }, [
1332
- createVNode(_component_UButton, {
1333
- variant: "ghost",
1334
- onClick: ($event) => bridgeDeleteConfirm.value = false
1335
- }, {
1336
- default: withCtx(() => [
1337
- createTextVNode(" Cancel ")
1338
- ]),
1339
- _: 1
1340
- }, 8, ["onClick"]),
1341
- createVNode(_component_UButton, {
1342
- color: "error",
1343
- onClick: handleDeleteBridge
1344
- }, {
1345
- default: withCtx(() => [
1346
- createTextVNode(" Delete ")
1347
- ]),
1348
- _: 1
1349
- })
1350
- ])
1351
- ];
1352
- }
1353
- }),
1354
- _: 1
1355
- }, _parent2, _scopeId));
1356
- _push2(ssrRenderComponent(_component_UModal, {
1357
- open: unref(bridgeConfigModal),
1358
- "onUpdate:open": ($event) => isRef(bridgeConfigModal) ? bridgeConfigModal.value = $event : null
1359
- }, {
1360
- header: withCtx((_2, _push3, _parent3, _scopeId2) => {
1361
- if (_push3) {
1362
- _push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
1363
- _push3(ssrRenderComponent(_component_UIcon, {
1364
- name: platformOptions.find((p) => p.value === unref(editingBridge)?.platform)?.icon || "i-lucide-plug",
1365
- class: "size-5"
1366
- }, null, _parent3, _scopeId2));
1367
- _push3(`<h3 class="text-lg font-semibold"${_scopeId2}> Configure ${ssrInterpolate(unref(editingBridge)?.name)}</h3></div>`);
1368
- } else {
1369
- return [
1370
- createVNode("div", { class: "flex items-center gap-2" }, [
1371
- createVNode(_component_UIcon, {
1372
- name: platformOptions.find((p) => p.value === unref(editingBridge)?.platform)?.icon || "i-lucide-plug",
1373
- class: "size-5"
1374
- }, null, 8, ["name"]),
1375
- createVNode("h3", { class: "text-lg font-semibold" }, " Configure " + toDisplayString(unref(editingBridge)?.name), 1)
1376
- ])
1377
- ];
1378
- }
1379
- }),
1380
- body: withCtx((_2, _push3, _parent3, _scopeId2) => {
1381
- if (_push3) {
1382
- _push3(`<div class="space-y-4"${_scopeId2}>`);
1383
- if (unref(editingBridge) && platformRequiredSecrets[unref(editingBridge).platform].length) {
1384
- _push3(`<div class="flex items-start gap-2 rounded-lg bg-elevated p-3 text-sm"${_scopeId2}>`);
1385
- _push3(ssrRenderComponent(_component_UIcon, {
1386
- name: "i-lucide-info",
1387
- class: "size-4 mt-0.5 text-dimmed shrink-0"
1388
- }, null, _parent3, _scopeId2));
1389
- _push3(`<span class="text-dimmed"${_scopeId2}> Requires <!--[-->`);
1390
- ssrRenderList(platformRequiredSecrets[unref(editingBridge).platform], (key, i) => {
1391
- _push3(`<!--[--><code class="bg-elevated px-1 py-0.5 rounded text-xs"${_scopeId2}>${ssrInterpolate(key)}</code>`);
1392
- if (i < platformRequiredSecrets[unref(editingBridge).platform].length - 1) {
1393
- _push3(`<!--[-->, <!--]-->`);
1394
- } else {
1395
- _push3(`<!---->`);
1396
- }
1397
- _push3(`<!--]-->`);
1398
- });
1399
- _push3(`<!--]--> in the Secrets tab. </span></div>`);
1400
- } else {
1401
- _push3(`<!---->`);
1402
- }
1403
- _push3(ssrRenderComponent(_component_UFormField, {
1404
- label: "Name",
1405
- name: "name"
1406
- }, {
1407
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1408
- if (_push4) {
1409
- _push4(ssrRenderComponent(_component_UInput, {
1410
- modelValue: unref(bridgeConfigForm).name,
1411
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).name = $event,
1412
- placeholder: "Integration name",
1413
- class: "w-full"
1414
- }, null, _parent4, _scopeId3));
1415
- } else {
1416
- return [
1417
- createVNode(_component_UInput, {
1418
- modelValue: unref(bridgeConfigForm).name,
1419
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).name = $event,
1420
- placeholder: "Integration name",
1421
- class: "w-full"
1422
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1423
- ];
1424
- }
1425
- }),
1426
- _: 1
1427
- }, _parent3, _scopeId2));
1428
- if (unref(editingBridge)?.platform === "telegram") {
1429
- _push3(`<!--[-->`);
1430
- _push3(ssrRenderComponent(_component_UFormField, {
1431
- label: "Bot Username",
1432
- name: "botUsername",
1433
- hint: "Without the @ prefix"
1434
- }, {
1435
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1436
- if (_push4) {
1437
- _push4(ssrRenderComponent(_component_UInput, {
1438
- modelValue: unref(bridgeConfigForm).botUsername,
1439
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).botUsername = $event,
1440
- placeholder: "my_bot",
1441
- class: "w-full"
1442
- }, null, _parent4, _scopeId3));
1443
- } else {
1444
- return [
1445
- createVNode(_component_UInput, {
1446
- modelValue: unref(bridgeConfigForm).botUsername,
1447
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).botUsername = $event,
1448
- placeholder: "my_bot",
1449
- class: "w-full"
1450
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1451
- ];
1452
- }
1453
- }),
1454
- _: 1
1455
- }, _parent3, _scopeId2));
1456
- _push3(ssrRenderComponent(_component_UFormField, {
1457
- label: "Allowed Chat IDs",
1458
- name: "allowedChatIds",
1459
- hint: "Comma-separated. Leave empty for all."
1460
- }, {
1461
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1462
- if (_push4) {
1463
- _push4(ssrRenderComponent(_component_UInput, {
1464
- modelValue: unref(bridgeConfigForm).allowedChatIds,
1465
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedChatIds = $event,
1466
- placeholder: "123456, -100789",
1467
- class: "w-full"
1468
- }, null, _parent4, _scopeId3));
1469
- } else {
1470
- return [
1471
- createVNode(_component_UInput, {
1472
- modelValue: unref(bridgeConfigForm).allowedChatIds,
1473
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedChatIds = $event,
1474
- placeholder: "123456, -100789",
1475
- class: "w-full"
1476
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1477
- ];
1478
- }
1479
- }),
1480
- _: 1
1481
- }, _parent3, _scopeId2));
1482
- _push3(`<!--]-->`);
1483
- } else {
1484
- _push3(`<!---->`);
1485
- }
1486
- if (unref(editingBridge)?.platform === "discord") {
1487
- _push3(`<!--[-->`);
1488
- _push3(ssrRenderComponent(_component_UFormField, {
1489
- label: "Listen Mode",
1490
- name: "listenMode"
1491
- }, {
1492
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1493
- if (_push4) {
1494
- _push4(ssrRenderComponent(_component_USelect, {
1495
- modelValue: unref(bridgeConfigForm).listenMode,
1496
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).listenMode = $event,
1497
- items: discordListenModeOptions,
1498
- "value-key": "value",
1499
- class: "w-full"
1500
- }, null, _parent4, _scopeId3));
1501
- } else {
1502
- return [
1503
- createVNode(_component_USelect, {
1504
- modelValue: unref(bridgeConfigForm).listenMode,
1505
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).listenMode = $event,
1506
- items: discordListenModeOptions,
1507
- "value-key": "value",
1508
- class: "w-full"
1509
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1510
- ];
1511
- }
1512
- }),
1513
- _: 1
1514
- }, _parent3, _scopeId2));
1515
- _push3(ssrRenderComponent(_component_UFormField, {
1516
- label: "Server ID",
1517
- name: "guildId",
1518
- hint: "Optional. Limit to one server."
1519
- }, {
1520
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1521
- if (_push4) {
1522
- _push4(ssrRenderComponent(_component_UInput, {
1523
- modelValue: unref(bridgeConfigForm).guildId,
1524
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).guildId = $event,
1525
- placeholder: "Discord server ID",
1526
- class: "w-full"
1527
- }, null, _parent4, _scopeId3));
1528
- } else {
1529
- return [
1530
- createVNode(_component_UInput, {
1531
- modelValue: unref(bridgeConfigForm).guildId,
1532
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).guildId = $event,
1533
- placeholder: "Discord server ID",
1534
- class: "w-full"
1535
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1536
- ];
1537
- }
1538
- }),
1539
- _: 1
1540
- }, _parent3, _scopeId2));
1541
- _push3(ssrRenderComponent(_component_UFormField, {
1542
- label: "Channel ID",
1543
- name: "channelId",
1544
- hint: "Optional. Limit to one channel (for 'all' mode)."
1545
- }, {
1546
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1547
- if (_push4) {
1548
- _push4(ssrRenderComponent(_component_UInput, {
1549
- modelValue: unref(bridgeConfigForm).channelId,
1550
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).channelId = $event,
1551
- placeholder: "Discord channel ID",
1552
- class: "w-full"
1553
- }, null, _parent4, _scopeId3));
1554
- } else {
1555
- return [
1556
- createVNode(_component_UInput, {
1557
- modelValue: unref(bridgeConfigForm).channelId,
1558
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).channelId = $event,
1559
- placeholder: "Discord channel ID",
1560
- class: "w-full"
1561
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1562
- ];
1563
- }
1564
- }),
1565
- _: 1
1566
- }, _parent3, _scopeId2));
1567
- _push3(`<!--]-->`);
1568
- } else {
1569
- _push3(`<!---->`);
1570
- }
1571
- if (unref(editingBridge)?.platform === "imessage") {
1572
- _push3(`<!--[-->`);
1573
- _push3(ssrRenderComponent(_component_UFormField, {
1574
- label: "Strategy",
1575
- name: "strategy"
1576
- }, {
1577
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1578
- if (_push4) {
1579
- _push4(ssrRenderComponent(_component_USelect, {
1580
- modelValue: unref(bridgeConfigForm).strategy,
1581
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).strategy = $event,
1582
- items: imessageStrategyOptions,
1583
- "value-key": "value",
1584
- class: "w-full"
1585
- }, null, _parent4, _scopeId3));
1586
- } else {
1587
- return [
1588
- createVNode(_component_USelect, {
1589
- modelValue: unref(bridgeConfigForm).strategy,
1590
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).strategy = $event,
1591
- items: imessageStrategyOptions,
1592
- "value-key": "value",
1593
- class: "w-full"
1594
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1595
- ];
1596
- }
1597
- }),
1598
- _: 1
1599
- }, _parent3, _scopeId2));
1600
- if (unref(bridgeConfigForm).strategy === "bluebubbles" && !unref(secretsData).some((s) => s.key === "BLUEBUBBLES_PASSWORD")) {
1601
- _push3(`<div class="flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"${_scopeId2}>`);
1602
- _push3(ssrRenderComponent(_component_UIcon, {
1603
- name: "i-lucide-alert-triangle",
1604
- class: "size-4 mt-0.5 text-error shrink-0"
1605
- }, null, _parent3, _scopeId2));
1606
- _push3(`<span class="text-dimmed"${_scopeId2}> BlueBubbles requires secret <code class="text-xs bg-elevated px-1.5 py-0.5 rounded"${_scopeId2}>BLUEBUBBLES_PASSWORD</code> in the Secrets tab. </span></div>`);
1607
- } else {
1608
- _push3(`<!---->`);
1609
- }
1610
- if (unref(bridgeConfigForm).strategy === "bluebubbles") {
1611
- _push3(ssrRenderComponent(_component_UFormField, {
1612
- label: "BlueBubbles URL",
1613
- name: "blueBubblesUrl"
1614
- }, {
1615
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1616
- if (_push4) {
1617
- _push4(ssrRenderComponent(_component_UInput, {
1618
- modelValue: unref(bridgeConfigForm).blueBubblesUrl,
1619
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).blueBubblesUrl = $event,
1620
- placeholder: "http://192.168.1.100:1234",
1621
- class: "w-full"
1622
- }, null, _parent4, _scopeId3));
1623
- } else {
1624
- return [
1625
- createVNode(_component_UInput, {
1626
- modelValue: unref(bridgeConfigForm).blueBubblesUrl,
1627
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).blueBubblesUrl = $event,
1628
- placeholder: "http://192.168.1.100:1234",
1629
- class: "w-full"
1630
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1631
- ];
1632
- }
1633
- }),
1634
- _: 1
1635
- }, _parent3, _scopeId2));
1636
- } else {
1637
- _push3(`<!---->`);
1638
- }
1639
- _push3(ssrRenderComponent(_component_UFormField, {
1640
- label: "Allowed Numbers",
1641
- name: "allowedNumbers",
1642
- hint: "Comma-separated. Leave empty for all."
1643
- }, {
1644
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1645
- if (_push4) {
1646
- _push4(ssrRenderComponent(_component_UInput, {
1647
- modelValue: unref(bridgeConfigForm).allowedNumbers,
1648
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedNumbers = $event,
1649
- placeholder: "+15551234567, +15559876543",
1650
- class: "w-full"
1651
- }, null, _parent4, _scopeId3));
1652
- } else {
1653
- return [
1654
- createVNode(_component_UInput, {
1655
- modelValue: unref(bridgeConfigForm).allowedNumbers,
1656
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedNumbers = $event,
1657
- placeholder: "+15551234567, +15559876543",
1658
- class: "w-full"
1659
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1660
- ];
1661
- }
1662
- }),
1663
- _: 1
1664
- }, _parent3, _scopeId2));
1665
- _push3(`<!--]-->`);
1666
- } else {
1667
- _push3(`<!---->`);
1668
- }
1669
- if (unref(editingBridge)?.platform === "google") {
1670
- _push3(`<!--[-->`);
1671
- _push3(ssrRenderComponent(_component_UFormField, {
1672
- label: "Enabled Services",
1673
- name: "enabledServices"
1674
- }, {
1675
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1676
- if (_push4) {
1677
- _push4(`<div class="space-y-2"${_scopeId3}><!--[-->`);
1678
- ssrRenderList(googleServiceOptions, (svc) => {
1679
- _push4(`<label class="flex items-center gap-2 cursor-pointer"${_scopeId3}><input type="checkbox"${ssrIncludeBooleanAttr(unref(bridgeConfigForm).enabledServices.includes(svc.value)) ? " checked" : ""} class="rounded"${_scopeId3}><span class="text-sm"${_scopeId3}>${ssrInterpolate(svc.label)}</span></label>`);
1680
- });
1681
- _push4(`<!--]--></div>`);
1682
- } else {
1683
- return [
1684
- createVNode("div", { class: "space-y-2" }, [
1685
- (openBlock(), createBlock(Fragment, null, renderList(googleServiceOptions, (svc) => {
1686
- return createVNode("label", {
1687
- key: svc.value,
1688
- class: "flex items-center gap-2 cursor-pointer"
1689
- }, [
1690
- createVNode("input", {
1691
- type: "checkbox",
1692
- checked: unref(bridgeConfigForm).enabledServices.includes(svc.value),
1693
- class: "rounded",
1694
- onChange: ($event) => unref(bridgeConfigForm).enabledServices.includes(svc.value) ? unref(bridgeConfigForm).enabledServices = unref(bridgeConfigForm).enabledServices.filter((s) => s !== svc.value) : unref(bridgeConfigForm).enabledServices.push(svc.value)
1695
- }, null, 40, ["checked", "onChange"]),
1696
- createVNode("span", { class: "text-sm" }, toDisplayString(svc.label), 1)
1697
- ]);
1698
- }), 64))
1699
- ])
1700
- ];
1701
- }
1702
- }),
1703
- _: 1
1704
- }, _parent3, _scopeId2));
1705
- _push3(ssrRenderComponent(_component_UFormField, {
1706
- label: "Google Account",
1707
- name: "account",
1708
- hint: "Email used with gogcli"
1709
- }, {
1710
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1711
- if (_push4) {
1712
- _push4(ssrRenderComponent(_component_UInput, {
1713
- modelValue: unref(bridgeConfigForm).account,
1714
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).account = $event,
1715
- placeholder: "user@gmail.com",
1716
- class: "w-full"
1717
- }, null, _parent4, _scopeId3));
1718
- } else {
1719
- return [
1720
- createVNode(_component_UInput, {
1721
- modelValue: unref(bridgeConfigForm).account,
1722
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).account = $event,
1723
- placeholder: "user@gmail.com",
1724
- class: "w-full"
1725
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1726
- ];
1727
- }
1728
- }),
1729
- _: 1
1730
- }, _parent3, _scopeId2));
1731
- _push3(`<!--]-->`);
1732
- } else {
1733
- _push3(`<!---->`);
1734
- }
1735
- if (unref(editingBridge)?.platform === "email") {
1736
- _push3(`<!--[-->`);
1737
- _push3(ssrRenderComponent(_component_UFormField, {
1738
- label: "Email Address",
1739
- name: "emailAddress"
1740
- }, {
1741
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1742
- if (_push4) {
1743
- _push4(ssrRenderComponent(_component_UInput, {
1744
- modelValue: unref(bridgeConfigForm).emailAddress,
1745
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).emailAddress = $event,
1746
- placeholder: "user@example.com",
1747
- class: "w-full"
1748
- }, null, _parent4, _scopeId3));
1749
- } else {
1750
- return [
1751
- createVNode(_component_UInput, {
1752
- modelValue: unref(bridgeConfigForm).emailAddress,
1753
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).emailAddress = $event,
1754
- placeholder: "user@example.com",
1755
- class: "w-full"
1756
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1757
- ];
1758
- }
1759
- }),
1760
- _: 1
1761
- }, _parent3, _scopeId2));
1762
- _push3(`<div class="grid grid-cols-2 gap-4"${_scopeId2}>`);
1763
- _push3(ssrRenderComponent(_component_UFormField, {
1764
- label: "IMAP Host",
1765
- name: "imapHost"
1766
- }, {
1767
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1768
- if (_push4) {
1769
- _push4(ssrRenderComponent(_component_UInput, {
1770
- modelValue: unref(bridgeConfigForm).imapHost,
1771
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapHost = $event,
1772
- placeholder: "imap.example.com",
1773
- class: "w-full"
1774
- }, null, _parent4, _scopeId3));
1775
- } else {
1776
- return [
1777
- createVNode(_component_UInput, {
1778
- modelValue: unref(bridgeConfigForm).imapHost,
1779
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapHost = $event,
1780
- placeholder: "imap.example.com",
1781
- class: "w-full"
1782
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1783
- ];
1784
- }
1785
- }),
1786
- _: 1
1787
- }, _parent3, _scopeId2));
1788
- _push3(ssrRenderComponent(_component_UFormField, {
1789
- label: "IMAP Port",
1790
- name: "imapPort"
1791
- }, {
1792
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1793
- if (_push4) {
1794
- _push4(ssrRenderComponent(_component_UInput, {
1795
- modelValue: unref(bridgeConfigForm).imapPort,
1796
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapPort = $event,
1797
- placeholder: "993",
1798
- class: "w-full"
1799
- }, null, _parent4, _scopeId3));
1800
- } else {
1801
- return [
1802
- createVNode(_component_UInput, {
1803
- modelValue: unref(bridgeConfigForm).imapPort,
1804
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapPort = $event,
1805
- placeholder: "993",
1806
- class: "w-full"
1807
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1808
- ];
1809
- }
1810
- }),
1811
- _: 1
1812
- }, _parent3, _scopeId2));
1813
- _push3(`</div><div class="grid grid-cols-2 gap-4"${_scopeId2}>`);
1814
- _push3(ssrRenderComponent(_component_UFormField, {
1815
- label: "SMTP Host",
1816
- name: "smtpHost"
1817
- }, {
1818
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1819
- if (_push4) {
1820
- _push4(ssrRenderComponent(_component_UInput, {
1821
- modelValue: unref(bridgeConfigForm).smtpHost,
1822
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpHost = $event,
1823
- placeholder: "smtp.example.com",
1824
- class: "w-full"
1825
- }, null, _parent4, _scopeId3));
1826
- } else {
1827
- return [
1828
- createVNode(_component_UInput, {
1829
- modelValue: unref(bridgeConfigForm).smtpHost,
1830
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpHost = $event,
1831
- placeholder: "smtp.example.com",
1832
- class: "w-full"
1833
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1834
- ];
1835
- }
1836
- }),
1837
- _: 1
1838
- }, _parent3, _scopeId2));
1839
- _push3(ssrRenderComponent(_component_UFormField, {
1840
- label: "SMTP Port",
1841
- name: "smtpPort"
1842
- }, {
1843
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1844
- if (_push4) {
1845
- _push4(ssrRenderComponent(_component_UInput, {
1846
- modelValue: unref(bridgeConfigForm).smtpPort,
1847
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpPort = $event,
1848
- placeholder: "587",
1849
- class: "w-full"
1850
- }, null, _parent4, _scopeId3));
1851
- } else {
1852
- return [
1853
- createVNode(_component_UInput, {
1854
- modelValue: unref(bridgeConfigForm).smtpPort,
1855
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpPort = $event,
1856
- placeholder: "587",
1857
- class: "w-full"
1858
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1859
- ];
1860
- }
1861
- }),
1862
- _: 1
1863
- }, _parent3, _scopeId2));
1864
- _push3(`</div><!--]-->`);
1865
- } else {
1866
- _push3(`<!---->`);
1867
- }
1868
- _push3(`<div class="flex justify-end gap-2 pt-4"${_scopeId2}>`);
1869
- _push3(ssrRenderComponent(_component_UButton, {
1870
- variant: "ghost",
1871
- onClick: ($event) => bridgeConfigModal.value = false
1872
- }, {
1873
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1874
- if (_push4) {
1875
- _push4(` Cancel `);
1876
- } else {
1877
- return [
1878
- createTextVNode(" Cancel ")
1879
- ];
1880
- }
1881
- }),
1882
- _: 1
1883
- }, _parent3, _scopeId2));
1884
- _push3(ssrRenderComponent(_component_UButton, {
1885
- loading: unref(bridgeConfigSaving),
1886
- onClick: handleBridgeConfigSave
1887
- }, {
1888
- default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1889
- if (_push4) {
1890
- _push4(` Save `);
1891
- } else {
1892
- return [
1893
- createTextVNode(" Save ")
1894
- ];
1895
- }
1896
- }),
1897
- _: 1
1898
- }, _parent3, _scopeId2));
1899
- _push3(`</div></div>`);
1900
- } else {
1901
- return [
1902
- createVNode("div", { class: "space-y-4" }, [
1903
- unref(editingBridge) && platformRequiredSecrets[unref(editingBridge).platform].length ? (openBlock(), createBlock("div", {
1904
- key: 0,
1905
- class: "flex items-start gap-2 rounded-lg bg-elevated p-3 text-sm"
1906
- }, [
1907
- createVNode(_component_UIcon, {
1908
- name: "i-lucide-info",
1909
- class: "size-4 mt-0.5 text-dimmed shrink-0"
1910
- }),
1911
- createVNode("span", { class: "text-dimmed" }, [
1912
- createTextVNode(" Requires "),
1913
- (openBlock(true), createBlock(Fragment, null, renderList(platformRequiredSecrets[unref(editingBridge).platform], (key, i) => {
1914
- return openBlock(), createBlock(Fragment, { key }, [
1915
- createVNode("code", { class: "bg-elevated px-1 py-0.5 rounded text-xs" }, toDisplayString(key), 1),
1916
- i < platformRequiredSecrets[unref(editingBridge).platform].length - 1 ? (openBlock(), createBlock(Fragment, { key: 0 }, [
1917
- createTextVNode(", ")
1918
- ], 64)) : createCommentVNode("", true)
1919
- ], 64);
1920
- }), 128)),
1921
- createTextVNode(" in the Secrets tab. ")
1922
- ])
1923
- ])) : createCommentVNode("", true),
1924
- createVNode(_component_UFormField, {
1925
- label: "Name",
1926
- name: "name"
1927
- }, {
1928
- default: withCtx(() => [
1929
- createVNode(_component_UInput, {
1930
- modelValue: unref(bridgeConfigForm).name,
1931
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).name = $event,
1932
- placeholder: "Integration name",
1933
- class: "w-full"
1934
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1935
- ]),
1936
- _: 1
1937
- }),
1938
- unref(editingBridge)?.platform === "telegram" ? (openBlock(), createBlock(Fragment, { key: 1 }, [
1939
- createVNode(_component_UFormField, {
1940
- label: "Bot Username",
1941
- name: "botUsername",
1942
- hint: "Without the @ prefix"
1943
- }, {
1944
- default: withCtx(() => [
1945
- createVNode(_component_UInput, {
1946
- modelValue: unref(bridgeConfigForm).botUsername,
1947
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).botUsername = $event,
1948
- placeholder: "my_bot",
1949
- class: "w-full"
1950
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1951
- ]),
1952
- _: 1
1953
- }),
1954
- createVNode(_component_UFormField, {
1955
- label: "Allowed Chat IDs",
1956
- name: "allowedChatIds",
1957
- hint: "Comma-separated. Leave empty for all."
1958
- }, {
1959
- default: withCtx(() => [
1960
- createVNode(_component_UInput, {
1961
- modelValue: unref(bridgeConfigForm).allowedChatIds,
1962
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedChatIds = $event,
1963
- placeholder: "123456, -100789",
1964
- class: "w-full"
1965
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1966
- ]),
1967
- _: 1
1968
- })
1969
- ], 64)) : createCommentVNode("", true),
1970
- unref(editingBridge)?.platform === "discord" ? (openBlock(), createBlock(Fragment, { key: 2 }, [
1971
- createVNode(_component_UFormField, {
1972
- label: "Listen Mode",
1973
- name: "listenMode"
1974
- }, {
1975
- default: withCtx(() => [
1976
- createVNode(_component_USelect, {
1977
- modelValue: unref(bridgeConfigForm).listenMode,
1978
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).listenMode = $event,
1979
- items: discordListenModeOptions,
1980
- "value-key": "value",
1981
- class: "w-full"
1982
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1983
- ]),
1984
- _: 1
1985
- }),
1986
- createVNode(_component_UFormField, {
1987
- label: "Server ID",
1988
- name: "guildId",
1989
- hint: "Optional. Limit to one server."
1990
- }, {
1991
- default: withCtx(() => [
1992
- createVNode(_component_UInput, {
1993
- modelValue: unref(bridgeConfigForm).guildId,
1994
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).guildId = $event,
1995
- placeholder: "Discord server ID",
1996
- class: "w-full"
1997
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
1998
- ]),
1999
- _: 1
2000
- }),
2001
- createVNode(_component_UFormField, {
2002
- label: "Channel ID",
2003
- name: "channelId",
2004
- hint: "Optional. Limit to one channel (for 'all' mode)."
2005
- }, {
2006
- default: withCtx(() => [
2007
- createVNode(_component_UInput, {
2008
- modelValue: unref(bridgeConfigForm).channelId,
2009
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).channelId = $event,
2010
- placeholder: "Discord channel ID",
2011
- class: "w-full"
2012
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2013
- ]),
2014
- _: 1
2015
- })
2016
- ], 64)) : createCommentVNode("", true),
2017
- unref(editingBridge)?.platform === "imessage" ? (openBlock(), createBlock(Fragment, { key: 3 }, [
2018
- createVNode(_component_UFormField, {
2019
- label: "Strategy",
2020
- name: "strategy"
2021
- }, {
2022
- default: withCtx(() => [
2023
- createVNode(_component_USelect, {
2024
- modelValue: unref(bridgeConfigForm).strategy,
2025
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).strategy = $event,
2026
- items: imessageStrategyOptions,
2027
- "value-key": "value",
2028
- class: "w-full"
2029
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2030
- ]),
2031
- _: 1
2032
- }),
2033
- unref(bridgeConfigForm).strategy === "bluebubbles" && !unref(secretsData).some((s) => s.key === "BLUEBUBBLES_PASSWORD") ? (openBlock(), createBlock("div", {
2034
- key: 0,
2035
- class: "flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"
2036
- }, [
2037
- createVNode(_component_UIcon, {
2038
- name: "i-lucide-alert-triangle",
2039
- class: "size-4 mt-0.5 text-error shrink-0"
2040
- }),
2041
- createVNode("span", { class: "text-dimmed" }, [
2042
- createTextVNode(" BlueBubbles requires secret "),
2043
- createVNode("code", { class: "text-xs bg-elevated px-1.5 py-0.5 rounded" }, "BLUEBUBBLES_PASSWORD"),
2044
- createTextVNode(" in the Secrets tab. ")
2045
- ])
2046
- ])) : createCommentVNode("", true),
2047
- unref(bridgeConfigForm).strategy === "bluebubbles" ? (openBlock(), createBlock(_component_UFormField, {
2048
- key: 1,
2049
- label: "BlueBubbles URL",
2050
- name: "blueBubblesUrl"
2051
- }, {
2052
- default: withCtx(() => [
2053
- createVNode(_component_UInput, {
2054
- modelValue: unref(bridgeConfigForm).blueBubblesUrl,
2055
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).blueBubblesUrl = $event,
2056
- placeholder: "http://192.168.1.100:1234",
2057
- class: "w-full"
2058
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2059
- ]),
2060
- _: 1
2061
- })) : createCommentVNode("", true),
2062
- createVNode(_component_UFormField, {
2063
- label: "Allowed Numbers",
2064
- name: "allowedNumbers",
2065
- hint: "Comma-separated. Leave empty for all."
2066
- }, {
2067
- default: withCtx(() => [
2068
- createVNode(_component_UInput, {
2069
- modelValue: unref(bridgeConfigForm).allowedNumbers,
2070
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedNumbers = $event,
2071
- placeholder: "+15551234567, +15559876543",
2072
- class: "w-full"
2073
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2074
- ]),
2075
- _: 1
2076
- })
2077
- ], 64)) : createCommentVNode("", true),
2078
- unref(editingBridge)?.platform === "google" ? (openBlock(), createBlock(Fragment, { key: 4 }, [
2079
- createVNode(_component_UFormField, {
2080
- label: "Enabled Services",
2081
- name: "enabledServices"
2082
- }, {
2083
- default: withCtx(() => [
2084
- createVNode("div", { class: "space-y-2" }, [
2085
- (openBlock(), createBlock(Fragment, null, renderList(googleServiceOptions, (svc) => {
2086
- return createVNode("label", {
2087
- key: svc.value,
2088
- class: "flex items-center gap-2 cursor-pointer"
2089
- }, [
2090
- createVNode("input", {
2091
- type: "checkbox",
2092
- checked: unref(bridgeConfigForm).enabledServices.includes(svc.value),
2093
- class: "rounded",
2094
- onChange: ($event) => unref(bridgeConfigForm).enabledServices.includes(svc.value) ? unref(bridgeConfigForm).enabledServices = unref(bridgeConfigForm).enabledServices.filter((s) => s !== svc.value) : unref(bridgeConfigForm).enabledServices.push(svc.value)
2095
- }, null, 40, ["checked", "onChange"]),
2096
- createVNode("span", { class: "text-sm" }, toDisplayString(svc.label), 1)
2097
- ]);
2098
- }), 64))
2099
- ])
2100
- ]),
2101
- _: 1
2102
- }),
2103
- createVNode(_component_UFormField, {
2104
- label: "Google Account",
2105
- name: "account",
2106
- hint: "Email used with gogcli"
2107
- }, {
2108
- default: withCtx(() => [
2109
- createVNode(_component_UInput, {
2110
- modelValue: unref(bridgeConfigForm).account,
2111
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).account = $event,
2112
- placeholder: "user@gmail.com",
2113
- class: "w-full"
2114
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2115
- ]),
2116
- _: 1
2117
- })
2118
- ], 64)) : createCommentVNode("", true),
2119
- unref(editingBridge)?.platform === "email" ? (openBlock(), createBlock(Fragment, { key: 5 }, [
2120
- createVNode(_component_UFormField, {
2121
- label: "Email Address",
2122
- name: "emailAddress"
2123
- }, {
2124
- default: withCtx(() => [
2125
- createVNode(_component_UInput, {
2126
- modelValue: unref(bridgeConfigForm).emailAddress,
2127
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).emailAddress = $event,
2128
- placeholder: "user@example.com",
2129
- class: "w-full"
2130
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2131
- ]),
2132
- _: 1
2133
- }),
2134
- createVNode("div", { class: "grid grid-cols-2 gap-4" }, [
2135
- createVNode(_component_UFormField, {
2136
- label: "IMAP Host",
2137
- name: "imapHost"
2138
- }, {
2139
- default: withCtx(() => [
2140
- createVNode(_component_UInput, {
2141
- modelValue: unref(bridgeConfigForm).imapHost,
2142
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapHost = $event,
2143
- placeholder: "imap.example.com",
2144
- class: "w-full"
2145
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2146
- ]),
2147
- _: 1
2148
- }),
2149
- createVNode(_component_UFormField, {
2150
- label: "IMAP Port",
2151
- name: "imapPort"
2152
- }, {
2153
- default: withCtx(() => [
2154
- createVNode(_component_UInput, {
2155
- modelValue: unref(bridgeConfigForm).imapPort,
2156
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapPort = $event,
2157
- placeholder: "993",
2158
- class: "w-full"
2159
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2160
- ]),
2161
- _: 1
2162
- })
2163
- ]),
2164
- createVNode("div", { class: "grid grid-cols-2 gap-4" }, [
2165
- createVNode(_component_UFormField, {
2166
- label: "SMTP Host",
2167
- name: "smtpHost"
2168
- }, {
2169
- default: withCtx(() => [
2170
- createVNode(_component_UInput, {
2171
- modelValue: unref(bridgeConfigForm).smtpHost,
2172
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpHost = $event,
2173
- placeholder: "smtp.example.com",
2174
- class: "w-full"
2175
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2176
- ]),
2177
- _: 1
2178
- }),
2179
- createVNode(_component_UFormField, {
2180
- label: "SMTP Port",
2181
- name: "smtpPort"
2182
- }, {
2183
- default: withCtx(() => [
2184
- createVNode(_component_UInput, {
2185
- modelValue: unref(bridgeConfigForm).smtpPort,
2186
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpPort = $event,
2187
- placeholder: "587",
2188
- class: "w-full"
2189
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2190
- ]),
2191
- _: 1
2192
- })
2193
- ])
2194
- ], 64)) : createCommentVNode("", true),
2195
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
2196
- createVNode(_component_UButton, {
2197
- variant: "ghost",
2198
- onClick: ($event) => bridgeConfigModal.value = false
2199
- }, {
2200
- default: withCtx(() => [
2201
- createTextVNode(" Cancel ")
2202
- ]),
2203
- _: 1
2204
- }, 8, ["onClick"]),
2205
- createVNode(_component_UButton, {
2206
- loading: unref(bridgeConfigSaving),
2207
- onClick: handleBridgeConfigSave
2208
- }, {
2209
- default: withCtx(() => [
2210
- createTextVNode(" Save ")
2211
- ]),
2212
- _: 1
2213
- }, 8, ["loading"])
2214
- ])
2215
- ])
2216
- ];
2217
- }
2218
- }),
2219
- _: 1
2220
- }, _parent2, _scopeId));
2221
- } else {
2222
- return [
2223
- createVNode(_component_UDashboardNavbar, { title: "Settings" }, {
2224
- right: withCtx(() => [
2225
- createVNode(_component_UColorModeButton)
2226
- ]),
2227
- _: 1
2228
- }),
2229
- createVNode("div", { class: "p-6" }, [
2230
- createVNode(_component_ClientOnly, null, {
2231
- fallback: withCtx(() => [
2232
- createVNode("div", { class: "space-y-8 max-w-xl mx-auto py-6" }, [
2233
- createVNode(_component_USkeleton, { class: "h-10 w-full" }),
2234
- createVNode("div", { class: "space-y-4" }, [
2235
- createVNode(_component_USkeleton, { class: "h-5 w-20" }),
2236
- createVNode(_component_USkeleton, { class: "h-10 w-full" }),
2237
- createVNode(_component_USkeleton, { class: "h-10 w-28" })
2238
- ])
2239
- ])
2240
- ]),
2241
- default: withCtx(() => [
2242
- createVNode(_component_UTabs, {
2243
- items: tabs,
2244
- "default-value": "account",
2245
- class: "w-full mx-auto",
2246
- ui: { list: "max-w-xl" }
2247
- }, {
2248
- account: withCtx(() => [
2249
- createVNode("div", { class: "space-y-8 max-w-2xl mx-auto py-6" }, [
2250
- createVNode("div", null, [
2251
- createVNode("h3", { class: "text-lg font-semibold mb-4" }, " Profile "),
2252
- createVNode(_component_UForm, {
2253
- state: unref(profileState),
2254
- class: "space-y-4",
2255
- onSubmit: handleProfileSubmit
2256
- }, {
2257
- default: withCtx(() => [
2258
- createVNode(_component_UFormField, {
2259
- label: "Name",
2260
- name: "name"
2261
- }, {
2262
- default: withCtx(() => [
2263
- createVNode(_component_UInput, {
2264
- modelValue: unref(profileState).name,
2265
- "onUpdate:modelValue": ($event) => unref(profileState).name = $event,
2266
- placeholder: "Your name",
2267
- class: "w-full"
2268
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2269
- ]),
2270
- _: 1
2271
- }),
2272
- createVNode(_component_UButton, {
2273
- type: "submit",
2274
- loading: unref(profileLoading)
2275
- }, {
2276
- default: withCtx(() => [
2277
- createTextVNode(" Save Name ")
2278
- ]),
2279
- _: 1
2280
- }, 8, ["loading"])
2281
- ]),
2282
- _: 1
2283
- }, 8, ["state"])
2284
- ]),
2285
- createVNode(_component_USeparator),
2286
- createVNode("div", null, [
2287
- createVNode("h3", { class: "text-lg font-semibold mb-4" }, " Email Address "),
2288
- createVNode(_component_UForm, {
2289
- state: unref(emailState),
2290
- class: "space-y-4",
2291
- onSubmit: handleEmailSubmit
2292
- }, {
2293
- default: withCtx(() => [
2294
- createVNode(_component_UFormField, {
2295
- label: "Email",
2296
- name: "newEmail"
2297
- }, {
2298
- default: withCtx(() => [
2299
- createVNode(_component_UInput, {
2300
- modelValue: unref(emailState).newEmail,
2301
- "onUpdate:modelValue": ($event) => unref(emailState).newEmail = $event,
2302
- type: "email",
2303
- placeholder: "your@email.com",
2304
- class: "w-full"
2305
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2306
- ]),
2307
- _: 1
2308
- }),
2309
- createVNode(_component_UButton, {
2310
- type: "submit",
2311
- loading: unref(emailLoading)
2312
- }, {
2313
- default: withCtx(() => [
2314
- createTextVNode(" Change Email ")
2315
- ]),
2316
- _: 1
2317
- }, 8, ["loading"])
2318
- ]),
2319
- _: 1
2320
- }, 8, ["state"])
2321
- ]),
2322
- createVNode(_component_USeparator),
2323
- createVNode("div", null, [
2324
- createVNode("h3", { class: "text-lg font-semibold mb-4" }, " Change Password "),
2325
- createVNode(_component_UForm, {
2326
- state: unref(passwordState),
2327
- class: "space-y-4",
2328
- onSubmit: handlePasswordSubmit
2329
- }, {
2330
- default: withCtx(() => [
2331
- createVNode(_component_UFormField, {
2332
- label: "Current Password",
2333
- name: "currentPassword"
2334
- }, {
2335
- default: withCtx(() => [
2336
- createVNode(_component_UInput, {
2337
- modelValue: unref(passwordState).currentPassword,
2338
- "onUpdate:modelValue": ($event) => unref(passwordState).currentPassword = $event,
2339
- type: "password",
2340
- class: "w-full"
2341
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2342
- ]),
2343
- _: 1
2344
- }),
2345
- createVNode(_component_UFormField, {
2346
- label: "New Password",
2347
- name: "newPassword"
2348
- }, {
2349
- default: withCtx(() => [
2350
- createVNode(_component_UInput, {
2351
- modelValue: unref(passwordState).newPassword,
2352
- "onUpdate:modelValue": ($event) => unref(passwordState).newPassword = $event,
2353
- type: "password",
2354
- class: "w-full"
2355
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2356
- ]),
2357
- _: 1
2358
- }),
2359
- createVNode(_component_UFormField, {
2360
- label: "Confirm New Password",
2361
- name: "confirmPassword"
2362
- }, {
2363
- default: withCtx(() => [
2364
- createVNode(_component_UInput, {
2365
- modelValue: unref(passwordState).confirmPassword,
2366
- "onUpdate:modelValue": ($event) => unref(passwordState).confirmPassword = $event,
2367
- type: "password",
2368
- class: "w-full"
2369
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2370
- ]),
2371
- _: 1
2372
- }),
2373
- createVNode(_component_UButton, {
2374
- type: "submit",
2375
- loading: unref(passwordLoading)
2376
- }, {
2377
- default: withCtx(() => [
2378
- createTextVNode(" Change Password ")
2379
- ]),
2380
- _: 1
2381
- }, 8, ["loading"])
2382
- ]),
2383
- _: 1
2384
- }, 8, ["state"])
2385
- ])
2386
- ])
2387
- ]),
2388
- secrets: withCtx(() => [
2389
- createVNode("div", { class: "py-6" }, [
2390
- createVNode("div", { class: "flex items-center justify-between mb-6" }, [
2391
- createVNode("div", null, [
2392
- createVNode("h3", { class: "text-lg font-semibold" }, " Secrets "),
2393
- createVNode("p", { class: "text-sm text-dimmed" }, " Encrypted key-value store for skills and integrations. ")
2394
- ]),
2395
- createVNode(_component_UButton, {
2396
- icon: "i-lucide-plus",
2397
- onClick: openCreateSecret
2398
- }, {
2399
- default: withCtx(() => [
2400
- createTextVNode(" Add Secret ")
2401
- ]),
2402
- _: 1
2403
- })
2404
- ]),
2405
- createVNode(_component_UTable, {
2406
- columns: secretColumns,
2407
- data: unref(secretsData),
2408
- loading: unref(secretsLoading)
2409
- }, {
2410
- "key-cell": withCtx(({ row }) => [
2411
- createVNode("code", { class: "text-sm bg-elevated px-2 py-0.5 rounded" }, toDisplayString(row.original.key), 1)
2412
- ]),
2413
- "description-cell": withCtx(({ row }) => [
2414
- createVNode("span", { class: "text-dimmed" }, toDisplayString(row.original.description || "—"), 1)
2415
- ]),
2416
- "updatedAt-cell": withCtx(({ row }) => [
2417
- createVNode("span", { class: "text-dimmed text-sm" }, toDisplayString(formatDate(row.original.updatedAt)), 1)
2418
- ]),
2419
- "actions-cell": withCtx(({ row }) => [
2420
- createVNode("div", { class: "flex gap-2 justify-end" }, [
2421
- createVNode(_component_UButton, {
2422
- variant: "ghost",
2423
- icon: "i-lucide-pencil",
2424
- size: "xs",
2425
- onClick: ($event) => openEditSecret(row.original)
2426
- }, null, 8, ["onClick"]),
2427
- createVNode(_component_UButton, {
2428
- variant: "ghost",
2429
- color: "error",
2430
- icon: "i-lucide-trash-2",
2431
- size: "xs",
2432
- onClick: ($event) => confirmDeleteSecret(row.original)
2433
- }, null, 8, ["onClick"])
2434
- ])
2435
- ]),
2436
- empty: withCtx(() => [
2437
- createVNode("div", { class: "py-12 text-center" }, [
2438
- createVNode(_component_UIcon, {
2439
- name: "i-lucide-key",
2440
- class: "size-12 mx-auto mb-4 text-dimmed"
2441
- }),
2442
- createVNode("p", { class: "text-dimmed" }, " No secrets yet. Add one to get started. ")
2443
- ])
2444
- ]),
2445
- _: 1
2446
- }, 8, ["data", "loading"])
2447
- ])
2448
- ]),
2449
- integrations: withCtx(() => [
2450
- createVNode("div", { class: "py-6" }, [
2451
- createVNode("div", { class: "flex items-center justify-between mb-6" }, [
2452
- createVNode("div", null, [
2453
- createVNode("h3", { class: "text-lg font-semibold" }, " Integrations "),
2454
- createVNode("p", { class: "text-sm text-dimmed" }, " Connect external platforms to the message bridge. ")
2455
- ]),
2456
- createVNode(_component_UButton, {
2457
- icon: "i-lucide-plus",
2458
- onClick: openCreateBridge
2459
- }, {
2460
- default: withCtx(() => [
2461
- createTextVNode(" Add Integration ")
2462
- ]),
2463
- _: 1
2464
- })
2465
- ]),
2466
- unref(bridgesLoading) ? (openBlock(), createBlock("div", {
2467
- key: 0,
2468
- class: "space-y-3"
2469
- }, [
2470
- (openBlock(), createBlock(Fragment, null, renderList(3, (i) => {
2471
- return createVNode(_component_USkeleton, {
2472
- key: i,
2473
- class: "h-16 w-full"
2474
- });
2475
- }), 64))
2476
- ])) : unref(bridgesData).length === 0 ? (openBlock(), createBlock("div", {
2477
- key: 1,
2478
- class: "py-12 text-center"
2479
- }, [
2480
- createVNode(_component_UIcon, {
2481
- name: "i-lucide-plug",
2482
- class: "size-12 mx-auto mb-4 text-dimmed"
2483
- }),
2484
- createVNode("p", { class: "text-dimmed" }, " No integrations configured. "),
2485
- createVNode("p", { class: "text-sm text-dimmed mt-1" }, " Connect Telegram, Discord, iMessage, or Google Suite. ")
2486
- ])) : (openBlock(), createBlock("div", {
2487
- key: 2,
2488
- class: "space-y-3"
2489
- }, [
2490
- (openBlock(true), createBlock(Fragment, null, renderList(unref(bridgesData), (bridge) => {
2491
- return openBlock(), createBlock("div", {
2492
- key: bridge.id,
2493
- class: "border border-default rounded-lg px-4 py-3 cursor-pointer hover:bg-elevated/50 transition-colors",
2494
- onClick: ($event) => openBridgeConfig(bridge)
2495
- }, [
2496
- createVNode("div", { class: "flex items-center justify-between" }, [
2497
- createVNode("div", { class: "flex items-center gap-3" }, [
2498
- createVNode(_component_UIcon, {
2499
- name: platformOptions.find((p) => p.value === bridge.platform)?.icon || "i-lucide-plug",
2500
- class: "size-5 text-dimmed"
2501
- }, null, 8, ["name"]),
2502
- createVNode("div", null, [
2503
- createVNode("span", { class: "font-medium" }, toDisplayString(bridge.name), 1),
2504
- createVNode("span", { class: "text-sm text-dimmed ml-2" }, toDisplayString(platformOptions.find((p) => p.value === bridge.platform)?.label), 1)
2505
- ])
2506
- ]),
2507
- createVNode("div", { class: "flex items-center gap-3" }, [
2508
- createVNode("span", {
2509
- class: ["text-xs capitalize", healthColors[bridge.healthStatus] || "text-dimmed"]
2510
- }, toDisplayString(bridge.healthStatus), 3),
2511
- createVNode(_component_USwitch, {
2512
- "model-value": bridge.enabled,
2513
- onClick: withModifiers(() => {
2514
- }, ["stop"]),
2515
- "onUpdate:modelValue": ($event) => toggleBridge(bridge)
2516
- }, null, 8, ["model-value", "onClick", "onUpdate:modelValue"]),
2517
- createVNode(_component_UButton, {
2518
- variant: "ghost",
2519
- color: "error",
2520
- icon: "i-lucide-trash-2",
2521
- size: "xs",
2522
- onClick: withModifiers(($event) => confirmDeleteBridge(bridge), ["stop"])
2523
- }, null, 8, ["onClick"])
2524
- ])
2525
- ]),
2526
- bridge.healthMessage ? (openBlock(), createBlock("p", {
2527
- key: 0,
2528
- class: "text-xs text-dimmed mt-1 pl-8"
2529
- }, toDisplayString(bridge.healthMessage), 1)) : createCommentVNode("", true)
2530
- ], 8, ["onClick"]);
2531
- }), 128))
2532
- ]))
2533
- ])
2534
- ]),
2535
- app: withCtx(() => [
2536
- createVNode("div", { class: "max-w-2xl mx-auto py-6" }, [
2537
- createVNode("div", { class: "mb-8" }, [
2538
- createVNode("h3", { class: "text-lg font-semibold mb-1" }, " Public URL "),
2539
- createVNode("p", { class: "text-sm text-dimmed mb-4" }, " The publicly accessible URL for this instance. Used for Telegram webhooks, auth callbacks, and other integrations that need to reach your server. "),
2540
- createVNode("div", { class: "flex gap-2" }, [
2541
- createVNode(_component_UInput, {
2542
- modelValue: unref(appUrl),
2543
- "onUpdate:modelValue": ($event) => isRef(appUrl) ? appUrl.value = $event : null,
2544
- placeholder: "https://example.com",
2545
- class: "flex-1"
2546
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2547
- createVNode(_component_UButton, {
2548
- loading: unref(appUrlSaving),
2549
- onClick: saveAppUrl
2550
- }, {
2551
- default: withCtx(() => [
2552
- createTextVNode(" Save ")
2553
- ]),
2554
- _: 1
2555
- }, 8, ["loading"])
2556
- ]),
2557
- createVNode("p", { class: "text-xs text-dimmed mt-2" }, " Leave empty to use long-polling for Telegram instead of webhooks. Changes require restarting running integrations. ")
2558
- ]),
2559
- createVNode(_component_USeparator, { class: "mb-8" }),
2560
- createVNode("div", { class: "mb-6" }, [
2561
- createVNode("h3", { class: "text-lg font-semibold mb-1" }, " Notification Preferences "),
2562
- createVNode("p", { class: "text-sm text-dimmed" }, " Choose which resource changes show toast notifications. ")
2563
- ]),
2564
- unref(notifLoading) ? (openBlock(), createBlock("div", {
2565
- key: 0,
2566
- class: "space-y-3"
2567
- }, [
2568
- (openBlock(), createBlock(Fragment, null, renderList(5, (i) => {
2569
- return createVNode(_component_USkeleton, {
2570
- key: i,
2571
- class: "h-12 w-full"
2572
- });
2573
- }), 64))
2574
- ])) : (openBlock(), createBlock("div", {
2575
- key: 1,
2576
- class: "space-y-2"
2577
- }, [
2578
- (openBlock(), createBlock(Fragment, null, renderList(resourceConfig, (rc) => {
2579
- return createVNode("div", {
2580
- key: rc.key,
2581
- class: "border border-default rounded-lg"
2582
- }, [
2583
- createVNode("div", { class: "flex items-center justify-between px-4 py-3" }, [
2584
- createVNode("div", { class: "flex items-center gap-3" }, [
2585
- createVNode(_component_UButton, {
2586
- variant: "ghost",
2587
- size: "xs",
2588
- icon: unref(expandedResources).has(rc.key) ? "i-lucide-chevron-down" : "i-lucide-chevron-right",
2589
- onClick: ($event) => toggleResourceExpand(rc.key)
2590
- }, null, 8, ["icon", "onClick"]),
2591
- createVNode(_component_UIcon, {
2592
- name: rc.icon,
2593
- class: "size-5 text-dimmed"
2594
- }, null, 8, ["name"]),
2595
- createVNode("span", { class: "font-medium" }, toDisplayString(rc.label), 1)
2596
- ]),
2597
- createVNode(_component_USwitch, {
2598
- "model-value": unref(notifPrefs)[rc.key]?.enabled ?? false,
2599
- "onUpdate:modelValue": (v) => setResourceEnabled(rc.key, v)
2600
- }, null, 8, ["model-value", "onUpdate:modelValue"])
2601
- ]),
2602
- unref(expandedResources).has(rc.key) && unref(notifPrefs)[rc.key]?.enabled ? (openBlock(), createBlock("div", {
2603
- key: 0,
2604
- class: "border-t border-default px-4 py-3 space-y-2 bg-elevated/50"
2605
- }, [
2606
- (openBlock(true), createBlock(Fragment, null, renderList(rc.subtypes, (subtype) => {
2607
- return openBlock(), createBlock("div", {
2608
- key: subtype,
2609
- class: "flex items-center justify-between pl-11"
2610
- }, [
2611
- createVNode("span", { class: "text-sm text-dimmed capitalize" }, toDisplayString(subtype), 1),
2612
- createVNode(_component_USwitch, {
2613
- "model-value": unref(notifPrefs)[rc.key]?.subtypes?.[subtype] !== false,
2614
- size: "sm",
2615
- "onUpdate:modelValue": (v) => setSubtypeEnabled(rc.key, subtype, v)
2616
- }, null, 8, ["model-value", "onUpdate:modelValue"])
2617
- ]);
2618
- }), 128))
2619
- ])) : createCommentVNode("", true)
2620
- ]);
2621
- }), 64))
2622
- ])),
2623
- createVNode("div", { class: "mt-6" }, [
2624
- createVNode(_component_UButton, {
2625
- loading: unref(notifSaving),
2626
- onClick: saveNotificationPrefs
2627
- }, {
2628
- default: withCtx(() => [
2629
- createTextVNode(" Save Preferences ")
2630
- ]),
2631
- _: 1
2632
- }, 8, ["loading"])
2633
- ])
2634
- ])
2635
- ]),
2636
- _: 1
2637
- })
2638
- ]),
2639
- _: 1
2640
- })
2641
- ]),
2642
- createVNode(_component_UModal, {
2643
- open: unref(secretModal),
2644
- "onUpdate:open": ($event) => isRef(secretModal) ? secretModal.value = $event : null
2645
- }, {
2646
- header: withCtx(() => [
2647
- createVNode("h3", { class: "text-lg font-semibold" }, toDisplayString(unref(editingSecret) ? "Edit Secret" : "Add Secret"), 1)
2648
- ]),
2649
- body: withCtx(() => [
2650
- createVNode(_component_UForm, {
2651
- state: unref(secretForm),
2652
- class: "space-y-4",
2653
- onSubmit: handleSecretSubmit
2654
- }, {
2655
- default: withCtx(() => [
2656
- createVNode(_component_UFormField, {
2657
- label: "Key",
2658
- name: "key",
2659
- hint: unref(editingSecret) ? "" : "SCREAMING_SNAKE_CASE"
2660
- }, {
2661
- default: withCtx(() => [
2662
- createVNode(_component_UInput, {
2663
- modelValue: unref(secretForm).key,
2664
- "onUpdate:modelValue": ($event) => unref(secretForm).key = $event,
2665
- disabled: !!unref(editingSecret),
2666
- placeholder: "MY_API_KEY",
2667
- class: "w-full font-mono"
2668
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
2669
- ]),
2670
- _: 1
2671
- }, 8, ["hint"]),
2672
- createVNode(_component_UFormField, {
2673
- label: "Value",
2674
- name: "value",
2675
- hint: unref(editingSecret) ? "Leave empty to keep current value" : ""
2676
- }, {
2677
- default: withCtx(() => [
2678
- createVNode(_component_UInput, {
2679
- modelValue: unref(secretForm).value,
2680
- "onUpdate:modelValue": ($event) => unref(secretForm).value = $event,
2681
- type: "password",
2682
- placeholder: unref(editingSecret) ? "••••••••" : "Secret value",
2683
- class: "w-full"
2684
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
2685
- ]),
2686
- _: 1
2687
- }, 8, ["hint"]),
2688
- createVNode(_component_UFormField, {
2689
- label: "Description",
2690
- name: "description"
2691
- }, {
2692
- default: withCtx(() => [
2693
- createVNode(_component_UInput, {
2694
- modelValue: unref(secretForm).description,
2695
- "onUpdate:modelValue": ($event) => unref(secretForm).description = $event,
2696
- placeholder: "Optional description",
2697
- class: "w-full"
2698
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2699
- ]),
2700
- _: 1
2701
- }),
2702
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
2703
- createVNode(_component_UButton, {
2704
- variant: "ghost",
2705
- onClick: ($event) => secretModal.value = false
2706
- }, {
2707
- default: withCtx(() => [
2708
- createTextVNode(" Cancel ")
2709
- ]),
2710
- _: 1
2711
- }, 8, ["onClick"]),
2712
- createVNode(_component_UButton, {
2713
- type: "submit",
2714
- loading: unref(secretSaving)
2715
- }, {
2716
- default: withCtx(() => [
2717
- createTextVNode(toDisplayString(unref(editingSecret) ? "Update" : "Create"), 1)
2718
- ]),
2719
- _: 1
2720
- }, 8, ["loading"])
2721
- ])
2722
- ]),
2723
- _: 1
2724
- }, 8, ["state"])
2725
- ]),
2726
- _: 1
2727
- }, 8, ["open", "onUpdate:open"]),
2728
- createVNode(_component_UModal, {
2729
- open: unref(secretDeleteConfirm),
2730
- "onUpdate:open": ($event) => isRef(secretDeleteConfirm) ? secretDeleteConfirm.value = $event : null
2731
- }, {
2732
- header: withCtx(() => [
2733
- createVNode("h3", { class: "text-lg font-semibold" }, " Delete Secret ")
2734
- ]),
2735
- body: withCtx(() => [
2736
- createVNode("p", { class: "mb-4" }, [
2737
- createTextVNode(" Are you sure you want to delete "),
2738
- createVNode("code", { class: "bg-elevated px-2 py-0.5 rounded" }, toDisplayString(unref(secretToDelete)?.key), 1),
2739
- createTextVNode("? ")
2740
- ]),
2741
- createVNode("p", { class: "text-sm text-dimmed" }, " This action cannot be undone. Any skills using this secret will stop working. "),
2742
- createVNode("div", { class: "flex justify-end gap-2 pt-6" }, [
2743
- createVNode(_component_UButton, {
2744
- variant: "ghost",
2745
- onClick: ($event) => secretDeleteConfirm.value = false
2746
- }, {
2747
- default: withCtx(() => [
2748
- createTextVNode(" Cancel ")
2749
- ]),
2750
- _: 1
2751
- }, 8, ["onClick"]),
2752
- createVNode(_component_UButton, {
2753
- color: "error",
2754
- onClick: handleDeleteSecret
2755
- }, {
2756
- default: withCtx(() => [
2757
- createTextVNode(" Delete ")
2758
- ]),
2759
- _: 1
2760
- })
2761
- ])
2762
- ]),
2763
- _: 1
2764
- }, 8, ["open", "onUpdate:open"]),
2765
- createVNode(_component_UModal, {
2766
- open: unref(bridgeModal),
2767
- "onUpdate:open": ($event) => isRef(bridgeModal) ? bridgeModal.value = $event : null
2768
- }, {
2769
- header: withCtx(() => [
2770
- createVNode("h3", { class: "text-lg font-semibold" }, " Add Integration ")
2771
- ]),
2772
- body: withCtx(() => [
2773
- createVNode("div", { class: "space-y-4" }, [
2774
- createVNode(_component_UFormField, {
2775
- label: "Platform",
2776
- name: "platform"
2777
- }, {
2778
- default: withCtx(() => [
2779
- createVNode(_component_USelect, {
2780
- modelValue: unref(bridgeForm).platform,
2781
- "onUpdate:modelValue": ($event) => unref(bridgeForm).platform = $event,
2782
- items: platformOptions,
2783
- "value-key": "value",
2784
- class: "w-full"
2785
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2786
- ]),
2787
- _: 1
2788
- }),
2789
- getMissingSecrets(unref(bridgeForm).platform).length ? (openBlock(), createBlock("div", {
2790
- key: 0,
2791
- class: "flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"
2792
- }, [
2793
- createVNode(_component_UIcon, {
2794
- name: "i-lucide-alert-triangle",
2795
- class: "size-4 mt-0.5 text-error shrink-0"
2796
- }),
2797
- createVNode("div", null, [
2798
- createVNode("p", { class: "font-medium text-error" }, " Missing required secrets "),
2799
- createVNode("p", { class: "text-dimmed mt-1" }, " Add the following in Settings → Secrets before creating: "),
2800
- createVNode("ul", { class: "mt-1 space-y-0.5" }, [
2801
- (openBlock(true), createBlock(Fragment, null, renderList(getMissingSecrets(unref(bridgeForm).platform), (key) => {
2802
- return openBlock(), createBlock("li", { key }, [
2803
- createVNode("code", { class: "text-xs bg-elevated px-1.5 py-0.5 rounded" }, toDisplayString(key), 1)
2804
- ]);
2805
- }), 128))
2806
- ])
2807
- ])
2808
- ])) : createCommentVNode("", true),
2809
- createVNode(_component_UFormField, {
2810
- label: "Name",
2811
- name: "name"
2812
- }, {
2813
- default: withCtx(() => [
2814
- createVNode(_component_UInput, {
2815
- modelValue: unref(bridgeForm).name,
2816
- "onUpdate:modelValue": ($event) => unref(bridgeForm).name = $event,
2817
- placeholder: platformNamePlaceholders[unref(bridgeForm).platform],
2818
- class: "w-full"
2819
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
2820
- ]),
2821
- _: 1
2822
- }),
2823
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
2824
- createVNode(_component_UButton, {
2825
- variant: "ghost",
2826
- onClick: ($event) => bridgeModal.value = false
2827
- }, {
2828
- default: withCtx(() => [
2829
- createTextVNode(" Cancel ")
2830
- ]),
2831
- _: 1
2832
- }, 8, ["onClick"]),
2833
- createVNode(_component_UButton, {
2834
- loading: unref(bridgeSaving),
2835
- disabled: getMissingSecrets(unref(bridgeForm).platform).length > 0,
2836
- onClick: handleBridgeCreate
2837
- }, {
2838
- default: withCtx(() => [
2839
- createTextVNode(" Create ")
2840
- ]),
2841
- _: 1
2842
- }, 8, ["loading", "disabled"])
2843
- ])
2844
- ])
2845
- ]),
2846
- _: 1
2847
- }, 8, ["open", "onUpdate:open"]),
2848
- createVNode(_component_UModal, {
2849
- open: unref(bridgeDeleteConfirm),
2850
- "onUpdate:open": ($event) => isRef(bridgeDeleteConfirm) ? bridgeDeleteConfirm.value = $event : null
2851
- }, {
2852
- header: withCtx(() => [
2853
- createVNode("h3", { class: "text-lg font-semibold" }, " Delete Integration ")
2854
- ]),
2855
- body: withCtx(() => [
2856
- createVNode("p", { class: "mb-4" }, [
2857
- createTextVNode(" Are you sure you want to delete "),
2858
- createVNode("strong", null, toDisplayString(unref(bridgeToDelete)?.name), 1),
2859
- createTextVNode("? ")
2860
- ]),
2861
- createVNode("p", { class: "text-sm text-dimmed" }, " This will remove the integration and all associated message history. "),
2862
- createVNode("div", { class: "flex justify-end gap-2 pt-6" }, [
2863
- createVNode(_component_UButton, {
2864
- variant: "ghost",
2865
- onClick: ($event) => bridgeDeleteConfirm.value = false
2866
- }, {
2867
- default: withCtx(() => [
2868
- createTextVNode(" Cancel ")
2869
- ]),
2870
- _: 1
2871
- }, 8, ["onClick"]),
2872
- createVNode(_component_UButton, {
2873
- color: "error",
2874
- onClick: handleDeleteBridge
2875
- }, {
2876
- default: withCtx(() => [
2877
- createTextVNode(" Delete ")
2878
- ]),
2879
- _: 1
2880
- })
2881
- ])
2882
- ]),
2883
- _: 1
2884
- }, 8, ["open", "onUpdate:open"]),
2885
- createVNode(_component_UModal, {
2886
- open: unref(bridgeConfigModal),
2887
- "onUpdate:open": ($event) => isRef(bridgeConfigModal) ? bridgeConfigModal.value = $event : null
2888
- }, {
2889
- header: withCtx(() => [
2890
- createVNode("div", { class: "flex items-center gap-2" }, [
2891
- createVNode(_component_UIcon, {
2892
- name: platformOptions.find((p) => p.value === unref(editingBridge)?.platform)?.icon || "i-lucide-plug",
2893
- class: "size-5"
2894
- }, null, 8, ["name"]),
2895
- createVNode("h3", { class: "text-lg font-semibold" }, " Configure " + toDisplayString(unref(editingBridge)?.name), 1)
2896
- ])
2897
- ]),
2898
- body: withCtx(() => [
2899
- createVNode("div", { class: "space-y-4" }, [
2900
- unref(editingBridge) && platformRequiredSecrets[unref(editingBridge).platform].length ? (openBlock(), createBlock("div", {
2901
- key: 0,
2902
- class: "flex items-start gap-2 rounded-lg bg-elevated p-3 text-sm"
2903
- }, [
2904
- createVNode(_component_UIcon, {
2905
- name: "i-lucide-info",
2906
- class: "size-4 mt-0.5 text-dimmed shrink-0"
2907
- }),
2908
- createVNode("span", { class: "text-dimmed" }, [
2909
- createTextVNode(" Requires "),
2910
- (openBlock(true), createBlock(Fragment, null, renderList(platformRequiredSecrets[unref(editingBridge).platform], (key, i) => {
2911
- return openBlock(), createBlock(Fragment, { key }, [
2912
- createVNode("code", { class: "bg-elevated px-1 py-0.5 rounded text-xs" }, toDisplayString(key), 1),
2913
- i < platformRequiredSecrets[unref(editingBridge).platform].length - 1 ? (openBlock(), createBlock(Fragment, { key: 0 }, [
2914
- createTextVNode(", ")
2915
- ], 64)) : createCommentVNode("", true)
2916
- ], 64);
2917
- }), 128)),
2918
- createTextVNode(" in the Secrets tab. ")
2919
- ])
2920
- ])) : createCommentVNode("", true),
2921
- createVNode(_component_UFormField, {
2922
- label: "Name",
2923
- name: "name"
2924
- }, {
2925
- default: withCtx(() => [
2926
- createVNode(_component_UInput, {
2927
- modelValue: unref(bridgeConfigForm).name,
2928
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).name = $event,
2929
- placeholder: "Integration name",
2930
- class: "w-full"
2931
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2932
- ]),
2933
- _: 1
2934
- }),
2935
- unref(editingBridge)?.platform === "telegram" ? (openBlock(), createBlock(Fragment, { key: 1 }, [
2936
- createVNode(_component_UFormField, {
2937
- label: "Bot Username",
2938
- name: "botUsername",
2939
- hint: "Without the @ prefix"
2940
- }, {
2941
- default: withCtx(() => [
2942
- createVNode(_component_UInput, {
2943
- modelValue: unref(bridgeConfigForm).botUsername,
2944
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).botUsername = $event,
2945
- placeholder: "my_bot",
2946
- class: "w-full"
2947
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2948
- ]),
2949
- _: 1
2950
- }),
2951
- createVNode(_component_UFormField, {
2952
- label: "Allowed Chat IDs",
2953
- name: "allowedChatIds",
2954
- hint: "Comma-separated. Leave empty for all."
2955
- }, {
2956
- default: withCtx(() => [
2957
- createVNode(_component_UInput, {
2958
- modelValue: unref(bridgeConfigForm).allowedChatIds,
2959
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedChatIds = $event,
2960
- placeholder: "123456, -100789",
2961
- class: "w-full"
2962
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2963
- ]),
2964
- _: 1
2965
- })
2966
- ], 64)) : createCommentVNode("", true),
2967
- unref(editingBridge)?.platform === "discord" ? (openBlock(), createBlock(Fragment, { key: 2 }, [
2968
- createVNode(_component_UFormField, {
2969
- label: "Listen Mode",
2970
- name: "listenMode"
2971
- }, {
2972
- default: withCtx(() => [
2973
- createVNode(_component_USelect, {
2974
- modelValue: unref(bridgeConfigForm).listenMode,
2975
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).listenMode = $event,
2976
- items: discordListenModeOptions,
2977
- "value-key": "value",
2978
- class: "w-full"
2979
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2980
- ]),
2981
- _: 1
2982
- }),
2983
- createVNode(_component_UFormField, {
2984
- label: "Server ID",
2985
- name: "guildId",
2986
- hint: "Optional. Limit to one server."
2987
- }, {
2988
- default: withCtx(() => [
2989
- createVNode(_component_UInput, {
2990
- modelValue: unref(bridgeConfigForm).guildId,
2991
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).guildId = $event,
2992
- placeholder: "Discord server ID",
2993
- class: "w-full"
2994
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
2995
- ]),
2996
- _: 1
2997
- }),
2998
- createVNode(_component_UFormField, {
2999
- label: "Channel ID",
3000
- name: "channelId",
3001
- hint: "Optional. Limit to one channel (for 'all' mode)."
3002
- }, {
3003
- default: withCtx(() => [
3004
- createVNode(_component_UInput, {
3005
- modelValue: unref(bridgeConfigForm).channelId,
3006
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).channelId = $event,
3007
- placeholder: "Discord channel ID",
3008
- class: "w-full"
3009
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3010
- ]),
3011
- _: 1
3012
- })
3013
- ], 64)) : createCommentVNode("", true),
3014
- unref(editingBridge)?.platform === "imessage" ? (openBlock(), createBlock(Fragment, { key: 3 }, [
3015
- createVNode(_component_UFormField, {
3016
- label: "Strategy",
3017
- name: "strategy"
3018
- }, {
3019
- default: withCtx(() => [
3020
- createVNode(_component_USelect, {
3021
- modelValue: unref(bridgeConfigForm).strategy,
3022
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).strategy = $event,
3023
- items: imessageStrategyOptions,
3024
- "value-key": "value",
3025
- class: "w-full"
3026
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3027
- ]),
3028
- _: 1
3029
- }),
3030
- unref(bridgeConfigForm).strategy === "bluebubbles" && !unref(secretsData).some((s) => s.key === "BLUEBUBBLES_PASSWORD") ? (openBlock(), createBlock("div", {
3031
- key: 0,
3032
- class: "flex items-start gap-2 rounded-lg bg-error/10 border border-error/20 p-3 text-sm"
3033
- }, [
3034
- createVNode(_component_UIcon, {
3035
- name: "i-lucide-alert-triangle",
3036
- class: "size-4 mt-0.5 text-error shrink-0"
3037
- }),
3038
- createVNode("span", { class: "text-dimmed" }, [
3039
- createTextVNode(" BlueBubbles requires secret "),
3040
- createVNode("code", { class: "text-xs bg-elevated px-1.5 py-0.5 rounded" }, "BLUEBUBBLES_PASSWORD"),
3041
- createTextVNode(" in the Secrets tab. ")
3042
- ])
3043
- ])) : createCommentVNode("", true),
3044
- unref(bridgeConfigForm).strategy === "bluebubbles" ? (openBlock(), createBlock(_component_UFormField, {
3045
- key: 1,
3046
- label: "BlueBubbles URL",
3047
- name: "blueBubblesUrl"
3048
- }, {
3049
- default: withCtx(() => [
3050
- createVNode(_component_UInput, {
3051
- modelValue: unref(bridgeConfigForm).blueBubblesUrl,
3052
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).blueBubblesUrl = $event,
3053
- placeholder: "http://192.168.1.100:1234",
3054
- class: "w-full"
3055
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3056
- ]),
3057
- _: 1
3058
- })) : createCommentVNode("", true),
3059
- createVNode(_component_UFormField, {
3060
- label: "Allowed Numbers",
3061
- name: "allowedNumbers",
3062
- hint: "Comma-separated. Leave empty for all."
3063
- }, {
3064
- default: withCtx(() => [
3065
- createVNode(_component_UInput, {
3066
- modelValue: unref(bridgeConfigForm).allowedNumbers,
3067
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).allowedNumbers = $event,
3068
- placeholder: "+15551234567, +15559876543",
3069
- class: "w-full"
3070
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3071
- ]),
3072
- _: 1
3073
- })
3074
- ], 64)) : createCommentVNode("", true),
3075
- unref(editingBridge)?.platform === "google" ? (openBlock(), createBlock(Fragment, { key: 4 }, [
3076
- createVNode(_component_UFormField, {
3077
- label: "Enabled Services",
3078
- name: "enabledServices"
3079
- }, {
3080
- default: withCtx(() => [
3081
- createVNode("div", { class: "space-y-2" }, [
3082
- (openBlock(), createBlock(Fragment, null, renderList(googleServiceOptions, (svc) => {
3083
- return createVNode("label", {
3084
- key: svc.value,
3085
- class: "flex items-center gap-2 cursor-pointer"
3086
- }, [
3087
- createVNode("input", {
3088
- type: "checkbox",
3089
- checked: unref(bridgeConfigForm).enabledServices.includes(svc.value),
3090
- class: "rounded",
3091
- onChange: ($event) => unref(bridgeConfigForm).enabledServices.includes(svc.value) ? unref(bridgeConfigForm).enabledServices = unref(bridgeConfigForm).enabledServices.filter((s) => s !== svc.value) : unref(bridgeConfigForm).enabledServices.push(svc.value)
3092
- }, null, 40, ["checked", "onChange"]),
3093
- createVNode("span", { class: "text-sm" }, toDisplayString(svc.label), 1)
3094
- ]);
3095
- }), 64))
3096
- ])
3097
- ]),
3098
- _: 1
3099
- }),
3100
- createVNode(_component_UFormField, {
3101
- label: "Google Account",
3102
- name: "account",
3103
- hint: "Email used with gogcli"
3104
- }, {
3105
- default: withCtx(() => [
3106
- createVNode(_component_UInput, {
3107
- modelValue: unref(bridgeConfigForm).account,
3108
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).account = $event,
3109
- placeholder: "user@gmail.com",
3110
- class: "w-full"
3111
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3112
- ]),
3113
- _: 1
3114
- })
3115
- ], 64)) : createCommentVNode("", true),
3116
- unref(editingBridge)?.platform === "email" ? (openBlock(), createBlock(Fragment, { key: 5 }, [
3117
- createVNode(_component_UFormField, {
3118
- label: "Email Address",
3119
- name: "emailAddress"
3120
- }, {
3121
- default: withCtx(() => [
3122
- createVNode(_component_UInput, {
3123
- modelValue: unref(bridgeConfigForm).emailAddress,
3124
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).emailAddress = $event,
3125
- placeholder: "user@example.com",
3126
- class: "w-full"
3127
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3128
- ]),
3129
- _: 1
3130
- }),
3131
- createVNode("div", { class: "grid grid-cols-2 gap-4" }, [
3132
- createVNode(_component_UFormField, {
3133
- label: "IMAP Host",
3134
- name: "imapHost"
3135
- }, {
3136
- default: withCtx(() => [
3137
- createVNode(_component_UInput, {
3138
- modelValue: unref(bridgeConfigForm).imapHost,
3139
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapHost = $event,
3140
- placeholder: "imap.example.com",
3141
- class: "w-full"
3142
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3143
- ]),
3144
- _: 1
3145
- }),
3146
- createVNode(_component_UFormField, {
3147
- label: "IMAP Port",
3148
- name: "imapPort"
3149
- }, {
3150
- default: withCtx(() => [
3151
- createVNode(_component_UInput, {
3152
- modelValue: unref(bridgeConfigForm).imapPort,
3153
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).imapPort = $event,
3154
- placeholder: "993",
3155
- class: "w-full"
3156
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3157
- ]),
3158
- _: 1
3159
- })
3160
- ]),
3161
- createVNode("div", { class: "grid grid-cols-2 gap-4" }, [
3162
- createVNode(_component_UFormField, {
3163
- label: "SMTP Host",
3164
- name: "smtpHost"
3165
- }, {
3166
- default: withCtx(() => [
3167
- createVNode(_component_UInput, {
3168
- modelValue: unref(bridgeConfigForm).smtpHost,
3169
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpHost = $event,
3170
- placeholder: "smtp.example.com",
3171
- class: "w-full"
3172
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3173
- ]),
3174
- _: 1
3175
- }),
3176
- createVNode(_component_UFormField, {
3177
- label: "SMTP Port",
3178
- name: "smtpPort"
3179
- }, {
3180
- default: withCtx(() => [
3181
- createVNode(_component_UInput, {
3182
- modelValue: unref(bridgeConfigForm).smtpPort,
3183
- "onUpdate:modelValue": ($event) => unref(bridgeConfigForm).smtpPort = $event,
3184
- placeholder: "587",
3185
- class: "w-full"
3186
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
3187
- ]),
3188
- _: 1
3189
- })
3190
- ])
3191
- ], 64)) : createCommentVNode("", true),
3192
- createVNode("div", { class: "flex justify-end gap-2 pt-4" }, [
3193
- createVNode(_component_UButton, {
3194
- variant: "ghost",
3195
- onClick: ($event) => bridgeConfigModal.value = false
3196
- }, {
3197
- default: withCtx(() => [
3198
- createTextVNode(" Cancel ")
3199
- ]),
3200
- _: 1
3201
- }, 8, ["onClick"]),
3202
- createVNode(_component_UButton, {
3203
- loading: unref(bridgeConfigSaving),
3204
- onClick: handleBridgeConfigSave
3205
- }, {
3206
- default: withCtx(() => [
3207
- createTextVNode(" Save ")
3208
- ]),
3209
- _: 1
3210
- }, 8, ["loading"])
3211
- ])
3212
- ])
3213
- ]),
3214
- _: 1
3215
- }, 8, ["open", "onUpdate:open"])
3216
- ];
3217
- }
3218
- }),
3219
- _: 1
3220
- }, _parent));
3221
- };
3222
- }
3223
- });
3224
- const _sfc_setup = _sfc_main.setup;
3225
- _sfc_main.setup = (props, ctx) => {
3226
- const ssrContext = useSSRContext();
3227
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/settings.vue");
3228
- return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
3229
- };
3230
-
3231
- export { _sfc_main as default };
3232
- //# sourceMappingURL=settings-B2KXoGcz.mjs.map