tide-commander 1.48.0 → 1.50.0

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 (64) hide show
  1. package/dist/assets/{BossLogsModal-CFwfed1-.js → BossLogsModal-CbVtNqZR.js} +1 -1
  2. package/dist/assets/{BossSpawnModal-DUQ6HEgW.js → BossSpawnModal-eoaFlFcC.js} +1 -1
  3. package/dist/assets/{ControlsModal-BU8Ip7nq.js → ControlsModal-fmL85NR8.js} +1 -1
  4. package/dist/assets/{DockerLogsModal-CbYYg1sc.js → DockerLogsModal-D4v-u6a1.js} +1 -1
  5. package/dist/assets/{EmbeddedEditor-C_REDOwe.js → EmbeddedEditor-f5oIv8Sg.js} +1 -1
  6. package/dist/assets/GmailOAuthSetup-7xFQPZTB.js +388 -0
  7. package/dist/assets/GoogleOAuthSetup-D7bAPahq.js +236 -0
  8. package/dist/assets/{IframeModal-Ca7ZWrHU.js → IframeModal-YZvkzpi7.js} +1 -1
  9. package/dist/assets/IntegrationsPanel-CmLz3I5O.js +2 -0
  10. package/dist/assets/{LogViewerModal-DnCVSAMs.js → LogViewerModal-B9sPZbdW.js} +1 -1
  11. package/dist/assets/{MonitoringModal-Cu8Kz_D_.js → MonitoringModal-BnG6M7y4.js} +1 -1
  12. package/dist/assets/{PM2LogsModal-DTBPwViK.js → PM2LogsModal-B2UQdPQY.js} +1 -1
  13. package/dist/assets/{RestoreArchivedAreaModal-C7ym_R1q.js → RestoreArchivedAreaModal-DD-umVlm.js} +1 -1
  14. package/dist/assets/{SaveSnapshotModal-Byqak-Tf.js → SaveSnapshotModal-DOvqh5Mu.js} +1 -1
  15. package/dist/assets/{Scene2DCanvas-Bzggyv_C.js → Scene2DCanvas-Cpg_qGAh.js} +1 -1
  16. package/dist/assets/{SceneManager-CzgjrwbM.js → SceneManager-Nq7wNwjO.js} +5 -5
  17. package/dist/assets/{SkillsPanel-Djr7DSvf.js → SkillsPanel-cQdGPcus.js} +1 -1
  18. package/dist/assets/{SnapshotManager-BfGQUnsS.js → SnapshotManager-CIq5XCs9.js} +1 -1
  19. package/dist/assets/{SpawnModal-BbKpL82w.js → SpawnModal-q-0a01z4.js} +1 -1
  20. package/dist/assets/{SubordinateAssignmentModal-B1TZX27W.js → SubordinateAssignmentModal-BRgxJHP4.js} +1 -1
  21. package/dist/assets/{SupervisorPanel-PK5vEWzs.js → SupervisorPanel-eX5594-E.js} +1 -1
  22. package/dist/assets/{TriggerManagerPanel-DVK-bbLW.js → TriggerManagerPanel-D_UwwiQX.js} +1 -1
  23. package/dist/assets/{WorkflowEditorPanel-Brdqd-Ad.js → WorkflowEditorPanel-B3hJgts3.js} +1 -1
  24. package/dist/assets/{index-BP3hr2mC.js → index-6hDRRspf.js} +1 -1
  25. package/dist/assets/{index-wIjtXnz9.js → index-BlFJUFxa.js} +1 -1
  26. package/dist/assets/{index-BExjQf95.js → index-DOS1uYLp.js} +1 -1
  27. package/dist/assets/{index-RJgcrQXD.js → index-DacHHD58.js} +1 -1
  28. package/dist/assets/{index-BF9QVox6.js → index-DtGnI5UT.js} +3 -3
  29. package/dist/assets/{index-BgUdbPaM.js → index-DzPsZP6x.js} +1 -1
  30. package/dist/assets/{index--5OtsLD2.js → index-ZjWej2-a.js} +1 -1
  31. package/dist/assets/{index-B5tIXl_r.js → index-y44Eb12B.js} +2 -2
  32. package/dist/assets/main-BGQsJhbR.js +153 -0
  33. package/dist/assets/main-DH2iNL9j.css +1 -0
  34. package/dist/assets/{web-BN1vvWmX.js → web-CxhK2rcd.js} +1 -1
  35. package/dist/assets/{web-N6EXBTZp.js → web-LNVSFjdi.js} +1 -1
  36. package/dist/index.html +2 -2
  37. package/dist/locales/de/common.json +4 -0
  38. package/dist/locales/en/common.json +4 -0
  39. package/dist/locales/es/common.json +4 -0
  40. package/dist/locales/fr/common.json +4 -0
  41. package/dist/locales/hi/common.json +4 -0
  42. package/dist/locales/it/common.json +4 -0
  43. package/dist/locales/ja/common.json +4 -0
  44. package/dist/locales/pt/common.json +4 -0
  45. package/dist/locales/ru/common.json +4 -0
  46. package/dist/locales/zh-CN/common.json +4 -0
  47. package/dist/src/packages/server/app.js +23 -1
  48. package/dist/src/packages/server/data/builtin-skills/release-pipeline.js +8 -4
  49. package/dist/src/packages/server/data/event-queries.js +15 -0
  50. package/dist/src/packages/server/data/migrations/005_drive_actions.sql +19 -0
  51. package/dist/src/packages/server/index.js +1 -0
  52. package/dist/src/packages/server/integrations/gmail/index.js +8 -6
  53. package/dist/src/packages/server/integrations/google-drive/drive-client.js +605 -0
  54. package/dist/src/packages/server/integrations/google-drive/drive-config.js +127 -0
  55. package/dist/src/packages/server/integrations/google-drive/drive-routes.js +365 -0
  56. package/dist/src/packages/server/integrations/google-drive/drive-skill.js +248 -0
  57. package/dist/src/packages/server/integrations/google-drive/index.js +60 -0
  58. package/dist/src/packages/server/integrations/integration-registry.js +2 -0
  59. package/package.json +1 -1
  60. package/dist/assets/GmailOAuthSetup-DjgTvBxC.js +0 -270
  61. package/dist/assets/GoogleOAuthSetup-Cg9TpR8P.js +0 -203
  62. package/dist/assets/IntegrationsPanel-8a2TGZA7.js +0 -2
  63. package/dist/assets/main-3GpIvzEr.css +0 -1
  64. package/dist/assets/main-CMpDB4wb.js +0 -153
