diff options
Diffstat (limited to 'ui/src/state/store.ts')
| -rw-r--r-- | ui/src/state/store.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/src/state/store.ts b/ui/src/state/store.ts index c6d3c152..39ee0096 100644 --- a/ui/src/state/store.ts +++ b/ui/src/state/store.ts @@ -58,7 +58,7 @@ export interface AtuinState { setCurrentRunbook: (id: String) => void; setPtyTerm: (pty: string, terminal: any) => void; - newPtyTerm: (pty: string, runbook: string) => TerminalData; + newPtyTerm: (pty: string) => TerminalData; cleanupPtyTerm: (pty: string) => void; terminals: { [pty: string]: TerminalData }; @@ -125,11 +125,17 @@ let state = (set: any, get: any): AtuinState => ({ refreshHomeInfo: () => { invoke("home_info") .then((res: any) => { + console.log(res); set({ homeInfo: { historyCount: res.history_count, recordCount: res.record_count, lastSyncTime: (res.last_sync && parseISO(res.last_sync)) || null, + recentCommands: res.recent_commands, + topCommands: res.top_commands.map((top: any) => ({ + command: top[0], + count: top[1], + })), }, }); }) |
