summaryrefslogtreecommitdiff
path: root/web/js/state.js
blob: f0879c11d89ad29c2eb18b2a66e72f5a7158571d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export const state = {
  user: null,
  sets: [],
  selectedSetId: null,
  selectedSetIds: [], // multi-selection
  media: [],
  filters: {
    type: '',
    search: '',
    favorites: false,
    tags: '',
    sort: '',
    minDuration: '',
    maxDuration: '',
    minFileSize: '',
    maxFileSize: '',
  },
  isAdmin: false,
  folderPath: '',   // current subfolder path within the selected set
  sharesCurrentRow: -1,
};

export function getState() { return state; }
export function setMedia(list) { state.media = list; }