2022-01-02 20:30:22 +03:00
|
|
|
PetiteVue.createApp({
|
|
|
|
$delimiters: ['${', '}'],
|
2022-04-18 12:39:26 +03:00
|
|
|
get currentInterval() {
|
|
|
|
const urlParams = new URLSearchParams(window.location.search)
|
2022-11-05 21:23:30 +03:00
|
|
|
const cookies = new URLSearchParams(document.cookie.replaceAll('; ', '&'))
|
|
|
|
|
|
|
|
if (urlParams.has('interval'))
|
|
|
|
return urlParams.get('interval')
|
|
|
|
if (cookies.has('wakapi_summary_interval'))
|
|
|
|
return cookies.get('wakapi_summary_interval')
|
|
|
|
if (!urlParams.has('from') && !urlParams.has('to'))
|
|
|
|
return 'today'
|
|
|
|
|
2022-04-18 12:49:06 +03:00
|
|
|
return null
|
2022-04-18 12:39:26 +03:00
|
|
|
}
|
2022-01-02 20:30:22 +03:00
|
|
|
}).mount('#summary-page')
|