-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): add provisional stores for user, watchhistory, favorit…
…es, config
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<ConfigStore>({ | ||
configLocation: '', | ||
isLoading: false, | ||
config: { | ||
id: '', | ||
siteName: '', | ||
description: '', | ||
footerText: '', | ||
player: '', | ||
assets: {}, | ||
content: [], | ||
menu: [], | ||
options: { | ||
shelveTitles: true, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Store } from 'pullstate'; | ||
|
||
type Favorite = { | ||
mediaId: string; | ||
}; | ||
|
||
type FavoritesStore = { | ||
favorites: Favorite[]; | ||
}; | ||
|
||
export const FavoritesStore = new Store<FavoritesStore>({ | ||
favorites: [{ mediaId: '' }], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Store } from 'pullstate'; | ||
|
||
type User = { | ||
name: string; | ||
}; | ||
|
||
type UserStore = { | ||
user: User; | ||
}; | ||
|
||
export const UserStore = new Store<UserStore>({ | ||
user: { | ||
name: '', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Store } from 'pullstate'; | ||
|
||
type WatchHistoryItem = { | ||
mediaId: string; | ||
}; | ||
|
||
type WatchHistoryStore = { | ||
watchHistory: WatchHistoryItem[]; | ||
}; | ||
|
||
export const WatchHistoryStore = new Store<WatchHistoryStore>({ | ||
watchHistory: [{ mediaId: '' }], | ||
}); |