summaryrefslogtreecommitdiff
path: root/web/js/state.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/state.js')
-rw-r--r--web/js/state.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/js/state.js b/web/js/state.js
new file mode 100644
index 0000000..6cdfe1d
--- /dev/null
+++ b/web/js/state.js
@@ -0,0 +1,11 @@
+export const state = {
+ user: null,
+ sets: [],
+ selectedSetId: null,
+ media: [],
+ filters: { type: '', search: '', favorites: false, tags: '', sort: 'name' },
+ isAdmin: false,
+};
+
+export function getState() { return state; }
+export function setMedia(list) { state.media = list; }