Format with prettier. Use screen mode for invitation import - dialog mode is broken.

This commit is contained in:
2026-03-23 10:15:48 +00:00
parent 7fd89c5663
commit b475b23beb
47 changed files with 1718 additions and 1098 deletions

View File

@@ -3,9 +3,9 @@
* Simplified to render TUI immediately and let it handle AppService creation.
*/
import React from 'react';
import { render, type Instance } from 'ink';
import { App as AppComponent } from './tui/App.js';
import React from "react";
import { render, type Instance } from "ink";
import { App as AppComponent } from "./tui/App.js";
/**
* Configuration options for the CLI application.
@@ -28,7 +28,7 @@ export interface AppConfig {
export class App {
/** Ink render instance */
private inkInstance: Instance | null = null;
/** Application configuration */
private config: AppConfig;
@@ -48,13 +48,14 @@ export class App {
static async create(config: Partial<AppConfig> = {}): Promise<App> {
// Set default configuration
const fullConfig: AppConfig = {
syncServerUrl: config.syncServerUrl ?? 'http://localhost:3000',
databasePath: config.databasePath ?? './',
databaseFilename: config.databaseFilename ?? 'xo-wallet.db',
invitationStoragePath: config.invitationStoragePath ?? './xo-invitations.db',
syncServerUrl: config.syncServerUrl ?? "http://localhost:3000",
databasePath: config.databasePath ?? "./",
databaseFilename: config.databaseFilename ?? "xo-wallet.db",
invitationStoragePath:
config.invitationStoragePath ?? "./xo-invitations.db",
};
console.log('Full config:', fullConfig);
console.log("Full config:", fullConfig);
const app = new App(fullConfig);
await app.start();
@@ -71,7 +72,7 @@ export class App {
this.inkInstance = render(
React.createElement(AppComponent, {
config: this.config,
})
}),
);
// Wait for the app to exit