Format with prettier. Use screen mode for invitation import - dialog mode is broken.
This commit is contained in:
21
src/app.ts
21
src/app.ts
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user