max / goingson
1 file changed,
+16 insertions,
-9 deletions
| @@ -311,7 +311,7 @@ | |||
| 311 | 311 | container.innerHTML = ` | |
| 312 | 312 | <div class="settings-section"> | |
| 313 | 313 | <h3 class="settings-heading">Email Accounts</h3> | |
| 314 | - | <p class="settings-desc">Connect IMAP/SMTP or OAuth accounts to send and receive email from GoingsOn.</p> | |
| 314 | + | <p class="settings-desc">Connect an email account via IMAP/SMTP to send and receive email from GoingsOn. Most providers need an app password rather than your normal password.</p> | |
| 315 | 315 | <div class="account-list"> | |
| 316 | 316 | ${accountsList} | |
| 317 | 317 | </div> | |
| @@ -353,11 +353,21 @@ | |||
| 353 | 353 | console.warn('Failed to load OAuth providers:', e); | |
| 354 | 354 | } | |
| 355 | 355 | ||
| 356 | - | // Build OAuth provider buttons | |
| 357 | - | const oauthButtons = oauthProviders.length > 0 | |
| 356 | + | // App-password (IMAP/SMTP) is the primary path. OAuth buttons only | |
| 357 | + | // appear once a provider is registered (post-launch); when present they | |
| 358 | + | // sit below the form as an alternative, not the recommended default. | |
| 359 | + | const hasOAuth = oauthProviders.length > 0; | |
| 360 | + | ||
| 361 | + | const imapIntro = ` | |
| 362 | + | <p class="settings-desc">Enter your account details below. Most providers (Gmail, Fastmail, iCloud, Yahoo, Outlook with 2-step verification) require an <strong>app password</strong> instead of your normal password — type your email address and GoingsOn shows the exact link to create one.</p> | |
| 363 | + | `; | |
| 364 | + | ||
| 365 | + | const oauthButtons = hasOAuth | |
| 358 | 366 | ? ` | |
| 367 | + | <div class="imap-block-divider"> | |
| 368 | + | <div class="imap-block-title">Or connect with OAuth</div> | |
| 369 | + | </div> | |
| 359 | 370 | <div class="oauth-block"> | |
| 360 | - | <div class="oauth-block-title">Connect with OAuth (Recommended)</div> | |
| 361 | 371 | <div class="oauth-buttons"> | |
| 362 | 372 | ${oauthProviders.map(p => ` | |
| 363 | 373 | <button type="button" class="btn btn-secondary" onclick="GoingsOn.emails.startOAuth('${escAttr(p.id)}')"> | |
| @@ -365,10 +375,7 @@ | |||
| 365 | 375 | </button> | |
| 366 | 376 | `).join('')} | |
| 367 | 377 | </div> | |
| 368 | - | <div class="oauth-helptext">Secure login - your password is never stored.</div> | |
| 369 | - | </div> | |
| 370 | - | <div class="imap-block-divider"> | |
| 371 | - | <div class="imap-block-title">Or use IMAP/SMTP (App Password)</div> | |
| 378 | + | <div class="oauth-helptext">Signs in through your provider; no app password needed.</div> | |
| 372 | 379 | </div> | |
| 373 | 380 | ` | |
| 374 | 381 | : ''; | |
| @@ -382,7 +389,7 @@ | |||
| 382 | 389 | submitLabel: 'Add Account', | |
| 383 | 390 | }); | |
| 384 | 391 | ||
| 385 | - | const content = `${oauthButtons}${formHtml}`; | |
| 392 | + | const content = `${imapIntro}${formHtml}${oauthButtons}`; | |
| 386 | 393 | GoingsOn.ui.openModal('Add Email Account', content); | |
| 387 | 394 | // Attach auto-detect for known providers after modal DOM is ready | |
| 388 | 395 | setTimeout(() => attachAutoDetect('acct'), 0); |