2021-01-03 21:53:51 +00:00
|
|
|
const storedTagFilter = localStorage.getItem('tagFilter');
|
2020-03-02 02:41:41 +00:00
|
|
|
const storedBatch = localStorage.getItem('batch');
|
2020-03-23 00:43:49 +00:00
|
|
|
const storedSfw = localStorage.getItem('sfw');
|
|
|
|
const storedTheme = localStorage.getItem('theme');
|
2019-11-15 01:37:17 +00:00
|
|
|
|
2021-02-22 01:33:39 +00:00
|
|
|
const deviceTheme = window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
|
|
|
2019-11-15 01:37:17 +00:00
|
|
|
export default {
|
2021-01-03 21:53:51 +00:00
|
|
|
tagFilter: storedTagFilter ? storedTagFilter.split(',') : [],
|
2020-05-14 02:26:05 +00:00
|
|
|
range: 'latest',
|
|
|
|
batch: storedBatch || 'all',
|
|
|
|
sfw: storedSfw === 'true' || false,
|
2021-02-22 01:33:39 +00:00
|
|
|
theme: storedTheme || deviceTheme,
|
2021-04-22 17:44:23 +00:00
|
|
|
notifications: [],
|
2019-11-15 01:37:17 +00:00
|
|
|
};
|