2026-02-12 08:35:22 +00:00
|
|
|
<.header>
|
2026-02-15 10:53:15 +00:00
|
|
|
{if @live_action == :new,
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
do: "Connect to #{@provider.name}",
|
|
|
|
|
else: "#{@provider.name} settings"}
|
2026-02-12 08:35:22 +00:00
|
|
|
</.header>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-form-narrow">
|
2026-02-12 08:35:22 +00:00
|
|
|
<%= if @live_action == :new do %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<p class="admin-text-secondary" style="margin-bottom: 1.5rem;">
|
|
|
|
|
{@provider.name} is a print-on-demand service that prints and ships products for you.
|
|
|
|
|
Connect your account to automatically import your products into your shop.
|
|
|
|
|
</p>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-callout">
|
|
|
|
|
<p class="admin-callout-title">Get your API key from {@provider.name}:</p>
|
|
|
|
|
<ol class="admin-callout-list">
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
<li>
|
|
|
|
|
<a href={@provider.login_url} target="_blank" rel="noopener" class="admin-link">
|
|
|
|
|
Log in to {@provider.name}
|
|
|
|
|
</a>
|
|
|
|
|
(or <a href={@provider.signup_url} target="_blank" rel="noopener" class="admin-link">create a free account</a>)
|
|
|
|
|
</li>
|
|
|
|
|
<li :for={step <- @provider.setup_steps}>
|
|
|
|
|
{raw(step)}
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
2026-02-12 08:35:22 +00:00
|
|
|
<% end %>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
2026-02-12 08:35:22 +00:00
|
|
|
<.form for={@form} id="provider-form" phx-change="validate" phx-submit="save">
|
2026-02-15 10:53:15 +00:00
|
|
|
<input type="hidden" name="provider_connection[provider_type]" value={@provider_type} />
|
2026-01-31 22:08:34 +00:00
|
|
|
|
2026-02-12 08:35:22 +00:00
|
|
|
<.input
|
|
|
|
|
field={@form[:api_key]}
|
|
|
|
|
type="password"
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
label={"#{@provider.name} API key"}
|
2026-02-12 08:35:22 +00:00
|
|
|
placeholder={
|
|
|
|
|
if @live_action == :edit,
|
|
|
|
|
do: "Leave blank to keep current key",
|
|
|
|
|
else: "Paste your key here"
|
|
|
|
|
}
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
/>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-inline-group">
|
2026-02-12 08:35:22 +00:00
|
|
|
<button
|
|
|
|
|
type="button"
|
2026-02-17 23:05:01 +00:00
|
|
|
class="admin-btn admin-btn-outline admin-btn-sm"
|
2026-02-12 08:35:22 +00:00
|
|
|
phx-click="test_connection"
|
|
|
|
|
disabled={@testing}
|
|
|
|
|
>
|
|
|
|
|
<.icon
|
|
|
|
|
name={if @testing, do: "hero-arrow-path", else: "hero-signal"}
|
|
|
|
|
class={if @testing, do: "size-4 animate-spin", else: "size-4"}
|
|
|
|
|
/>
|
|
|
|
|
{if @testing, do: "Checking...", else: "Check connection"}
|
|
|
|
|
</button>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<%= if @test_result do %>
|
2026-02-12 08:35:22 +00:00
|
|
|
<%= case @test_result do %>
|
2026-02-15 10:53:15 +00:00
|
|
|
<% {:ok, _info} -> %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<span class="admin-status-success">
|
2026-02-15 10:53:15 +00:00
|
|
|
<.icon name="hero-check-circle" class="size-4" />
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
Connected to {connection_name(@test_result) || @provider.name}
|
2026-02-12 08:35:22 +00:00
|
|
|
</span>
|
|
|
|
|
<% {:error, reason} -> %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<span class="admin-status-error">
|
2026-02-12 08:35:22 +00:00
|
|
|
<.icon name="hero-x-circle" class="size-4" />
|
|
|
|
|
{format_error(reason)}
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<% end %>
|
2026-02-12 08:35:22 +00:00
|
|
|
</div>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
2026-02-12 08:35:22 +00:00
|
|
|
<%= if @live_action == :edit do %>
|
|
|
|
|
<.input field={@form[:enabled]} type="checkbox" label="Connection enabled" />
|
|
|
|
|
<% end %>
|
2026-01-31 22:08:34 +00:00
|
|
|
|
refactor admin CSS: replace utility classes with semantic styles
Replace Tailwind utility soup across admin templates with semantic
CSS classes. Add layout primitives (stack, row, cluster, grid),
extract JS transition helpers into transitions.css, and refactor
core_components, layouts, settings, newsletter, order_show, providers,
and theme editor templates.
Utility occurrences reduced from 290+ to 127 across admin files.
All 1679 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:15:25 +00:00
|
|
|
<div class="admin-form-actions">
|
2026-02-12 08:35:22 +00:00
|
|
|
<.button type="submit" disabled={@testing}>
|
2026-02-15 10:53:15 +00:00
|
|
|
{if @live_action == :new,
|
add setup onboarding page, dashboard launch checklist, provider registry
- new /setup page with three-section onboarding (account, provider, payments)
- dashboard launch checklist with progress bar, go-live, dismiss
- provider registry on Provider module (single source of truth for metadata)
- payments registry for Stripe
- setup context made provider-agnostic (provider_connected, theme_customised, etc.)
- admin provider pages now fully registry-driven (no hardcoded provider names)
- auth flow: fresh installs redirect to /setup, signed_in_path respects setup state
- removed old /admin/setup wizard
- 840 tests, 0 failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:34:06 +00:00
|
|
|
do: "Connect to #{@provider.name}",
|
2026-02-15 10:53:15 +00:00
|
|
|
else: "Save changes"}
|
2026-02-12 08:35:22 +00:00
|
|
|
</.button>
|
2026-02-17 23:05:01 +00:00
|
|
|
<.link navigate={~p"/admin/providers"} class="admin-btn admin-btn-ghost">
|
2026-02-12 08:35:22 +00:00
|
|
|
Cancel
|
|
|
|
|
</.link>
|
|
|
|
|
</div>
|
|
|
|
|
</.form>
|
|
|
|
|
</div>
|