diff --git a/src/state/ConfigStore.ts b/src/state/ConfigStore.ts new file mode 100644 index 000000000..09a27ba68 --- /dev/null +++ b/src/state/ConfigStore.ts @@ -0,0 +1,26 @@ +import { Store } from 'pullstate'; +import type { Config } from 'types/Config'; + +type ConfigStore = { + configLocation: string; + isLoading: boolean; + config: Config; +}; + +export const ConfigStore = new Store({ + configLocation: '', + isLoading: false, + config: { + id: '', + siteName: '', + description: '', + footerText: '', + player: '', + assets: {}, + content: [], + menu: [], + options: { + shelveTitles: true, + }, + }, +}); diff --git a/src/state/FavoritesStore.ts b/src/state/FavoritesStore.ts new file mode 100644 index 000000000..279a76af2 --- /dev/null +++ b/src/state/FavoritesStore.ts @@ -0,0 +1,13 @@ +import { Store } from 'pullstate'; + +type Favorite = { + mediaId: string; +}; + +type FavoritesStore = { + favorites: Favorite[]; +}; + +export const FavoritesStore = new Store({ + favorites: [{ mediaId: '' }], +}); diff --git a/src/state/UserStore.ts b/src/state/UserStore.ts new file mode 100644 index 000000000..8d298dfb5 --- /dev/null +++ b/src/state/UserStore.ts @@ -0,0 +1,15 @@ +import { Store } from 'pullstate'; + +type User = { + name: string; +}; + +type UserStore = { + user: User; +}; + +export const UserStore = new Store({ + user: { + name: '', + }, +}); diff --git a/src/state/WatchHistoryStore.ts b/src/state/WatchHistoryStore.ts new file mode 100644 index 000000000..bd5c4bcd9 --- /dev/null +++ b/src/state/WatchHistoryStore.ts @@ -0,0 +1,13 @@ +import { Store } from 'pullstate'; + +type WatchHistoryItem = { + mediaId: string; +}; + +type WatchHistoryStore = { + watchHistory: WatchHistoryItem[]; +}; + +export const WatchHistoryStore = new Store({ + watchHistory: [{ mediaId: '' }], +});