1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/static/assets/js/components/summary.js
2022-04-18 11:49:06 +02:00

9 lines
348 B
JavaScript

PetiteVue.createApp({
$delimiters: ['${', '}'],
get currentInterval() {
const urlParams = new URLSearchParams(window.location.search)
if (urlParams.has('interval')) return urlParams.get('interval')
if (!urlParams.has('from') && !urlParams.has('to')) return 'today'
return null
}
}).mount('#summary-page')