@stacksjs/defaults 0.75.674 → 0.75.685

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 (57) hide show
  1. package/ai/skills/stacks-ai/SKILL.md +7 -2
  2. package/ai/skills/stacks-api/SKILL.md +1 -1
  3. package/ai/skills/stacks-dashboard/SKILL.md +9 -2
  4. package/ai/skills/stacks-deploy/SKILL.md +8 -0
  5. package/ai/skills/stacks-desktop/SKILL.md +31 -0
  6. package/ai/skills/stacks-development/SKILL.md +5 -7
  7. package/ai/skills/stacks-health/SKILL.md +19 -9
  8. package/ai/skills/stacks-native/CATALOG.md +24 -24
  9. package/ai/skills/stacks-newsletter/SKILL.md +10 -4
  10. package/ai/skills/stacks-router/SKILL.md +2 -2
  11. package/ai/skills/stacks-routes/SKILL.md +2 -2
  12. package/ai/skills/stacks-scheduler/SKILL.md +16 -2
  13. package/ai/skills/stacks-security/SKILL.md +24 -0
  14. package/ai/skills/stacks-socials/SKILL.md +17 -1
  15. package/ai/skills/stacks-storage/SKILL.md +34 -15
  16. package/app/Actions/SubscriberEmailAction.ts +26 -10
  17. package/app/Jobs/Inspire.ts +33 -0
  18. package/functions/dashboard-sidebar-order.ts +3 -0
  19. package/ide/vscode/package.json +1 -1
  20. package/package.json +8 -7
  21. package/project/storage/framework/types/request-context.d.ts +3 -0
  22. package/resources/components/Dashboard/Billing/BillingPaymentMethodsPanel.stx +3 -10
  23. package/resources/components/Dashboard/Billing/BillingPlanSummary.stx +3 -10
  24. package/resources/components/Dashboard/Billing/BillingSettings.stx +13 -15
  25. package/resources/components/Dashboard/Billing/BillingTransactionHistory.stx +2 -9
  26. package/resources/components/Dashboard/DashboardSectionLanding.stx +72 -0
  27. package/resources/components/Dashboard/DashboardSectionSidebar.stx +78 -0
  28. package/resources/components/Dashboard/GlobalSearch.stx +3 -1
  29. package/resources/components/Dashboard/Home/DashboardHome.stx +14 -1
  30. package/resources/components/Dashboard/Settings/AppearanceSettingsDashboard.stx +21 -92
  31. package/resources/components/Dashboard/Settings/DashboardSettingsFrame.stx +98 -0
  32. package/resources/components/Dashboard/Settings/DashboardThemePicker.stx +4 -9
  33. package/resources/components/Dashboard/Settings/MailSettingsDashboard.stx +162 -167
  34. package/resources/components/Dashboard/Settings/SettingsDashboard.stx +34 -30
  35. package/resources/components/Dashboard/Settings/SoftwareUpdateDashboard.stx +229 -0
  36. package/resources/components/Dashboard/UI/DashboardNavigationCards.stx +44 -0
  37. package/resources/components/Dashboard/UI/Input.stx +1 -0
  38. package/resources/components/Dashboard/UI/Select.stx +1 -0
  39. package/resources/components/Dashboard/UI/Table.stx +1 -0
  40. package/resources/components/Dashboard/UI/Textarea.stx +1 -0
  41. package/resources/components/Marketing/SubscribeForm.stx +29 -8
  42. package/resources/functions/dashboard/section-landing.ts +201 -0
  43. package/resources/functions/dashboard/section-navigation.ts +95 -0
  44. package/styles/dashboard-theme.css +778 -9
  45. package/views/dashboard/composables/dashboard-themes.ts +5 -5
  46. package/views/dashboard/composables/settings-window.ts +116 -0
  47. package/views/dashboard/composables/useAppearance.ts +13 -4
  48. package/views/dashboard/composables/useDashboardThemes.ts +2 -1
  49. package/views/dashboard/composables/useSettingsWindow.ts +23 -0
  50. package/views/dashboard/layouts/default.stx +32 -20
  51. package/views/dashboard/layouts/settings.stx +48 -0
  52. package/views/dashboard/sections/[section].stx +19 -0
  53. package/views/dashboard/settings/appearance.stx +4 -2
  54. package/views/dashboard/settings/billing.stx +3 -4
  55. package/views/dashboard/settings/index.stx +4 -2
  56. package/views/dashboard/settings/mail.stx +3 -3
  57. package/views/dashboard/settings/software-update.stx +9 -0
