37 lines
2.1 KiB
Plaintext
37 lines
2.1 KiB
Plaintext
---
|
|
import Admin from '../../../layouts/Admin.astro';
|
|
import { driverName } from '../../../lib/store.js';
|
|
const driver = driverName();
|
|
const stripeReal = /^sk_(test|live)_[A-Za-z0-9]{16,}/.test((process.env.STRIPE_SECRET_KEY||'').trim());
|
|
const umamiOn = !!process.env.UMAMI_WEBSITE_ID;
|
|
const row = (label, ok, okText, offText) => ({ label, ok, okText, offText });
|
|
const rows = [
|
|
row('Datenspeicher', true, driver==='directus'?'Directus (Headless-CMS)':'SQLite (eingebettet)', ''),
|
|
row('Stripe-Zahlungen', stripeReal, 'Test/Live-Key gesetzt', 'Demo-Modus (kein Key)'),
|
|
row('Umami-Analytics', umamiOn, 'Tracking aktiv', 'Website-ID fehlt'),
|
|
];
|
|
---
|
|
<Admin title="Einstellungen" active="einstellungen" crumbs={[{label:'Einstellungen'}]}>
|
|
<div class="s-stack">
|
|
<div class="s-card">
|
|
<div class="s-card-head">Shop-Konfiguration</div>
|
|
<div style="padding:6px 0">
|
|
{rows.map((r) => (
|
|
<div style="display:flex;justify-content:space-between;align-items:center;padding:14px 20px;border-bottom:1px solid var(--s-border)">
|
|
<div><div style="font-weight:600;color:var(--s-ink)">{r.label}</div><div class="s-muted" style="font-size:12px">{r.ok ? r.okText : r.offText}</div></div>
|
|
<span class={`s-badge ${r.ok?'green':'amber'}`}>{r.ok?'Verbunden':'Demo'}</span>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
<div class="s-card s-card-pad">
|
|
<p class="s-section-title">Stripe aktivieren</p>
|
|
<p class="s-muted" style="margin-top:8px;max-width:64ch">Hinterlege <code>STRIPE_SECRET_KEY</code> und <code>STRIPE_PUBLIC_KEY</code> (Test- oder Live-Keys) als Environment-Variablen in Coolify und deploye neu. Solange kein gültiger Key gesetzt ist, läuft der Checkout im Demo-Modus und zeigt eine „Bestellung erfolgreich"-Seite ohne echte Zahlung.</p>
|
|
</div>
|
|
<div class="s-card s-card-pad">
|
|
<p class="s-section-title">Hinweis</p>
|
|
<p class="s-muted" style="margin-top:8px;max-width:64ch">Dies ist eine Demo-Umgebung. Backend-Look angelehnt an Shopify zur schnellen Orientierung; Daten sind Beispieldaten.</p>
|
|
</div>
|
|
</div>
|
|
</Admin>
|