Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(desktop): add mainWindowUIStore for expanded state persistence

Richie McIlroy7daf75d72966
diff --git a/apps/desktop/src/store.ts b/apps/desktop/src/store.ts
index c7c11444c..905e951da 100644
--- a/apps/desktop/src/store.ts
+++ b/apps/desktop/src/store.ts
@@ -40,6 +40,10 @@ export type UserProfileStore = {
updatedAt: number;
};
+export type MainWindowUIStore = {
+ expanded: boolean;
+};
+
let _store: Promise<Store> | undefined;
const store = () => {
if (!_store) {
@@ -96,6 +100,10 @@ export const presetsStore = declareStore<PresetsStore>("presets");
export const authStore = declareStore<AuthStore>("auth");
export const automationsStore = declareStore<AutomationsStore>("automations");
export const userProfileStore = declareStore<UserProfileStore>("user_profile");
+export const mainWindowUIStore = declareStore<MainWindowUIStore>(
+ "main_window_ui",
+ { expanded: false },
+);
export const hotkeysStore = declareStore<HotkeysStore>("hotkeys");
export const generalSettingsStore =
declareStore<GeneralSettingsStore>("general_settings");