From cb19925011d889c513e1bbedc446e399597e38a0 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Wed, 17 Apr 2024 14:06:05 +0100 Subject: feat(gui): work on home page, sort state (#1956) 1. Start on a home page, can sort onboarding/etc from there 2. Introduce zustand for state management. It's nice! Did a production build and clicked around for a while. Memory usage seems nice and chill. --- ui/src/state/models.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ui/src/state/models.ts (limited to 'ui/src/state/models.ts') diff --git a/ui/src/state/models.ts b/ui/src/state/models.ts new file mode 100644 index 00000000..f11ce651 --- /dev/null +++ b/ui/src/state/models.ts @@ -0,0 +1,34 @@ +export interface User { + username: string; +} + +export const DefaultUser: User = { + username: "", +}; + +export interface HomeInfo { + historyCount: number; + recordCount: number; + lastSyncTime: Date; +} + +export const DefaultHomeInfo: HomeInfo = { + historyCount: 0, + recordCount: 0, + lastSyncTime: new Date(), +}; + +export interface ShellHistory { + id: string; + timestamp: number; + command: string; + user: string; + host: string; + cwd: string; + duration: number; +} + +export interface Alias { + name: string; + value: string; +} -- cgit v1.3.1