- Remove sync preference welcome page, default to no-sync - Redesign vault-create home with nickname + nsec input - Add generate key button, visibility toggle, clipboard copy - Add vault file import with persistent snapshot list - Navigate to profile view after identity creation - Fix router state access for identity data passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
121 lines
3.1 KiB
HTML
121 lines
3.1 KiB
HTML
<div class="container">
|
|
<div class="logo-section">
|
|
<div class="logo-frame">
|
|
<img src="logo.svg" height="80" width="80" alt="" />
|
|
</div>
|
|
<span class="title">Plebeian Signer</span>
|
|
</div>
|
|
|
|
<!-- New Identity Section -->
|
|
<div class="section">
|
|
<h2 class="section-heading">Restore or Create New Identity</h2>
|
|
|
|
<span class="section-note">Create a new nostr identity or paste in your current nsec.</span>
|
|
|
|
<input
|
|
type="text"
|
|
class="form-control"
|
|
placeholder="nickname"
|
|
[(ngModel)]="nickname"
|
|
/>
|
|
|
|
<div class="input-group">
|
|
<input
|
|
#nsecInputElement
|
|
type="password"
|
|
class="form-control"
|
|
placeholder="nsec or hex private key"
|
|
[(ngModel)]="nsecInput"
|
|
(ngModelChange)="validateNsec()"
|
|
/>
|
|
<button
|
|
class="btn btn-outline-secondary"
|
|
type="button"
|
|
(click)="toggleVisibility(nsecInputElement)"
|
|
title="toggle visibility"
|
|
>
|
|
<i
|
|
class="bi"
|
|
[class.bi-eye]="nsecInputElement.type === 'password'"
|
|
[class.bi-eye-slash]="nsecInputElement.type === 'text'"
|
|
></i>
|
|
</button>
|
|
<button
|
|
class="btn btn-outline-secondary"
|
|
type="button"
|
|
(click)="copyToClipboard()"
|
|
title="copy to clipboard"
|
|
>
|
|
<i class="bi bi-clipboard"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="button-row">
|
|
<button
|
|
type="button"
|
|
class="btn btn-outline-secondary generate-btn"
|
|
(click)="generateKey()"
|
|
title="generate new key"
|
|
>
|
|
<span>generate</span>
|
|
<span>✨</span>
|
|
</button>
|
|
|
|
<button
|
|
type="button"
|
|
class="btn btn-primary continue-btn"
|
|
[disabled]="!isNsecValid || !nickname"
|
|
(click)="onContinueWithNsec()"
|
|
>
|
|
<span>Continue</span>
|
|
<i class="bi bi-arrow-right"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Import Section -->
|
|
<div class="section">
|
|
<h2 class="section-heading">Import a Vault</h2>
|
|
|
|
<input
|
|
#fileInput
|
|
type="file"
|
|
class="file-input"
|
|
accept=".json"
|
|
(change)="onFileSelected($event)"
|
|
/>
|
|
|
|
<div class="import-controls">
|
|
<button
|
|
type="button"
|
|
class="btn btn-outline-secondary file-btn"
|
|
(click)="fileInput.click()"
|
|
>
|
|
<i class="bi bi-folder2-open"></i>
|
|
<span>Add vault file</span>
|
|
</button>
|
|
|
|
@if (snapshots.length > 0) {
|
|
<div class="import-row">
|
|
<select class="form-select" [(ngModel)]="selectedSnapshot">
|
|
@for (snapshot of snapshots; track snapshot.id) {
|
|
<option [ngValue]="snapshot">
|
|
{{ snapshot.fileName }} ({{ snapshot.identityCount }} identities)
|
|
</option>
|
|
}
|
|
</select>
|
|
<button
|
|
type="button"
|
|
class="btn btn-primary icon-btn"
|
|
[disabled]="!selectedSnapshot"
|
|
(click)="onImport()"
|
|
title="import vault"
|
|
>
|
|
<i class="bi bi-arrow-right"></i>
|
|
</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|