2021-01-03 21:53:51 +00:00
|
|
|
const storedTagFilter = localStorage.getItem('tagFilter');
|
2022-11-28 02:33:46 +00:00
|
|
|
const storedSummaryFormat = localStorage.getItem('summaryFormat');
|
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';
|
|
|
|
|
2022-11-28 02:33:46 +00:00
|
|
|
const defaultSummaryFormat = [
|
|
|
|
{
|
|
|
|
delimiter: ' - ',
|
|
|
|
segments: [
|
|
|
|
{
|
|
|
|
prop: 'channel',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'title',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
delimiter: ', ',
|
|
|
|
bracket: '()',
|
|
|
|
segments: [
|
|
|
|
{
|
|
|
|
prop: 'actors',
|
|
|
|
delimiter: ', ',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'date',
|
|
|
|
format: 'DD-MM-YYYY',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2019-11-15 01:37:17 +00:00
|
|
|
export default {
|
2021-01-03 21:53:51 +00:00
|
|
|
tagFilter: storedTagFilter ? storedTagFilter.split(',') : [],
|
2022-11-28 02:33:46 +00:00
|
|
|
summaryFormat: storedSummaryFormat ? JSON.parse(storedSummaryFormat) : defaultSummaryFormat,
|
|
|
|
defaultSummaryFormat,
|
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,
|
2019-11-15 01:37:17 +00:00
|
|
|
};
|