105 lines
3.3 KiB
HTML
105 lines
3.3 KiB
HTML
<section class="account-page">
|
|
<mat-card class="account-card" appearance="outlined">
|
|
<mat-card-header>
|
|
<mat-card-title>Willkommen, {{ auth.user()?.name || auth.user()?.email }}</mat-card-title>
|
|
<mat-card-subtitle>{{ auth.user()?.email }}</mat-card-subtitle>
|
|
</mat-card-header>
|
|
|
|
<mat-card-content>
|
|
<div class="status-row">
|
|
<mat-icon aria-hidden="true">verified_user</mat-icon>
|
|
<span>{{ auth.user()?.verified ? 'E-Mail verifiziert' : 'E-Mail nicht verifiziert' }}</span>
|
|
</div>
|
|
|
|
<div class="status-row">
|
|
<mat-icon aria-hidden="true">school</mat-icon>
|
|
<span>
|
|
{{ auth.user()?.onboardingCompleted ? 'Onboarding abgeschlossen' : 'Onboarding offen' }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mcp-key-panel">
|
|
<div class="mcp-key-header">
|
|
<div>
|
|
<h2>MCP Connector</h2>
|
|
<p>
|
|
@if (mcpApiKeyLoading()) {
|
|
Status wird geladen
|
|
} @else if (mcpApiKeyCreatedAt()) {
|
|
Key aktiv seit {{ formatDate(mcpApiKeyCreatedAt()!) }}
|
|
} @else {
|
|
Kein MCP-Key aktiv
|
|
}
|
|
</p>
|
|
</div>
|
|
<mat-icon aria-hidden="true">key</mat-icon>
|
|
</div>
|
|
|
|
@if (generatedMcpApiKey()) {
|
|
<div class="generated-key">
|
|
<code>{{ generatedMcpApiKey() }}</code>
|
|
<button
|
|
mat-icon-button
|
|
type="button"
|
|
aria-label="MCP-Key kopieren"
|
|
(click)="copyMcpApiKey()"
|
|
>
|
|
<mat-icon aria-hidden="true">content_copy</mat-icon>
|
|
</button>
|
|
</div>
|
|
<p class="key-hint">Der Key wird nur jetzt angezeigt.</p>
|
|
}
|
|
|
|
@if (mcpApiKeyMessage()) {
|
|
<p class="mcp-key-message">{{ mcpApiKeyMessage() }}</p>
|
|
}
|
|
|
|
<div class="mcp-key-actions">
|
|
<button
|
|
mat-flat-button
|
|
type="button"
|
|
[disabled]="mcpApiKeyLoading() || mcpApiKeySaving()"
|
|
(click)="createMcpApiKey()"
|
|
>
|
|
@if (mcpApiKeySaving()) {
|
|
<mat-progress-spinner mode="indeterminate" diameter="18" />
|
|
} @else {
|
|
<mat-icon aria-hidden="true">vpn_key</mat-icon>
|
|
}
|
|
{{ mcpApiKeyCreatedAt() ? 'Key rotieren' : 'Key erzeugen' }}
|
|
</button>
|
|
<button
|
|
mat-stroked-button
|
|
type="button"
|
|
[disabled]="!mcpApiKeyCreatedAt() || mcpApiKeyLoading() || mcpApiKeySaving()"
|
|
(click)="revokeMcpApiKey()"
|
|
>
|
|
<mat-icon aria-hidden="true">block</mat-icon>
|
|
Widerrufen
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</mat-card-content>
|
|
|
|
<mat-card-actions align="end">
|
|
<button
|
|
mat-stroked-button
|
|
type="button"
|
|
[disabled]="onboarding.saving()"
|
|
(click)="resetOnboarding()"
|
|
>
|
|
@if (onboarding.saving()) {
|
|
<mat-progress-spinner mode="indeterminate" diameter="18" />
|
|
} @else {
|
|
<mat-icon aria-hidden="true">restart_alt</mat-icon>
|
|
}
|
|
Onboarding neu starten
|
|
</button>
|
|
<button mat-stroked-button type="button" (click)="logout()">
|
|
<mat-icon aria-hidden="true">logout</mat-icon>
|
|
Logout
|
|
</button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</section>
|