@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.
- package/ai/skills/stacks-ai/SKILL.md +7 -2
- package/ai/skills/stacks-api/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +9 -2
- package/ai/skills/stacks-deploy/SKILL.md +8 -0
- package/ai/skills/stacks-desktop/SKILL.md +31 -0
- package/ai/skills/stacks-development/SKILL.md +5 -7
- package/ai/skills/stacks-health/SKILL.md +19 -9
- package/ai/skills/stacks-native/CATALOG.md +24 -24
- package/ai/skills/stacks-newsletter/SKILL.md +10 -4
- package/ai/skills/stacks-router/SKILL.md +2 -2
- package/ai/skills/stacks-routes/SKILL.md +2 -2
- package/ai/skills/stacks-scheduler/SKILL.md +16 -2
- package/ai/skills/stacks-security/SKILL.md +24 -0
- package/ai/skills/stacks-socials/SKILL.md +17 -1
- package/ai/skills/stacks-storage/SKILL.md +34 -15
- package/app/Actions/SubscriberEmailAction.ts +26 -10
- package/app/Jobs/Inspire.ts +33 -0
- package/functions/dashboard-sidebar-order.ts +3 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +8 -7
- package/project/storage/framework/types/request-context.d.ts +3 -0
- package/resources/components/Dashboard/Billing/BillingPaymentMethodsPanel.stx +3 -10
- package/resources/components/Dashboard/Billing/BillingPlanSummary.stx +3 -10
- package/resources/components/Dashboard/Billing/BillingSettings.stx +13 -15
- package/resources/components/Dashboard/Billing/BillingTransactionHistory.stx +2 -9
- package/resources/components/Dashboard/DashboardSectionLanding.stx +72 -0
- package/resources/components/Dashboard/DashboardSectionSidebar.stx +78 -0
- package/resources/components/Dashboard/GlobalSearch.stx +3 -1
- package/resources/components/Dashboard/Home/DashboardHome.stx +14 -1
- package/resources/components/Dashboard/Settings/AppearanceSettingsDashboard.stx +21 -92
- package/resources/components/Dashboard/Settings/DashboardSettingsFrame.stx +98 -0
- package/resources/components/Dashboard/Settings/DashboardThemePicker.stx +4 -9
- package/resources/components/Dashboard/Settings/MailSettingsDashboard.stx +162 -167
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +34 -30
- package/resources/components/Dashboard/Settings/SoftwareUpdateDashboard.stx +229 -0
- package/resources/components/Dashboard/UI/DashboardNavigationCards.stx +44 -0
- package/resources/components/Dashboard/UI/Input.stx +1 -0
- package/resources/components/Dashboard/UI/Select.stx +1 -0
- package/resources/components/Dashboard/UI/Table.stx +1 -0
- package/resources/components/Dashboard/UI/Textarea.stx +1 -0
- package/resources/components/Marketing/SubscribeForm.stx +29 -8
- package/resources/functions/dashboard/section-landing.ts +201 -0
- package/resources/functions/dashboard/section-navigation.ts +95 -0
- package/styles/dashboard-theme.css +778 -9
- package/views/dashboard/composables/dashboard-themes.ts +5 -5
- package/views/dashboard/composables/settings-window.ts +116 -0
- package/views/dashboard/composables/useAppearance.ts +13 -4
- package/views/dashboard/composables/useDashboardThemes.ts +2 -1
- package/views/dashboard/composables/useSettingsWindow.ts +23 -0
- package/views/dashboard/layouts/default.stx +32 -20
- package/views/dashboard/layouts/settings.stx +48 -0
- package/views/dashboard/sections/[section].stx +19 -0
- package/views/dashboard/settings/appearance.stx +4 -2
- package/views/dashboard/settings/billing.stx +3 -4
- package/views/dashboard/settings/index.stx +4 -2
- package/views/dashboard/settings/mail.stx +3 -3
- 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="
|
|
307
|
-
<
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
<
|
|
316
|
-
</
|
|
317
|
-
|
|
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="
|
|
341
|
-
<
|
|
342
|
-
<div class="
|
|
343
|
-
<
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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('
|
|
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="
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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
|
-
<
|
|
396
|
-
<
|
|
397
|
-
|
|
398
|
-
|
|
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
|
-
</
|
|
402
|
-
|
|
403
|
-
<
|
|
404
|
-
<
|
|
405
|
-
<
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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
|
-
</
|
|
428
|
-
</
|
|
391
|
+
</SettingsGroup>
|
|
392
|
+
</div>
|
|
429
393
|
|
|
430
|
-
<
|
|
431
|
-
<
|
|
432
|
-
<
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
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
|
-
<
|
|
452
|
-
<
|
|
453
|
-
<
|
|
454
|
-
|
|
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="
|
|
427
|
+
v-model:value="sendgridApiKey"
|
|
462
428
|
type="password"
|
|
463
429
|
label="API key"
|
|
464
430
|
autocomplete="new-password"
|
|
465
|
-
:disabled="
|
|
466
|
-
:placeholder="
|
|
467
|
-
:hint="secretHint(
|
|
468
|
-
:error="fieldError('
|
|
431
|
+
:disabled="clearSendgridApiKey()"
|
|
432
|
+
:placeholder="sendgridApiKeyConfigured() ? 'Stored secret' : 'SG...'"
|
|
433
|
+
:hint="secretHint(sendgridApiKeyConfigured(), clearSendgridApiKey())"
|
|
434
|
+
:error="fieldError('sendgrid.apiKey')"
|
|
469
435
|
/>
|
|
470
|
-
<label :if="
|
|
471
|
-
<input x-model="
|
|
472
|
-
Clear stored
|
|
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
|
-
</
|
|
476
|
-
</
|
|
441
|
+
</SettingsGroup>
|
|
442
|
+
</div>
|
|
477
443
|
|
|
478
|
-
<
|
|
479
|
-
<
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
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
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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="
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
303
|
-
</div>
|
|
307
|
+
</SettingsGroup>
|
|
304
308
|
|
|
305
309
|
<ConfirmDialog
|
|
306
310
|
:isOpen="Boolean(pendingSelection())"
|