Implement onboarding reset functionality and enhance backup features

- Added a new method to reset the onboarding state, allowing users to re-initiate the onboarding process.
- Integrated backup creation functionality, enabling users to create encrypted backups of their node identity.
- Updated API endpoints to handle onboarding reset and backup creation requests.
- Enhanced UI components to support the new onboarding reset and backup features, including error handling and user feedback.
- Introduced new dependencies for cryptographic operations and data encoding.
This commit is contained in:
Dorian
2026-03-02 08:34:13 +00:00
parent 94eb1e4283
commit 62d6c13764
23 changed files with 559 additions and 88 deletions

View File

@@ -111,16 +111,16 @@ function onUserActivity() {
function onKeyDown(e: KeyboardEvent) {
const isMac = navigator.platform.toUpperCase().includes('MAC')
const mod = isMac ? e.metaKey : e.ctrlKey
// Cmd+K / Ctrl+K or plain K (when not typing in input)
// Cmd+K / Ctrl+K only (modifier required - avoids accidental trigger when typing)
const target = e.target as HTMLElement
const isInput = target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable
if ((mod && e.key === 'k') || ((e.key === 'k' || e.key === 'K') && !isInput)) {
if (mod && e.key === 'k') {
e.preventDefault()
spotlightStore.toggle()
return
}
// Cmd+Shift+` / Ctrl+Shift+` or plain C - CLI popup
if ((mod && e.shiftKey && e.key === '`') || ((e.key === 'c' || e.key === 'C') && !isInput)) {
// Cmd+Shift+` / Ctrl+Shift+` or Cmd+Shift+C / Ctrl+Shift+C - CLI popup (modifier required)
if ((mod && e.shiftKey && e.key === '`') || (mod && e.shiftKey && (e.key === 'c' || e.key === 'C'))) {
e.preventDefault()
cliStore.toggle()
return