@@ -0,0 +1,388 @@
1
+ import{r as i,W as C,l as j,j as e}from"./main-BGQsJhbR.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react--Eh9ivFN.js";import"./vendor-three-Chj50gSY.js";function ne({integration:o,onSave:f,onCancel:S}){const[s,z]=i.useState(o.values.authMethod||"oauth2"),[g,R]=i.useState(o.values.clientId||""),[v,q]=i.useState(""),[m,K]=i.useState(""),[w,L]=i.useState(o.values.impersonateEmail||""),[p,I]=i.useState(String(o.values.pollingIntervalMs??3e4)),[x,E]=i.useState(o.values.defaultApprovalKeywords||"approved,aprobado,autorizado,yes,ok"),[O,M]=i.useState(null),[n,G]=i.useState(null),[c,d]=i.useState(!1),[T,t]=i.useState(null),[P,F]=i.useState(!1),[$,J]=i.useState(!1),[y,B]=i.useState(!1),[b,h]=i.useState(o.status.connected?"connected":"credentials"),N=s==="oauth2"&&o.values.clientId==="********"&&o.values.clientSecret==="********",r=i.useRef(null),_=i.useRef(o.status.connected),u=i.useCallback(async()=>{try{const a=await C(j("/api/email/status"));if(a.ok){const l=await a.json();G(l),l.authenticated&&(h("connected"),r.current&&(clearInterval(r.current),r.current=null))}}catch(a){console.error("Failed to fetch Gmail status:",a)}},[]);i.useEffect(()=>{const a=o.status.connected,l=_.current;a&&!l&&b!=="connected"?h("connected"):!a&&l&&b==="connected"&&h("credentials"),_.current=a},[o.status.connected]),i.useEffect(()=>(u(),()=>{r.current&&clearInterval(r.current)}),[u]);const D=async()=>{const a=await C(j("/api/email/auth/url"));if(!a.ok){const k=await a.json().catch(()=>({}));throw new Error(k.error||`HTTP ${a.status}`)}const l=await a.json();if(!l.url)throw new Error("OAuth URL is empty");M(l.url),t(null),h("authorize"),r.current&&clearInterval(r.current),r.current=setInterval(u,3e3)},W=async()=>{d(!0),t(null);try{await D()}catch(a){t(a instanceof Error?a.message:"Failed to get OAuth URL")}finally{d(!1)}},Y=async()=>{if(!g.trim()){t("Client ID is required");return}d(!0),t(null);try{const a={authMethod:"oauth2",pollingIntervalMs:parseInt(p)||3e4,defaultApprovalKeywords:x};g.trim()&&g.trim()!=="********"&&(a.clientId=g.trim()),v.trim()&&v.trim()!=="********"&&(a.clientSecret=v.trim()),await f(a),await D()}catch(a){const l=a instanceof Error?a.message:"Failed to get OAuth URL";t(l)}finally{d(!1)}},H=async()=>{if(!m.trim()){t("Service Account JSON is required");return}if(!w.trim()){t("Impersonate Email is required");return}try{const a=JSON.parse(m.trim());if(!a.client_email||!a.private_key){t("Service Account JSON must contain client_email and private_key");return}}catch{t("Invalid JSON in Service Account field");return}d(!0),t(null);try{await f({authMethod:"service_account",serviceAccountJson:m.trim(),impersonateEmail:w.trim(),pollingIntervalMs:parseInt(p)||3e4,defaultApprovalKeywords:x}),await new Promise(a=>setTimeout(a,1e3)),await u()}catch(a){const l=a instanceof Error?a.message:"Failed to save service account";t(l)}finally{d(!1)}},X=async()=>{F(!0),t(null);try{await f({pollingIntervalMs:parseInt(p)||3e4,defaultApprovalKeywords:x})}catch(a){t(a instanceof Error?a.message:"Failed to save settings")}finally{F(!1)}},Q=async()=>{const a=!(n!=null&&n.pollingActive);J(!0),t(null);try{const l=a?"/api/email/polling/start":"/api/email/polling/stop",k=a?{intervalMs:parseInt(p)||3e4}:{},A=await C(j(l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});if(!A.ok){const Z=await A.json().catch(()=>({}));throw new Error(Z.error||`HTTP ${A.status}`)}await u()}catch(l){t(l instanceof Error?l.message:"Failed to toggle polling")}finally{J(!1)}},V=async()=>{d(!0),t(null);try{await f({refreshToken:"",serviceAccountJson:"",impersonateEmail:""}),G(null),M(null),h("credentials"),await u()}catch(a){t(a instanceof Error?a.message:"Failed to disconnect")}finally{d(!1)}},U=!!o.values.serviceAccountJson;return e.jsxs("div",{className:"gmail-oauth-setup",children:[T&&e.jsx("div",{className:"gmail-oauth-error",children:T}),b==="credentials"&&e.jsxs("div",{className:"gmail-oauth-section",children:[e.jsxs("div",{className:"gmail-oauth-field",style:{marginBottom:24},children:[e.jsx("label",{className:"integration-field-label",children:"Authentication Method"}),e.jsxs("div",{className:"gmail-auth-method-selector",children:[e.jsxs("button",{type:"button",className:`gmail-auth-method-btn ${s==="oauth2"?"active":""}`,onClick:()=>{z("oauth2"),t(null)},children:[e.jsx("span",{className:"gmail-auth-method-icon",children:"🔑"}),e.jsx("span",{className:"gmail-auth-method-label",children:"OAuth 2.0"}),e.jsx("span",{className:"gmail-auth-method-desc",children:"Browser login flow"})]}),e.jsxs("button",{type:"button",className:`gmail-auth-method-btn ${s==="service_account"?"active":""}`,onClick:()=>{z("service_account"),t(null)},children:[e.jsx("span",{className:"gmail-auth-method-icon",children:"🤖"}),e.jsx("span",{className:"gmail-auth-method-label",children:"Service Account"}),e.jsx("span",{className:"gmail-auth-method-desc",children:"Domain-wide delegation"})]})]})]}),s==="oauth2"&&N&&!y&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"gmail-oauth-section-title",children:"Google OAuth Credentials"}),e.jsxs("div",{className:"gmail-oauth-shared-banner",children:[e.jsxs("div",{className:"gmail-oauth-shared-title",children:[e.jsx("span",{children:"✓"}),e.jsx("span",{children:"Credentials already configured"})]}),e.jsx("div",{className:"gmail-oauth-shared-body",children:"Existing Google OAuth credentials (Client ID and Secret) are saved in your secrets store — they're shared between Gmail, Calendar, and Drive. You may still need to re-authorize once so the refresh token grants Gmail access."})]})]}),s==="oauth2"&&(!N||y)&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"gmail-oauth-section-title",children:"Google OAuth Credentials"}),e.jsxs("p",{className:"gmail-oauth-help",children:["Create OAuth2 credentials in the"," ",e.jsx("a",{href:"https://console.cloud.google.com/apis/credentials",target:"_blank",rel:"noopener noreferrer",className:"gmail-oauth-link",children:"Google Cloud Console"}),". Enable the Gmail API and (optionally) the Calendar API. Set the redirect URI to:"," ",e.jsx("code",{className:"gmail-oauth-code",children:j("/api/email/auth/callback")})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsxs("label",{className:"integration-field-label",children:["OAuth Client ID ",e.jsx("span",{className:"integration-field-required",children:"*"})]}),e.jsx("input",{type:"text",className:"integration-field-input",value:g,placeholder:"xxxx.apps.googleusercontent.com",onChange:a=>R(a.target.value)})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsxs("label",{className:"integration-field-label",children:["OAuth Client Secret ",e.jsx("span",{className:"integration-field-required",children:"*"})]}),e.jsx("input",{type:"password",className:"integration-field-input",value:v,placeholder:o.values.clientSecret?"(saved)":"Enter client secret",onChange:a=>q(a.target.value),autoComplete:"off"})]})]}),s==="service_account"&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"gmail-oauth-section-title",children:"Service Account Credentials"}),e.jsxs("p",{className:"gmail-oauth-help",children:["Use a Google service account with"," ",e.jsx("a",{href:"https://admin.google.com/ac/owl/domainwidedelegation",target:"_blank",rel:"noopener noreferrer",className:"gmail-oauth-link",children:"domain-wide delegation"})," ","enabled. The service account must be authorized for Gmail scopes in Google Workspace Admin."]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsxs("label",{className:"integration-field-label",children:["Service Account JSON ",e.jsx("span",{className:"integration-field-required",children:"*"})]}),e.jsx("textarea",{className:"integration-field-input integration-field-textarea",value:m,placeholder:U?"(saved — paste new JSON to replace)":"Paste the full service account JSON key file contents",onChange:a=>K(a.target.value),rows:6,spellCheck:!1}),e.jsx("span",{className:"integration-field-description",children:"The JSON key file downloaded from Google Cloud Console containing client_email and private_key."})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsxs("label",{className:"integration-field-label",children:["Impersonate Email ",e.jsx("span",{className:"integration-field-required",children:"*"})]}),e.jsx("input",{type:"email",className:"integration-field-input",value:w,placeholder:"user@yourdomain.com",onChange:a=>L(a.target.value)}),e.jsx("span",{className:"integration-field-description",children:"The email address to impersonate via domain-wide delegation. Must be a user in your Google Workspace domain."})]})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsx("label",{className:"integration-field-label",children:"Polling Interval (ms)"}),e.jsx("input",{type:"number",className:"integration-field-input",value:p,onChange:a=>I(a.target.value)}),e.jsx("span",{className:"integration-field-description",children:"How often to check for new emails. Default: 30000 (30s)."})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsx("label",{className:"integration-field-label",children:"Approval Keywords"}),e.jsx("textarea",{className:"integration-field-input integration-field-textarea",value:x,onChange:a=>E(a.target.value),rows:2}),e.jsx("span",{className:"integration-field-description",children:"Comma-separated keywords that indicate email approval."})]}),e.jsxs("div",{className:"integration-form-actions",children:[e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:S,children:"Cancel"}),s==="oauth2"&&N&&!y?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"integration-btn secondary",onClick:()=>B(!0),disabled:c,children:"Edit credentials"}),e.jsx("button",{type:"button",className:"integration-btn save",onClick:W,disabled:c,children:c?"Loading...":"Authorize with existing credentials"})]}):s==="oauth2"?e.jsx("button",{type:"button",className:"integration-btn save",onClick:Y,disabled:c||!g.trim(),children:c?"Saving...":"Save & Authorize"}):e.jsx("button",{type:"button",className:"integration-btn save",onClick:H,disabled:c||!w.trim()||!m.trim()&&!U,children:c?"Connecting...":"Save & Connect"})]})]}),b==="authorize"&&e.jsxs("div",{className:"gmail-oauth-section",children:[e.jsx("h4",{className:"gmail-oauth-section-title",children:"Authorize Gmail Access"}),e.jsx("p",{className:"gmail-oauth-help",children:"Click the link below to authorize Tide Commander to access your Gmail account. After granting access, you will be redirected back and the connection will be established automatically."}),O&&e.jsx("a",{href:O,target:"_blank",rel:"noopener noreferrer",className:"gmail-oauth-authorize-btn",children:"Authorize with Google"}),e.jsxs("div",{className:"gmail-oauth-waiting",children:[e.jsx("span",{className:"gmail-oauth-spinner"}),e.jsx("span",{children:"Waiting for authorization to complete..."})]}),e.jsx("div",{className:"integration-form-actions",children:e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:()=>{r.current&&(clearInterval(r.current),r.current=null),h("credentials")},children:"Back"})})]}),b==="connected"&&e.jsxs("div",{className:"gmail-oauth-section",children:[e.jsx("h4",{className:"gmail-oauth-section-title",children:"Gmail Connected"}),e.jsxs("div",{className:"gmail-oauth-connected-info",children:[e.jsx("span",{className:"gmail-oauth-connected-badge",children:"Connected"}),(n==null?void 0:n.emailAddress)&&e.jsx("span",{className:"gmail-oauth-email",children:n.emailAddress}),e.jsx("span",{className:"gmail-oauth-auth-type",children:s==="service_account"?"Service Account":"OAuth 2.0"})]}),e.jsxs("div",{className:"gmail-polling-toggle-row",children:[e.jsxs("div",{className:"gmail-polling-toggle-info",children:[e.jsx("div",{className:"gmail-polling-toggle-label",children:"Automatic Polling"}),e.jsx("div",{className:"gmail-polling-toggle-status",children:n!=null&&n.pollingActive?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"gmail-polling-dot active"}),"Active",n.lastChecked&&e.jsxs("span",{className:"gmail-polling-last",children:["— last checked ",new Date(n.lastChecked).toLocaleTimeString()]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"gmail-polling-dot paused"}),"Paused — new emails will not be ingested"]})})]}),e.jsx("button",{type:"button",role:"switch","aria-checked":!!(n!=null&&n.pollingActive),"aria-label":"Toggle automatic polling",className:`gmail-polling-switch ${n!=null&&n.pollingActive?"on":"off"}`,onClick:Q,disabled:$,children:e.jsx("span",{className:"gmail-polling-switch-thumb"})})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsx("label",{className:"integration-field-label",children:"Polling Interval (ms)"}),e.jsx("input",{type:"number",className:"integration-field-input",value:p,onChange:a=>I(a.target.value)})]}),e.jsxs("div",{className:"gmail-oauth-field",children:[e.jsx("label",{className:"integration-field-label",children:"Approval Keywords"}),e.jsx("textarea",{className:"integration-field-input integration-field-textarea",value:x,onChange:a=>E(a.target.value),rows:2})]}),e.jsxs("div",{className:"integration-form-actions",children:[e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:S,children:"Close"}),e.jsx("button",{type:"button",className:"integration-btn",style:{backgroundColor:"#f38ba8",color:"#1e1e2e"},onClick:V,disabled:c,children:c?"Disconnecting...":"Disconnect"}),e.jsx("button",{type:"button",className:"integration-btn save",onClick:X,disabled:P,children:P?"Saving...":"Save Settings"})]})]}),e.jsx("style",{children:`
2
+ .gmail-oauth-setup {
3
+ padding: 0;
4
+ }
5
+ .gmail-oauth-error {
6
+ background: linear-gradient(135deg, rgba(243, 139, 168, 0.2) 0%, rgba(243, 139, 168, 0.08) 100%);
7
+ border-left: 3px solid #f38ba8;
8
+ color: #f38ba8;
9
+ padding: 12px 16px;
10
+ border-radius: 8px;
11
+ margin-bottom: 18px;
12
+ font-size: 13px;
13
+ font-weight: 500;
14
+ }
15
+ .gmail-oauth-section {
16
+ background: linear-gradient(180deg, rgba(45, 49, 69, 0.4) 0%, rgba(30, 30, 46, 0.2) 100%);
17
+ border: 1px solid rgba(137, 180, 250, 0.15);
18
+ border-radius: 12px;
19
+ padding: 28px;
20
+ backdrop-filter: blur(10px);
21
+ }
22
+ .gmail-oauth-section-title {
23
+ margin: 0 0 16px 0;
24
+ color: #cdd6f4;
25
+ font-size: 18px;
26
+ font-weight: 700;
27
+ letter-spacing: -0.5px;
28
+ }
29
+ .gmail-oauth-help {
30
+ color: #a6adc8;
31
+ font-size: 13px;
32
+ line-height: 1.6;
33
+ margin: 0 0 20px 0;
34
+ font-weight: 400;
35
+ }
36
+ .gmail-oauth-link {
37
+ color: #89b4fa;
38
+ text-decoration: none;
39
+ border-bottom: 1.5px solid rgba(137, 180, 250, 0.4);
40
+ transition: all 0.2s ease;
41
+ font-weight: 500;
42
+ }
43
+ .gmail-oauth-link:hover {
44
+ color: #a8c5ff;
45
+ border-bottom-color: #89b4fa;
46
+ }
47
+ .gmail-oauth-code {
48
+ background: rgba(137, 180, 250, 0.15);
49
+ color: #89b4fa;
50
+ padding: 4px 10px;
51
+ border-radius: 6px;
52
+ font-size: 12px;
53
+ word-break: break-all;
54
+ font-weight: 500;
55
+ font-family: 'Monaco', 'Menlo', monospace;
56
+ }
57
+ .gmail-oauth-field {
58
+ margin-bottom: 18px;
59
+ }
60
+ .gmail-auth-method-selector {
61
+ display: flex;
62
+ gap: 12px;
63
+ }
64
+ .gmail-auth-method-btn {
65
+ flex: 1;
66
+ display: flex;
67
+ flex-direction: column;
68
+ align-items: center;
69
+ gap: 6px;
70
+ padding: 16px 12px;
71
+ background: rgba(30, 30, 46, 0.6);
72
+ border: 2px solid rgba(137, 180, 250, 0.15);
73
+ border-radius: 10px;
74
+ cursor: pointer;
75
+ transition: all 0.2s ease;
76
+ }
77
+ .gmail-auth-method-btn:hover {
78
+ border-color: rgba(137, 180, 250, 0.35);
79
+ background: rgba(30, 30, 46, 0.8);
80
+ }
81
+ .gmail-auth-method-btn.active {
82
+ border-color: #89b4fa;
83
+ background: rgba(137, 180, 250, 0.1);
84
+ box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.1);
85
+ }
86
+ .gmail-auth-method-icon {
87
+ font-size: 22px;
88
+ }
89
+ .gmail-auth-method-label {
90
+ color: #cdd6f4;
91
+ font-size: 14px;
92
+ font-weight: 600;
93
+ }
94
+ .gmail-auth-method-desc {
95
+ color: #7f849c;
96
+ font-size: 11px;
97
+ font-weight: 400;
98
+ }
99
+ .gmail-oauth-auth-type {
100
+ color: #7f849c;
101
+ font-size: 12px;
102
+ font-weight: 500;
103
+ margin-left: auto;
104
+ background: rgba(137, 180, 250, 0.1);
105
+ padding: 4px 10px;
106
+ border-radius: 6px;
107
+ }
108
+ .integration-field-label {
109
+ display: block;
110
+ margin-bottom: 8px;
111
+ color: #cdd6f4;
112
+ font-size: 14px;
113
+ font-weight: 600;
114
+ letter-spacing: 0.3px;
115
+ }
116
+ .integration-field-required {
117
+ color: #f38ba8;
118
+ }
119
+ .integration-field-input {
120
+ width: 100%;
121
+ background: rgba(30, 30, 46, 0.6);
122
+ border: 1.5px solid rgba(137, 180, 250, 0.2);
123
+ color: #cdd6f4;
124
+ padding: 11px 14px;
125
+ border-radius: 8px;
126
+ font-size: 13px;
127
+ transition: all 0.2s ease;
128
+ font-weight: 500;
129
+ }
130
+ .integration-field-input:focus {
131
+ outline: none;
132
+ border-color: #89b4fa;
133
+ background: rgba(30, 30, 46, 0.8);
134
+ box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.15);
135
+ }
136
+ .integration-field-input::placeholder {
137
+ color: #6c7086;
138
+ }
139
+ .integration-field-textarea {
140
+ resize: vertical;
141
+ min-height: 80px;
142
+ font-family: 'Monaco', 'Menlo', monospace;
143
+ font-size: 12px;
144
+ }
145
+ .integration-field-description {
146
+ display: block;
147
+ margin-top: 7px;
148
+ color: #7f849c;
149
+ font-size: 12px;
150
+ font-weight: 400;
151
+ }
152
+ .gmail-oauth-authorize-btn {
153
+ display: inline-block;
154
+ background: linear-gradient(135deg, #89b4fa 0%, #7aa3f0 100%);
155
+ color: #1e1e2e;
156
+ padding: 12px 32px;
157
+ border-radius: 8px;
158
+ text-decoration: none;
159
+ font-weight: 700;
160
+ font-size: 14px;
161
+ margin-bottom: 20px;
162
+ transition: all 0.25s ease;
163
+ border: none;
164
+ cursor: pointer;
165
+ box-shadow: 0 4px 12px rgba(137, 180, 250, 0.25);
166
+ letter-spacing: 0.3px;
167
+ }
168
+ .gmail-oauth-authorize-btn:hover {
169
+ transform: translateY(-2px);
170
+ box-shadow: 0 6px 16px rgba(137, 180, 250, 0.35);
171
+ background: linear-gradient(135deg, #a8c5ff 0%, #8eb8ff 100%);
172
+ }
173
+ .gmail-oauth-authorize-btn:active {
174
+ transform: translateY(0);
175
+ }
176
+ .gmail-oauth-waiting {
177
+ display: flex;
178
+ align-items: center;
179
+ gap: 12px;
180
+ color: #a6adc8;
181
+ font-size: 13px;
182
+ margin-bottom: 20px;
183
+ background: rgba(137, 180, 250, 0.08);
184
+ padding: 14px 16px;
185
+ border-radius: 8px;
186
+ border-left: 3px solid #89b4fa;
187
+ font-weight: 500;
188
+ }
189
+ .gmail-oauth-spinner {
190
+ display: inline-block;
191
+ width: 16px;
192
+ height: 16px;
193
+ border: 2.5px solid rgba(137, 180, 250, 0.25);
194
+ border-top-color: #89b4fa;
195
+ border-radius: 50%;
196
+ animation: gmail-spin 0.8s linear infinite;
197
+ flex-shrink: 0;
198
+ }
199
+ @keyframes gmail-spin {
200
+ to { transform: rotate(360deg); }
201
+ }
202
+ .gmail-oauth-connected-info {
203
+ display: flex;
204
+ align-items: center;
205
+ gap: 14px;
206
+ margin-bottom: 20px;
207
+ background: rgba(166, 227, 161, 0.08);
208
+ padding: 16px;
209
+ border-radius: 10px;
210
+ border-left: 3px solid #a6e3a1;
211
+ }
212
+ .gmail-oauth-connected-badge {
213
+ background: linear-gradient(135deg, rgba(166, 227, 161, 0.3) 0%, rgba(166, 227, 161, 0.15) 100%);
214
+ color: #a6e3a1;
215
+ padding: 6px 14px;
216
+ border-radius: 6px;
217
+ font-size: 12px;
218
+ font-weight: 700;
219
+ letter-spacing: 0.4px;
220
+ text-transform: uppercase;
221
+ border: 1px solid rgba(166, 227, 161, 0.3);
222
+ flex-shrink: 0;
223
+ }
224
+ .gmail-oauth-email {
225
+ color: #cdd6f4;
226
+ font-size: 14px;
227
+ font-weight: 600;
228
+ letter-spacing: 0.2px;
229
+ }
230
+ .gmail-polling-toggle-row {
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: space-between;
234
+ gap: 16px;
235
+ margin: 0 0 20px 0;
236
+ padding: 14px 16px;
237
+ background: rgba(30, 30, 46, 0.6);
238
+ border: 1px solid rgba(137, 180, 250, 0.15);
239
+ border-radius: 10px;
240
+ }
241
+ .gmail-polling-toggle-info {
242
+ display: flex;
243
+ flex-direction: column;
244
+ gap: 4px;
245
+ min-width: 0;
246
+ }
247
+ .gmail-polling-toggle-label {
248
+ color: #cdd6f4;
249
+ font-size: 14px;
250
+ font-weight: 600;
251
+ letter-spacing: 0.2px;
252
+ }
253
+ .gmail-polling-toggle-status {
254
+ color: #a6adc8;
255
+ font-size: 12px;
256
+ font-weight: 500;
257
+ display: flex;
258
+ align-items: center;
259
+ gap: 6px;
260
+ flex-wrap: wrap;
261
+ }
262
+ .gmail-polling-last {
263
+ color: #7f849c;
264
+ font-weight: 400;
265
+ }
266
+ .gmail-polling-dot {
267
+ display: inline-block;
268
+ width: 8px;
269
+ height: 8px;
270
+ border-radius: 50%;
271
+ flex-shrink: 0;
272
+ }
273
+ .gmail-polling-dot.active {
274
+ background: #a6e3a1;
275
+ box-shadow: 0 0 6px rgba(166, 227, 161, 0.6);
276
+ }
277
+ .gmail-polling-dot.paused {
278
+ background: #fab387;
279
+ }
280
+ .gmail-polling-switch {
281
+ position: relative;
282
+ width: 44px;
283
+ height: 24px;
284
+ border-radius: 12px;
285
+ border: none;
286
+ cursor: pointer;
287
+ transition: background 0.2s ease;
288
+ flex-shrink: 0;
289
+ padding: 0;
290
+ }
291
+ .gmail-polling-switch.on {
292
+ background: linear-gradient(135deg, #a6e3a1 0%, #94d38f 100%);
293
+ }
294
+ .gmail-polling-switch.off {
295
+ background: rgba(108, 112, 134, 0.5);
296
+ }
297
+ .gmail-polling-switch:disabled {
298
+ opacity: 0.6;
299
+ cursor: wait;
300
+ }
301
+ .gmail-polling-switch-thumb {
302
+ position: absolute;
303
+ top: 2px;
304
+ left: 2px;
305
+ width: 20px;
306
+ height: 20px;
307
+ background: #ffffff;
308
+ border-radius: 50%;
309
+ transition: transform 0.2s ease;
310
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
311
+ }
312
+ .gmail-polling-switch.on .gmail-polling-switch-thumb {
313
+ transform: translateX(20px);
314
+ }
315
+ .integration-form-actions {
316
+ display: flex;
317
+ gap: 12px;
318
+ justify-content: flex-end;
319
+ margin-top: 24px;
320
+ padding-top: 20px;
321
+ border-top: 1px solid rgba(137, 180, 250, 0.1);
322
+ }
323
+ .integration-btn {
324
+ padding: 10px 24px;
325
+ border-radius: 8px;
326
+ font-weight: 600;
327
+ font-size: 13px;
328
+ border: none;
329
+ cursor: pointer;
330
+ transition: all 0.2s ease;
331
+ letter-spacing: 0.3px;
332
+ }
333
+ .integration-btn.save {
334
+ background: linear-gradient(135deg, #89b4fa 0%, #7aa3f0 100%);
335
+ color: #1e1e2e;
336
+ box-shadow: 0 4px 12px rgba(137, 180, 250, 0.25);
337
+ }
338
+ .integration-btn.save:hover:not(:disabled) {
339
+ transform: translateY(-2px);
340
+ box-shadow: 0 6px 16px rgba(137, 180, 250, 0.35);
341
+ }
342
+ .integration-btn.cancel {
343
+ background: rgba(137, 180, 250, 0.1);
344
+ color: #89b4fa;
345
+ border: 1.5px solid rgba(137, 180, 250, 0.2);
346
+ }
347
+ .integration-btn.cancel:hover:not(:disabled) {
348
+ background: rgba(137, 180, 250, 0.15);
349
+ border-color: #89b4fa;
350
+ }
351
+ .integration-btn.secondary {
352
+ background: rgba(249, 226, 175, 0.1);
353
+ color: #f9e2af;
354
+ border: 1.5px solid rgba(249, 226, 175, 0.25);
355
+ }
356
+ .integration-btn.secondary:hover:not(:disabled) {
357
+ background: rgba(249, 226, 175, 0.18);
358
+ border-color: #f9e2af;
359
+ }
360
+ .integration-btn:disabled {
361
+ opacity: 0.5;
362
+ cursor: not-allowed;
363
+ }
364
+ .gmail-oauth-shared-banner {
365
+ background: linear-gradient(135deg, rgba(166, 227, 161, 0.15) 0%, rgba(166, 227, 161, 0.05) 100%);
366
+ border: 1px solid rgba(166, 227, 161, 0.3);
367
+ border-left: 3px solid #a6e3a1;
368
+ border-radius: 10px;
369
+ padding: 16px 18px;
370
+ margin-bottom: 8px;
371
+ }
372
+ .gmail-oauth-shared-title {
373
+ display: flex;
374
+ align-items: center;
375
+ gap: 10px;
376
+ color: #a6e3a1;
377
+ font-size: 14px;
378
+ font-weight: 700;
379
+ letter-spacing: 0.2px;
380
+ margin-bottom: 8px;
381
+ }
382
+ .gmail-oauth-shared-body {
383
+ color: #a6adc8;
384
+ font-size: 13px;
385
+ line-height: 1.6;
386
+ font-weight: 400;
387
+ }
388
+ `})]})}export{ne as GmailOAuthSetup};
@@ -0,0 +1,236 @@
1
+ import{r as o,W as N,l as m,j as e}from"./main-BGQsJhbR.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react--Eh9ivFN.js";import"./vendor-three-Chj50gSY.js";function D({integration:r,onSave:v,onCancel:p}){const[i,y]=o.useState(r.values.GOOGLE_CLIENT_ID||""),[h,C]=o.useState(""),[j,E]=o.useState(null),[g,S]=o.useState(null),[c,u]=o.useState(!1),[k,l]=o.useState(null),[z,G]=o.useState(!1),A=r.values.GOOGLE_CLIENT_ID==="********"&&r.values.GOOGLE_CLIENT_SECRET==="********",[b,x]=o.useState(r.status.connected?"connected":"credentials"),t=o.useRef(null),f=o.useCallback(async()=>{try{const s={gmail:"/api/email/status","google-calendar":"/api/calendar/status","google-drive":"/api/drive/status"}[r.id]||"/api/calendar/status",n=await N(m(s));if(n.ok){const d=await n.json();S(d),d.authenticated&&(x("connected"),t.current&&(clearInterval(t.current),t.current=null))}}catch(a){console.error("Failed to fetch Google auth status:",a)}},[r.id]);o.useEffect(()=>(f(),()=>{t.current&&clearInterval(t.current)}),[f]);const w=async()=>{const s={gmail:"/api/email/auth/url","google-calendar":"/api/calendar/auth/url","google-drive":"/api/drive/auth/url"}[r.id]||"/api/calendar/auth/url",n=await N(m(s));if(!n.ok){const L=await n.json().catch(()=>({}));throw new Error(L.error||`HTTP ${n.status}`)}const d=await n.json();if(!d.url)throw new Error("OAuth URL is empty");E(d.url),l(null),x("authorize"),t.current&&clearInterval(t.current),t.current=setInterval(f,3e3)},O=async()=>{u(!0),l(null);try{await w()}catch(a){l(a instanceof Error?a.message:"Failed to get OAuth URL")}finally{u(!1)}},I=async()=>{if(!i.trim()){l("Client ID is required");return}u(!0),l(null);try{const a={};i.trim()&&i.trim()!=="********"&&(a.GOOGLE_CLIENT_ID=i.trim()),h.trim()&&(a.GOOGLE_CLIENT_SECRET=h.trim()),console.log("Saving Google OAuth config...",a),await v(a),console.log("Config saved successfully"),await w()}catch(a){const s=a instanceof Error?a.message:"Failed to get OAuth URL";console.error("Error in handleSaveCredentials:",s,a),l(s)}finally{u(!1)}};return e.jsxs("div",{className:"google-oauth-setup",children:[k&&e.jsx("div",{className:"google-oauth-error",children:k}),b==="credentials"&&e.jsxs("div",{className:"google-oauth-section",children:[e.jsx("h4",{className:"google-oauth-section-title",children:"Google OAuth Credentials"}),A&&!z?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"google-oauth-shared-banner",children:[e.jsxs("div",{className:"google-oauth-shared-title",children:[e.jsx("span",{children:"✓"}),e.jsx("span",{children:"Credentials already configured"})]}),e.jsx("div",{className:"google-oauth-shared-body",children:"Existing Google OAuth credentials (Client ID and Secret) are saved in your secrets store — they're shared between Gmail, Calendar, and Drive. You may still need to re-authorize once so the refresh token grants access to this service."})]}),e.jsxs("div",{className:"integration-form-actions",children:[e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:p,children:"Cancel"}),e.jsx("button",{type:"button",className:"integration-btn secondary",onClick:()=>G(!0),disabled:c,children:"Edit credentials"}),e.jsx("button",{type:"button",className:"integration-btn save",onClick:O,disabled:c,children:c?"Loading...":"Authorize with existing credentials"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"google-oauth-help",children:["Create OAuth2 credentials in the"," ",e.jsx("a",{href:"https://console.cloud.google.com/apis/credentials",target:"_blank",rel:"noopener noreferrer",className:"google-oauth-link",children:"Google Cloud Console"}),". Enable the relevant API (Gmail, Calendar, or Drive). Set the redirect URI to:"," ",e.jsx("code",{className:"google-oauth-code",children:m(r.id==="gmail"?"/api/email/auth/callback":r.id==="google-drive"?"/api/drive/auth/callback":"/api/calendar/auth/callback")})]}),e.jsxs("div",{className:"google-oauth-field",children:[e.jsxs("label",{className:"integration-field-label",children:["OAuth Client ID ",e.jsx("span",{className:"integration-field-required",children:"*"})]}),e.jsx("input",{type:"text",className:"integration-field-input",value:i,placeholder:"xxxx.apps.googleusercontent.com",onChange:a=>y(a.target.value)})]}),e.jsxs("div",{className:"google-oauth-field",children:[e.jsxs("label",{className:"integration-field-label",children:["OAuth Client Secret ",e.jsx("span",{className:"integration-field-required",children:"*"})]}),e.jsx("input",{type:"password",className:"integration-field-input",value:h,placeholder:r.values.GOOGLE_CLIENT_SECRET?"(saved)":"Enter client secret",onChange:a=>C(a.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"integration-form-actions",children:[e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:p,children:"Cancel"}),e.jsx("button",{type:"button",className:"integration-btn save",onClick:I,disabled:c||!i.trim(),children:c?"Saving...":"Save & Authorize"})]})]})]}),b==="authorize"&&e.jsxs("div",{className:"google-oauth-section",children:[e.jsx("h4",{className:"google-oauth-section-title",children:"Authorize Google Access"}),e.jsx("p",{className:"google-oauth-help",children:"Click the link below to authorize Tide Commander to access your Google account. After granting access, you will be redirected back and the connection will be established automatically."}),j&&e.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"google-oauth-authorize-btn",children:"Authorize with Google"}),e.jsxs("div",{className:"google-oauth-waiting",children:[e.jsx("span",{className:"google-oauth-spinner"}),e.jsx("span",{children:"Waiting for authorization to complete..."})]}),e.jsx("div",{className:"integration-form-actions",children:e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:()=>{t.current&&(clearInterval(t.current),t.current=null),x("credentials")},children:"Back"})})]}),b==="connected"&&e.jsxs("div",{className:"google-oauth-section",children:[e.jsx("h4",{className:"google-oauth-section-title",children:"Google Connected"}),e.jsxs("div",{className:"google-oauth-connected-info",children:[e.jsx("span",{className:"google-oauth-connected-badge",children:"Connected"}),(g==null?void 0:g.emailAddress)&&e.jsx("span",{className:"google-oauth-email",children:g.emailAddress})]}),e.jsx("p",{className:"google-oauth-help",children:"Your Google account has been successfully connected."}),e.jsx("div",{className:"integration-form-actions",children:e.jsx("button",{type:"button",className:"integration-btn cancel",onClick:async()=>{await v({}),p()},children:"Close"})})]}),e.jsx("style",{children:`
2
+ .google-oauth-setup {
3
+ padding: 0;
4
+ }
5
+ .google-oauth-error {
6
+ background: linear-gradient(135deg, rgba(243, 139, 168, 0.2) 0%, rgba(243, 139, 168, 0.08) 100%);
7
+ border-left: 3px solid #f38ba8;
8
+ color: #f38ba8;
9
+ padding: 12px 16px;
10
+ border-radius: 8px;
11
+ margin-bottom: 18px;
12
+ font-size: 13px;
13
+ font-weight: 500;
14
+ }
15
+ .google-oauth-section {
16
+ background: linear-gradient(180deg, rgba(45, 49, 69, 0.4) 0%, rgba(30, 30, 46, 0.2) 100%);
17
+ border: 1px solid rgba(137, 180, 250, 0.15);
18
+ border-radius: 12px;
19
+ padding: 28px;
20
+ backdrop-filter: blur(10px);
21
+ }
22
+ .google-oauth-section-title {
23
+ margin: 0 0 16px 0;
24
+ color: #cdd6f4;
25
+ font-size: 18px;
26
+ font-weight: 700;
27
+ letter-spacing: -0.5px;
28
+ }
29
+ .google-oauth-help {
30
+ color: #a6adc8;
31
+ font-size: 13px;
32
+ line-height: 1.6;
33
+ margin: 0 0 20px 0;
34
+ font-weight: 400;
35
+ }
36
+ .google-oauth-link {
37
+ color: #89b4fa;
38
+ text-decoration: none;
39
+ border-bottom: 1.5px solid rgba(137, 180, 250, 0.4);
40
+ transition: all 0.2s ease;
41
+ font-weight: 500;
42
+ }
43
+ .google-oauth-link:hover {
44
+ color: #a8c5ff;
45
+ border-bottom-color: #89b4fa;
46
+ }
47
+ .google-oauth-code {
48
+ background: rgba(137, 180, 250, 0.15);
49
+ color: #89b4fa;
50
+ padding: 4px 10px;
51
+ border-radius: 6px;
52
+ font-size: 12px;
53
+ word-break: break-all;
54
+ font-weight: 500;
55
+ font-family: 'Monaco', 'Menlo', monospace;
56
+ }
57
+ .google-oauth-field {
58
+ margin-bottom: 18px;
59
+ }
60
+ .integration-field-label {
61
+ display: block;
62
+ margin-bottom: 8px;
63
+ color: #cdd6f4;
64
+ font-size: 14px;
65
+ font-weight: 600;
66
+ letter-spacing: 0.3px;
67
+ }
68
+ .integration-field-required {
69
+ color: #f38ba8;
70
+ }
71
+ .integration-field-input {
72
+ width: 100%;
73
+ background: rgba(30, 30, 46, 0.6);
74
+ border: 1.5px solid rgba(137, 180, 250, 0.2);
75
+ color: #cdd6f4;
76
+ padding: 11px 14px;
77
+ border-radius: 8px;
78
+ font-size: 13px;
79
+ transition: all 0.2s ease;
80
+ font-weight: 500;
81
+ }
82
+ .integration-field-input:focus {
83
+ outline: none;
84
+ border-color: #89b4fa;
85
+ background: rgba(30, 30, 46, 0.8);
86
+ box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.15);
87
+ }
88
+ .google-oauth-authorize-btn {
89
+ display: inline-block;
90
+ background: linear-gradient(135deg, #89b4fa 0%, #7aa3f0 100%);
91
+ color: #1e1e2e;
92
+ padding: 12px 32px;
93
+ border-radius: 8px;
94
+ text-decoration: none;
95
+ font-weight: 700;
96
+ font-size: 14px;
97
+ margin-bottom: 20px;
98
+ transition: all 0.25s ease;
99
+ border: none;
100
+ cursor: pointer;
101
+ box-shadow: 0 4px 12px rgba(137, 180, 250, 0.25);
102
+ letter-spacing: 0.3px;
103
+ }
104
+ .google-oauth-authorize-btn:hover {
105
+ transform: translateY(-2px);
106
+ box-shadow: 0 6px 16px rgba(137, 180, 250, 0.35);
107
+ background: linear-gradient(135deg, #a8c5ff 0%, #8eb8ff 100%);
108
+ }
109
+ .google-oauth-waiting {
110
+ display: flex;
111
+ align-items: center;
112
+ gap: 12px;
113
+ color: #a6adc8;
114
+ font-size: 13px;
115
+ margin-bottom: 20px;
116
+ background: rgba(137, 180, 250, 0.08);
117
+ padding: 14px 16px;
118
+ border-radius: 8px;
119
+ border-left: 3px solid #89b4fa;
120
+ font-weight: 500;
121
+ }
122
+ .google-oauth-spinner {
123
+ display: inline-block;
124
+ width: 16px;
125
+ height: 16px;
126
+ border: 2.5px solid rgba(137, 180, 250, 0.25);
127
+ border-top-color: #89b4fa;
128
+ border-radius: 50%;
129
+ animation: google-spin 0.8s linear infinite;
130
+ flex-shrink: 0;
131
+ }
132
+ @keyframes google-spin {
133
+ to { transform: rotate(360deg); }
134
+ }
135
+ .google-oauth-connected-info {
136
+ display: flex;
137
+ align-items: center;
138
+ gap: 14px;
139
+ margin-bottom: 20px;
140
+ background: rgba(166, 227, 161, 0.08);
141
+ padding: 16px;
142
+ border-radius: 10px;
143
+ border-left: 3px solid #a6e3a1;
144
+ }
145
+ .google-oauth-connected-badge {
146
+ background: linear-gradient(135deg, rgba(166, 227, 161, 0.3) 0%, rgba(166, 227, 161, 0.15) 100%);
147
+ color: #a6e3a1;
148
+ padding: 6px 14px;
149
+ border-radius: 6px;
150
+ font-size: 12px;
151
+ font-weight: 700;
152
+ letter-spacing: 0.4px;
153
+ text-transform: uppercase;
154
+ border: 1px solid rgba(166, 227, 161, 0.3);
155
+ flex-shrink: 0;
156
+ }
157
+ .google-oauth-email {
158
+ color: #cdd6f4;
159
+ font-size: 14px;
160
+ font-weight: 600;
161
+ letter-spacing: 0.2px;
162
+ }
163
+ .integration-form-actions {
164
+ display: flex;
165
+ gap: 12px;
166
+ justify-content: flex-end;
167
+ margin-top: 24px;
168
+ padding-top: 20px;
169
+ border-top: 1px solid rgba(137, 180, 250, 0.1);
170
+ }
171
+ .integration-btn {
172
+ padding: 10px 24px;
173
+ border-radius: 8px;
174
+ font-weight: 600;
175
+ font-size: 13px;
176
+ border: none;
177
+ cursor: pointer;
178
+ transition: all 0.2s ease;
179
+ letter-spacing: 0.3px;
180
+ }
181
+ .integration-btn.save {
182
+ background: linear-gradient(135deg, #89b4fa 0%, #7aa3f0 100%);
183
+ color: #1e1e2e;
184
+ box-shadow: 0 4px 12px rgba(137, 180, 250, 0.25);
185
+ }
186
+ .integration-btn.save:hover:not(:disabled) {
187
+ transform: translateY(-2px);
188
+ box-shadow: 0 6px 16px rgba(137, 180, 250, 0.35);
189
+ }
190
+ .integration-btn.cancel {
191
+ background: rgba(137, 180, 250, 0.1);
192
+ color: #89b4fa;
193
+ border: 1.5px solid rgba(137, 180, 250, 0.2);
194
+ }
195
+ .integration-btn.cancel:hover:not(:disabled) {
196
+ background: rgba(137, 180, 250, 0.15);
197
+ border-color: #89b4fa;
198
+ }
199
+ .integration-btn.secondary {
200
+ background: rgba(249, 226, 175, 0.1);
201
+ color: #f9e2af;
202
+ border: 1.5px solid rgba(249, 226, 175, 0.25);
203
+ }
204
+ .integration-btn.secondary:hover:not(:disabled) {
205
+ background: rgba(249, 226, 175, 0.18);
206
+ border-color: #f9e2af;
207
+ }
208
+ .integration-btn:disabled {
209
+ opacity: 0.5;
210
+ cursor: not-allowed;
211
+ }
212
+ .google-oauth-shared-banner {
213
+ background: linear-gradient(135deg, rgba(166, 227, 161, 0.15) 0%, rgba(166, 227, 161, 0.05) 100%);
214
+ border: 1px solid rgba(166, 227, 161, 0.3);
215
+ border-left: 3px solid #a6e3a1;
216
+ border-radius: 10px;
217
+ padding: 16px 18px;
218
+ margin-bottom: 8px;
219
+ }
220
+ .google-oauth-shared-title {
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 10px;
224
+ color: #a6e3a1;
225
+ font-size: 14px;
226
+ font-weight: 700;
227
+ letter-spacing: 0.2px;
228
+ margin-bottom: 8px;
229
+ }
230
+ .google-oauth-shared-body {
231
+ color: #a6adc8;
232
+ font-size: 13px;
233
+ line-height: 1.6;
234
+ font-weight: 400;
235
+ }
236
+ `})]})}export{D as GoogleOAuthSetup};