markemacht/resources/views/components/passkey-registration.blade.php
Kevin Adametz 2a617e09cc
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (8.3) (push) Waiting to run
tests / ci (8.4) (push) Waiting to run
tests / ci (8.5) (push) Waiting to run
Initial commit: Laravel-Skelett + Markenwissen-Verfassung + markemacht.de Web
Erfasst den vollständigen Projektstand mit drei Hauptbereichen:

1. Laravel 11 Application-Skelett
   - Standard-Setup (app/, bootstrap/, config/, database/, public/, resources/, routes/, storage/, tests/)
   - Composer + npm Konfiguration
   - Devcontainer für Laravel Sail (PHP/MySQL/Redis)
   - GitHub Actions Workflows (lint + tests)
   - Tailwind/Vite Build-Pipeline

2. docs/ – Wissensbasis "Marke macht." (Methodik-Verfassung)
   Stand nach Pflegerunde 2026-05-28:
   - 00_Methodik-Verfassung: Dok. 000 (v2.0.2) bis Dok. 013 (NEU) + Anhänge
   - 10_Quellen-Original: Wala, Sharp, Simon (read-only Quellen)
   - 20_Markenwissen: 25 abgeleitete MW-Dokumente (Wala_MW-WAL, Sharp_MW-HBG, Simon_MW-SIM)
   - 30_Synthese: Markenwissen_I_Synthese_Gesamt + Scorecard-Regeln
   - 40_Implementierung: 011b-Erweiterung
   - _Steuerung: 00_START_HIER, Serienübersicht, CHANGELOG.md

   Letzte methodische Eingriffe:
   - Methodik-Update v2.0 (Ownership Autorenschaft/Anwendung, Geltungsbereich Kernthese,
     Score-Ebenen DNA-Reifegrad, Preislogik Governance-Scope)
   - Dok. 013 NEU: Akquise- & Conversion-Logik (Auffahrten statt Funnel)
   - Rebranding brandwork.io → Brand Rules (brand-rules.com)
   - Schichtverletzungen behoben, Ordner-Symmetrie hergestellt, Verweise konsolidiert

3. _markemacht.de/ – Web-Frontend Design-Sandbox
   - Statische HTML-Entwürfe (Startseite, Methode, Manifest, Denken, Blog)
   - Design-System (warm_intellectualism, based_web_design)
   - Assets (CSS, JS, Favicon)

Konfiguration:
- .gitignore um .DS_Store und Thumbs.db erweitert
- Lokale Git-Identity gesetzt: Kevin Adametz <kevin.adametz@me.com>
- .env wird ignoriert (nur .env.example versioniert)

Konfliktregel: Bei Spannung zwischen Code und Methodik gilt die Methodik (Dok. 000).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 16:01:54 +00:00

94 lines
3 KiB
PHP

@assets
@vite('resources/js/passkeys.js')
@endassets
<div
x-data="{
supported: false,
showForm: false,
name: '',
loading: false,
error: null,
updateSupport() {
this.supported = Boolean(window.Passkeys?.isSupported());
},
init() {
this.updateSupport();
window.addEventListener('passkeys:ready', () => this.updateSupport(), { once: true });
},
async register() {
if (!this.name.trim()) return;
this.loading = true;
this.error = null;
try {
await window.Passkeys.register({ name: this.name });
this.name = '';
this.showForm = false;
await $wire.loadPasskeys();
} catch (e) {
if (e.constructor?.name !== 'UserCancelledError') {
this.error = e.message;
}
} finally {
this.loading = false;
}
},
cancel() {
this.showForm = false;
this.name = '';
this.error = null;
},
}"
>
<template x-if="!supported">
<flux:text>{{ __('Passkeys are not supported in this browser.') }}</flux:text>
</template>
<template x-if="supported && !showForm">
<div>
<flux:button
variant="primary"
icon="plus"
x-on:click="showForm = true"
>
{{ __('Add passkey') }}
</flux:button>
</div>
</template>
<template x-if="supported && showForm">
<div class="space-y-4 rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 p-4">
<flux:input
label="{{ __('Passkey name') }}"
x-model="name"
placeholder="{{ __('e.g., MacBook Pro, iPhone') }}"
x-on:keydown.enter.prevent="register()"
x-ref="passkeyNameInput"
x-init="$nextTick(() => $refs.passkeyNameInput?.focus())"
/>
<flux:text class="!mt-1">{{ __('Give this passkey a name to help you identify it later.') }}</flux:text>
<p x-show="error" x-text="error" x-cloak class="text-sm text-red-600 dark:text-red-400"></p>
<div class="flex gap-2">
<flux:button
variant="primary"
x-on:click="register()"
x-bind:disabled="loading || !name.trim()"
>
<span x-show="!loading">{{ __('Register passkey') }}</span>
<span x-show="loading" x-cloak>{{ __('Registering...') }}</span>
</flux:button>
<flux:button
variant="ghost"
x-on:click="cancel()"
>
{{ __('Cancel') }}
</flux:button>
</div>
</div>
</template>
</div>