@@ -303,26 +303,18 @@ async function saveSettings(): Promise<void> {
303
303
  onMount(() => void loadSettings())
304
304
  </script>
305
305
 
306
- <div class="flex flex-col gap-6">
307
- <PageHeader
308
- title="Mail Settings"
309
- description="Configure the framework mail driver and its environment-backed credentials."
310
- />
311
-
312
- <div class="grid gap-3 sm:grid-cols-3">
313
- <div class="p-4 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
314
- <p class="font-medium text-stone-500 text-xs tracking-wide uppercase dark:text-neutral-400">Driver</p>
315
- <p class="mt-1 font-semibold text-sm text-stone-900 dark:text-white" :text="selectedDriverLabel()"></p>
316
- </div>
317
- <div class="p-4 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
318
- <p class="font-medium text-stone-500 text-xs tracking-wide uppercase dark:text-neutral-400">Source</p>
319
- <p class="mt-1 font-mono text-sm text-stone-900 dark:text-white" :text="sources().join(', ')"></p>
320
- </div>
321
- <div class="p-4 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
322
- <p class="font-medium text-stone-500 text-xs tracking-wide uppercase dark:text-neutral-400">Configuration</p>
323
- <p class="mt-1 font-medium text-sm" :class="driverReady() ? 'text-emerald-600 dark:text-emerald-400' : 'text-amber-600 dark:text-amber-400'" :text="driverReady() ? 'Ready' : 'Needs attention'"></p>
324
- </div>
325
- </div>
306
+ <div class="dashboard-settings-stack">
307
+ <SettingsGroup header="Delivery status">
308
+ <SettingsRow label="Driver" setting="mail-driver">
309
+ <span :text="selectedDriverLabel()"></span>
310
+ </SettingsRow>
311
+ <SettingsRow label="Source" setting="mail-source">
312
+ <code data-mail-source :text="sources().join(', ')"></code>
313
+ </SettingsRow>
314
+ <SettingsRow label="Configuration" setting="mail-status">
315
+ <span class="font-medium" :class="driverReady() ? 'text-emerald-700 dark:text-emerald-400' : 'text-amber-700 dark:text-amber-400'" :text="driverReady() ? 'Ready' : 'Needs attention'"></span>
316
+ </SettingsRow>
317
+ </SettingsGroup>
326
318
 
327
319
  <div :if="errorMessage()" class="p-4 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-xl dark:border-red-900" role="alert">
328
320
  <p :text="errorMessage()"></p>
@@ -337,170 +329,173 @@ onMount(() => void loadSettings())
337
329
 
338
330
  <div :if="successMessage()" class="p-4 text-emerald-700 text-sm dark:text-emerald-300 bg-emerald-50 dark:bg-emerald-950/30 border border-emerald-200 rounded-xl dark:border-emerald-900" role="status" :text="successMessage()"></div>
339
331
 
340
- <form :if="revision()" class="space-y-6" @submit.prevent="saveSettings">
341
- <section class="p-5 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
342
- <div class="mb-5">
343
- <h2 class="font-semibold text-stone-900 dark:text-white">Sender and driver</h2>
344
- <p class="mt-1 text-sm text-stone-500 dark:text-neutral-400">These values control every mail sent through the framework singleton.</p>
345
- </div>
346
- <div class="grid gap-4 md:grid-cols-2">
347
- <Select
348
- v-model:value="driver"
349
- :options="driverOptions"
350
- label="Mail driver"
351
- placeholder=""
352
- required
353
- :error="fieldError('driver')"
354
- />
355
- <Input
356
- v-model:value="fromName"
357
- label="Sender name"
358
- placeholder="Stacks"
359
- :error="fieldError('fromName')"
360
- />
361
- <div class="md:col-span-2">
362
- <Input
363
- v-model:value="fromAddress"
364
- type="email"
365
- label="Sender email address"
366
- placeholder="no-reply@example.com"
332
+ <form :if="revision()" class="dashboard-settings-stack" @submit.prevent="saveSettings">
333
+ <SettingsGroup header="Sender and driver">
334
+ <div class="p-3">
335
+ <div class="grid gap-4 md:grid-cols-2">
336
+ <Select
337
+ v-model:value="driver"
338
+ :options="driverOptions"
339
+ label="Mail driver"
340
+ placeholder=""
367
341
  required
368
- :error="fieldError('fromAddress')"
342
+ :error="fieldError('driver')"
369
343
  />
370
- </div>
371
- </div>
372
- </section>
373
-
374
- <section :if="driver() === 'smtp'" class="p-5 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
375
- <div class="mb-5">
376
- <h2 class="font-semibold text-stone-900 dark:text-white">SMTP transport</h2>
377
- <p class="mt-1 text-sm text-stone-500 dark:text-neutral-400">SMTP (Simple Mail Transfer Protocol) is the standard way servers send email. Use any SMTP server: the local catcher from <code>buddy mail:dev</code>, Postmark SMTP, or a hosted mail server.</p>
378
- </div>
379
- <div class="grid gap-4 md:grid-cols-2">
380
- <Input v-model:value="smtpHost" label="Host" placeholder="smtp.example.com" required :error="fieldError('smtp.host')" />
381
- <Input v-model:value="smtpPort" type="number" label="Port" placeholder="587" required :error="fieldError('smtp.port')" />
382
- <Input v-model:value="smtpUsername" label="Username" placeholder="mailer@example.com" :error="fieldError('smtp.username')" />
383
- <Select v-model:value="smtpEncryption" :options="encryptionOptions" label="Encryption" placeholder="" hint="Match what your mail server expects. Most use STARTTLS on port 587." :error="fieldError('smtp.encryption')" />
384
- <div class="md:col-span-2">
385
344
  <Input
386
- v-model:value="smtpPassword"
387
- type="password"
388
- label="Password"
389
- autocomplete="new-password"
390
- :disabled="clearSmtpPassword()"
391
- :placeholder="smtpPasswordConfigured() ? 'Stored secret' : 'Enter a password'"
392
- :hint="secretHint(smtpPasswordConfigured(), clearSmtpPassword())"
393
- :error="fieldError('smtp.password')"
345
+ v-model:value="fromName"
346
+ label="Sender name"
347
+ placeholder="Stacks"
348
+ :error="fieldError('fromName')"
394
349
  />
395
- <label :if="smtpPasswordConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
396
- <input x-model="clearSmtpPassword" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
397
- Clear stored SMTP password
398
- </label>
350
+ <div class="md:col-span-2">
351
+ <Input
352
+ v-model:value="fromAddress"
353
+ type="email"
354
+ label="Sender email address"
355
+ placeholder="no-reply@example.com"
356
+ required
357
+ :error="fieldError('fromAddress')"
358
+ />
359
+ </div>
399
360
  </div>
400
361
  </div>
401
- </section>
402
-
403
- <section :if="driver() === 'ses'" class="p-5 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
404
- <div class="mb-5">
405
- <h2 class="font-semibold text-stone-900 dark:text-white">Amazon SES</h2>
406
- <p class="mt-1 text-sm text-stone-500 dark:text-neutral-400">Amazon SES (Simple Email Service) sends email through your AWS account. The access keys are optional when the server already has AWS credentials, from a local AWS profile or the role of the server it runs on.</p>
407
- </div>
408
- <div class="grid gap-4 md:grid-cols-2">
409
- <Input v-model:value="sesRegion" label="AWS region" placeholder="us-east-1" required :error="fieldError('ses.region')" />
410
- <Input v-model:value="sesAccessKeyId" label="Access key ID" placeholder="AKIA..." :error="fieldError('ses.accessKeyId')" />
411
- <div class="md:col-span-2">
412
- <Input
413
- v-model:value="sesSecretAccessKey"
414
- type="password"
415
- label="Secret access key"
416
- autocomplete="new-password"
417
- :disabled="clearSesSecretAccessKey()"
418
- :placeholder="sesSecretAccessKeyConfigured() ? 'Stored secret' : 'Optional with AWS profile or role'"
419
- :hint="secretHint(sesSecretAccessKeyConfigured(), clearSesSecretAccessKey())"
420
- :error="fieldError('ses.secretAccessKey')"
421
- />
422
- <label :if="sesSecretAccessKeyConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
423
- <input x-model="clearSesSecretAccessKey" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
424
- Clear stored AWS secret access key
425
- </label>
362
+ </SettingsGroup>
363
+
364
+ <div :if="driver() === 'smtp'">
365
+ <SettingsGroup header="SMTP transport">
366
+ <div class="p-3">
367
+ <p class="mb-3 mt-1 text-sm text-stone-500 dark:text-neutral-400">SMTP (Simple Mail Transfer Protocol) is the standard way servers send email. Use any SMTP server: the local catcher from <code>buddy mail:dev</code>, Postmark SMTP, or a hosted mail server.</p>
368
+ <div class="grid gap-4 md:grid-cols-2">
369
+ <Input v-model:value="smtpHost" label="Host" placeholder="smtp.example.com" required :error="fieldError('smtp.host')" />
370
+ <Input v-model:value="smtpPort" type="number" label="Port" placeholder="587" required :error="fieldError('smtp.port')" />
371
+ <Input v-model:value="smtpUsername" label="Username" placeholder="mailer@example.com" :error="fieldError('smtp.username')" />
372
+ <Select v-model:value="smtpEncryption" :options="encryptionOptions" label="Encryption" placeholder="" hint="Match what your mail server expects. Most use STARTTLS on port 587." :error="fieldError('smtp.encryption')" />
373
+ <div class="md:col-span-2">
374
+ <Input
375
+ v-model:value="smtpPassword"
376
+ type="password"
377
+ label="Password"
378
+ autocomplete="new-password"
379
+ :disabled="clearSmtpPassword()"
380
+ :placeholder="smtpPasswordConfigured() ? 'Stored secret' : 'Enter a password'"
381
+ :hint="secretHint(smtpPasswordConfigured(), clearSmtpPassword())"
382
+ :error="fieldError('smtp.password')"
383
+ />
384
+ <label :if="smtpPasswordConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
385
+ <input x-model="clearSmtpPassword" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
386
+ Clear stored SMTP password
387
+ </label>
388
+ </div>
389
+ </div>
426
390
  </div>
427
- </div>
428
- </section>
391
+ </SettingsGroup>
392
+ </div>
429
393
 
430
- <section :if="driver() === 'sendgrid'" class="p-5 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
431
- <div class="mb-5">
432
- <h2 class="font-semibold text-stone-900 dark:text-white">SendGrid</h2>
433
- <p class="mt-1 text-sm text-stone-500 dark:text-neutral-400">The API key is write-only and is never returned to the browser.</p>
434
- </div>
435
- <Input
436
- v-model:value="sendgridApiKey"
437
- type="password"
438
- label="API key"
439
- autocomplete="new-password"
440
- :disabled="clearSendgridApiKey()"
441
- :placeholder="sendgridApiKeyConfigured() ? 'Stored secret' : 'SG...'"
442
- :hint="secretHint(sendgridApiKeyConfigured(), clearSendgridApiKey())"
443
- :error="fieldError('sendgrid.apiKey')"
444
- />
445
- <label :if="sendgridApiKeyConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
446
- <input x-model="clearSendgridApiKey" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
447
- Clear stored SendGrid API key
448
- </label>
449
- </section>
394
+ <div :if="driver() === 'ses'">
395
+ <SettingsGroup header="Amazon SES">
396
+ <div class="p-3">
397
+ <p class="mb-3 mt-1 text-sm text-stone-500 dark:text-neutral-400">Amazon SES (Simple Email Service) sends email through your AWS account. The access keys are optional when the server already has AWS credentials, from a local AWS profile or the role of the server it runs on.</p>
398
+ <div class="grid gap-4 md:grid-cols-2">
399
+ <Input v-model:value="sesRegion" label="AWS region" placeholder="us-east-1" required :error="fieldError('ses.region')" />
400
+ <Input v-model:value="sesAccessKeyId" label="Access key ID" placeholder="AKIA..." :error="fieldError('ses.accessKeyId')" />
401
+ <div class="md:col-span-2">
402
+ <Input
403
+ v-model:value="sesSecretAccessKey"
404
+ type="password"
405
+ label="Secret access key"
406
+ autocomplete="new-password"
407
+ :disabled="clearSesSecretAccessKey()"
408
+ :placeholder="sesSecretAccessKeyConfigured() ? 'Stored secret' : 'Optional with AWS profile or role'"
409
+ :hint="secretHint(sesSecretAccessKeyConfigured(), clearSesSecretAccessKey())"
410
+ :error="fieldError('ses.secretAccessKey')"
411
+ />
412
+ <label :if="sesSecretAccessKeyConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
413
+ <input x-model="clearSesSecretAccessKey" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
414
+ Clear stored AWS secret access key
415
+ </label>
416
+ </div>
417
+ </div>
418
+ </div>
419
+ </SettingsGroup>
420
+ </div>
450
421
 
451
- <section :if="driver() === 'mailgun'" class="p-5 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
452
- <div class="mb-5">
453
- <h2 class="font-semibold text-stone-900 dark:text-white">Mailgun</h2>
454
- <p class="mt-1 text-sm text-stone-500 dark:text-neutral-400">Configure the verified sending domain and regional API host.</p>
455
- </div>
456
- <div class="grid gap-4 md:grid-cols-2">
457
- <Input v-model:value="mailgunDomain" label="Domain" placeholder="mg.example.com" required :error="fieldError('mailgun.domain')" />
458
- <Input v-model:value="mailgunEndpoint" label="API host" placeholder="api.mailgun.net" required :error="fieldError('mailgun.endpoint')" />
459
- <div class="md:col-span-2">
422
+ <div :if="driver() === 'sendgrid'">
423
+ <SettingsGroup header="SendGrid">
424
+ <div class="p-3">
425
+ <p class="mb-3 mt-1 text-sm text-stone-500 dark:text-neutral-400">The API key is write-only and is never returned to the browser.</p>
460
426
  <Input
461
- v-model:value="mailgunApiKey"
427
+ v-model:value="sendgridApiKey"
462
428
  type="password"
463
429
  label="API key"
464
430
  autocomplete="new-password"
465
- :disabled="clearMailgunApiKey()"
466
- :placeholder="mailgunApiKeyConfigured() ? 'Stored secret' : 'key-...'"
467
- :hint="secretHint(mailgunApiKeyConfigured(), clearMailgunApiKey())"
468
- :error="fieldError('mailgun.apiKey')"
431
+ :disabled="clearSendgridApiKey()"
432
+ :placeholder="sendgridApiKeyConfigured() ? 'Stored secret' : 'SG...'"
433
+ :hint="secretHint(sendgridApiKeyConfigured(), clearSendgridApiKey())"
434
+ :error="fieldError('sendgrid.apiKey')"
469
435
  />
470
- <label :if="mailgunApiKeyConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
471
- <input x-model="clearMailgunApiKey" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
472
- Clear stored Mailgun API key
436
+ <label :if="sendgridApiKeyConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
437
+ <input x-model="clearSendgridApiKey" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
438
+ Clear stored SendGrid API key
473
439
  </label>
474
440
  </div>
475
- </div>
476
- </section>
441
+ </SettingsGroup>
442
+ </div>
477
443
 
478
- <section :if="driver() === 'mailtrap'" class="p-5 bg-white dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
479
- <div class="mb-5">
480
- <h2 class="font-semibold text-stone-900 dark:text-white">Mailtrap</h2>
481
- <p class="mt-1 text-sm text-stone-500 dark:text-neutral-400">With an inbox ID, mail is captured in that testing inbox. Without one, it is delivered through the Sending API.</p>
482
- </div>
483
- <div class="grid gap-4 md:grid-cols-2">
484
- <div class="md:col-span-2">
485
- <Input v-model:value="mailtrapHost" type="url" label="API base URL (optional)" placeholder="Mailtrap's own host" :error="fieldError('mailtrap.host')" />
444
+ <div :if="driver() === 'mailgun'">
445
+ <SettingsGroup header="Mailgun">
446
+ <div class="p-3">
447
+ <p class="mb-3 mt-1 text-sm text-stone-500 dark:text-neutral-400">Configure the verified sending domain and regional API host.</p>
448
+ <div class="grid gap-4 md:grid-cols-2">
449
+ <Input v-model:value="mailgunDomain" label="Domain" placeholder="mg.example.com" required :error="fieldError('mailgun.domain')" />
450
+ <Input v-model:value="mailgunEndpoint" label="API host" placeholder="api.mailgun.net" required :error="fieldError('mailgun.endpoint')" />
451
+ <div class="md:col-span-2">
452
+ <Input
453
+ v-model:value="mailgunApiKey"
454
+ type="password"
455
+ label="API key"
456
+ autocomplete="new-password"
457
+ :disabled="clearMailgunApiKey()"
458
+ :placeholder="mailgunApiKeyConfigured() ? 'Stored secret' : 'key-...'"
459
+ :hint="secretHint(mailgunApiKeyConfigured(), clearMailgunApiKey())"
460
+ :error="fieldError('mailgun.apiKey')"
461
+ />
462
+ <label :if="mailgunApiKeyConfigured()" class="inline-flex gap-2 items-center mt-3 text-sm text-stone-600 dark:text-neutral-300">
463
+ <input x-model="clearMailgunApiKey" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
464
+ Clear stored Mailgun API key
465
+ </label>
466
+ </div>
467
+ </div>
486
468
  </div>
487
- <Input v-model:value="mailtrapInboxId" label="Testing inbox ID (optional)" placeholder="123456" :error="fieldError('mailtrap.inboxId')" />
488
- <Input
489
- v-model:value="mailtrapToken"
490
- type="password"
491
- label="API token"
492
- autocomplete="new-password"
493
- :disabled="clearMailtrapToken()"
494
- :placeholder="mailtrapTokenConfigured() ? 'Stored secret' : 'Enter a token'"
495
- :hint="secretHint(mailtrapTokenConfigured(), clearMailtrapToken())"
496
- :error="fieldError('mailtrap.token')"
497
- />
498
- <label :if="mailtrapTokenConfigured()" class="inline-flex gap-2 items-center md:col-span-2 text-sm text-stone-600 dark:text-neutral-300">
499
- <input x-model="clearMailtrapToken" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
500
- Clear stored Mailtrap API token
501
- </label>
502
- </div>
503
- </section>
469
+ </SettingsGroup>
470
+ </div>
471
+
472
+ <div :if="driver() === 'mailtrap'">
473
+ <SettingsGroup header="Mailtrap">
474
+ <div class="p-3">
475
+ <p class="mb-3 mt-1 text-sm text-stone-500 dark:text-neutral-400">With an inbox ID, mail is captured in that testing inbox. Without one, it is delivered through the Sending API.</p>
476
+ <div class="grid gap-4 md:grid-cols-2">
477
+ <div class="md:col-span-2">
478
+ <Input v-model:value="mailtrapHost" type="url" label="API base URL (optional)" placeholder="Mailtrap's own host" :error="fieldError('mailtrap.host')" />
479
+ </div>
480
+ <Input v-model:value="mailtrapInboxId" label="Testing inbox ID (optional)" placeholder="123456" :error="fieldError('mailtrap.inboxId')" />
481
+ <Input
482
+ v-model:value="mailtrapToken"
483
+ type="password"
484
+ label="API token"
485
+ autocomplete="new-password"
486
+ :disabled="clearMailtrapToken()"
487
+ :placeholder="mailtrapTokenConfigured() ? 'Stored secret' : 'Enter a token'"
488
+ :hint="secretHint(mailtrapTokenConfigured(), clearMailtrapToken())"
489
+ :error="fieldError('mailtrap.token')"
490
+ />
491
+ <label :if="mailtrapTokenConfigured()" class="inline-flex gap-2 items-center md:col-span-2 text-sm text-stone-600 dark:text-neutral-300">
492
+ <input x-model="clearMailtrapToken" type="checkbox" class="h-4 w-4 text-red-600 border-stone-300 rounded dark:border-neutral-600" />
493
+ Clear stored Mailtrap API token
494
+ </label>
495
+ </div>
496
+ </div>
497
+ </SettingsGroup>
498
+ </div>
504
499
 
505
500
  <section :if="driver() === 'log' || driver() === 'capture'" class="p-5 text-sm text-stone-600 dark:text-neutral-300 bg-stone-50 dark:bg-neutral-900 border border-stone-200 rounded-xl dark:border-neutral-700">
506
501
  <div class="flex gap-3 items-start">
@@ -514,7 +509,7 @@ onMount(() => void loadSettings())
514
509
 
515
510
  <div class="flex flex-col gap-3 items-start justify-between sm:flex-row sm:items-center">
516
511
  <p class="text-stone-500 text-xs dark:text-neutral-400">Saving writes each value to the file it comes from, and keeps a machine-local backup of the previous .env content.</p>
517
- <Button type="submit" :loading="isSaving()" :disabled="isBusy() || !isDirty()">Save mail settings</Button>
512
+ <Button type="submit" class="shrink-0 whitespace-nowrap" :loading="isSaving()" :disabled="isBusy() || !isDirty()">Save mail settings</Button>
518
513
  </div>
519
514
  </form>
520
515
  </div>
@@ -191,32 +191,37 @@ void loadFiles()
191
191
  </script>
192
192
 
193
193
  <template>
194
- <div class="flex flex-col gap-6 mx-auto pb-12 pt-6 px-6 max-w-7xl">
195
- <PageHeader
196
- title="Settings"
197
- description="Review and edit project configuration without losing comments or environment bindings"
198
- />
199
-
200
- <div class="grid gap-6 lg:grid-cols-[17rem_minmax(0,1fr)]">
201
- <Card variant="default" padding="none">
202
- <div class="p-4 border-b border-neutral-200/60 dark:border-white/5">
203
- <SearchFilter v-model:searchValue="configQuery" placeholder="Search config" ariaLabel="Search configuration" />
204
- </div>
194
+ <div class="dashboard-settings-stack">
195
+ <div :if="files().length > 0">
196
+ <SettingsGroup header="Project configuration">
197
+ <details class="dashboard-settings-config-picker">
198
+ <summary>
199
+ <span>Configuration file</span>
200
+ <span class="dashboard-settings-config-selection">
201
+ <span :text="selectedFile()?.title"></span>
202
+ <span class="i-f7-chevron-down" aria-hidden="true"></span>
203
+ </span>
204
+ </summary>
205
+ <div class="pt-2 px-2">
206
+ <SearchFilter v-model:searchValue="configQuery" placeholder="Search config" ariaLabel="Search configuration" />
207
+ </div>
205
208
 
206
- <nav class="overflow-y-auto p-2 max-h-[68vh]" aria-label="Configuration files">
207
- <button :for="file in filteredFiles"
208
- type="button"
209
- :class="selected() === file.name ? 'flex items-center gap-3 px-3 py-2.5 w-full text-left text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-500/10 rounded-lg' : 'flex items-center gap-3 px-3 py-2.5 w-full text-left text-neutral-700 dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-white/5 rounded-lg'"
210
- @click="requestSelectFile(file.name)"
211
- >
212
- <span class="flex-none h-4 w-4 i-hugeicons-settings-02"></span>
213
- <span class="flex-1 font-medium text-sm truncate">{{ file.title }}</span>
214
- <span class="text-[10px] text-neutral-500 dark:text-neutral-400">{{ file.size < 1024 ? file.size + ' B' : Math.round(file.size / 1024) + ' KB' }}</span>
215
- </button>
216
- </nav>
217
- </Card>
209
+ <nav class="overflow-y-auto p-2 max-h-[68vh]" aria-label="Configuration files">
210
+ <button :for="file in filteredFiles"
211
+ type="button"
212
+ :class="selected() === file.name ? 'flex items-center gap-3 px-3 py-2.5 w-full text-left text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-500/10 rounded-lg' : 'flex items-center gap-3 px-3 py-2.5 w-full text-left text-neutral-700 dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-white/5 rounded-lg'"
213
+ @click="requestSelectFile(file.name)"
214
+ >
215
+ <span class="flex-none h-4 w-4 i-hugeicons-settings-02"></span>
216
+ <span class="flex-1 font-medium text-sm truncate">{{ file.title }}</span>
217
+ <span class="text-[10px] text-neutral-500 dark:text-neutral-400">{{ file.size < 1024 ? file.size + ' B' : Math.round(file.size / 1024) + ' KB' }}</span>
218
+ </button>
219
+ </nav>
220
+ </details>
221
+ </SettingsGroup>
222
+ </div>
218
223
 
219
- <Card variant="default" padding="none">
224
+ <SettingsGroup>
220
225
  @if(loading())
221
226
  <div class="flex items-center justify-center min-h-80 text-neutral-500 dark:text-neutral-400">
222
227
  <span class="mr-2 h-5 w-5 animate-spin i-hugeicons-loading-03"></span>
@@ -235,7 +240,7 @@ void loadFiles()
235
240
  <p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">Add a TypeScript config file under config to manage it here.</p>
236
241
  </div>
237
242
  @elseif(selectedFile())
238
- <div class="flex flex-wrap gap-4 items-center justify-between px-6 py-5 border-b border-neutral-200/60 dark:border-white/5">
243
+ <div class="flex flex-wrap gap-4 items-center justify-between px-4 py-3 border-b border-neutral-200/60 dark:border-white/5">
239
244
  <div>
240
245
  <h2 class="font-semibold text-lg text-neutral-900 dark:text-white">{{ selectedFile()?.title }}</h2>
241
246
  <p class="mt-1 font-mono text-neutral-500 text-xs dark:text-neutral-400">config/{{ selectedFile()?.name }}.ts</p>
@@ -250,18 +255,18 @@ void loadFiles()
250
255
  </div>
251
256
 
252
257
  @if(message())
253
- <div class="mt-5 mx-6 px-4 py-3 text-green-700 text-sm dark:text-green-300 bg-green-50 dark:bg-green-500/10 border border-green-200 rounded-lg dark:border-green-500/20">
258
+ <div class="mt-3 mx-4 px-4 py-3 text-green-700 text-sm dark:text-green-300 bg-green-50 dark:bg-green-500/10 border border-green-200 rounded-lg dark:border-green-500/20">
254
259
  {{ message() }}
255
260
  </div>
256
261
  @endif
257
262
  @if(error())
258
- <div class="mt-5 mx-6 px-4 py-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-500/10 border border-red-200 rounded-lg dark:border-red-500/20">
263
+ <div class="mt-3 mx-4 px-4 py-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-500/10 border border-red-200 rounded-lg dark:border-red-500/20">
259
264
  {{ error() }}
260
265
  </div>
261
266
  @endif
262
267
 
263
268
  <form class="divide-neutral-200/60 divide-y dark:divide-white/5" @submit.prevent="save()">
264
- <div :for="field in fields" class="grid gap-3 sm:grid-cols-[minmax(10rem,0.8fr)_minmax(0,1.2fr)] sm:items-start px-6 py-5">
269
+ <div :for="field in fields" class="grid gap-3 sm:grid-cols-[minmax(10rem,0.8fr)_minmax(0,1.2fr)] sm:items-start px-4 py-3">
265
270
  <div>
266
271
  <label :for="'config-' + field.key" class="font-medium text-neutral-900 text-sm dark:text-white">{{ field.key }}</label>
267
272
  <p class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">{{ field.type }}</p>
@@ -299,8 +304,7 @@ void loadFiles()
299
304
  </div>
300
305
  </form>
301
306
  @endif
302
- </Card>
303
- </div>
307
+ </SettingsGroup>
304
308
 
305
309
  <ConfirmDialog
306
310
  :isOpen="Boolean(pendingSelection())"