feat(fe): added header
ToDo: connect clock to shows, style corrections
This commit is contained in:
parent
0b570a25af
commit
75d56a1b7b
3 changed files with 16 additions and 6 deletions
|
@ -20,7 +20,7 @@ const items = [
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "Musichetta buffa",
|
name: "Musichetta buffa",
|
||||||
type: "jingle",
|
type: "show",
|
||||||
when: "12:10"
|
when: "12:10"
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,13 +1,23 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import axios from "axios";
|
|
||||||
import {useAuthStore} from "@/stores/auth.store.ts";
|
import {useAuthStore} from "@/stores/auth.store.ts";
|
||||||
|
import {computed, ref} from "vue";
|
||||||
|
|
||||||
const auth = useAuthStore();
|
const auth = useAuthStore();
|
||||||
|
const timezone = auth.userData.timezone;
|
||||||
|
|
||||||
|
const time = ref(new Date().toLocaleString("it-IT", {timeZone: timezone}));
|
||||||
|
|
||||||
|
setInterval(() => {
|
||||||
|
time.value = new Date().toLocaleString("it-IT", {timeZone: timezone});
|
||||||
|
}, 1000)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="timer">
|
||||||
|
<span>
|
||||||
|
{{ time }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -3,6 +3,9 @@ const props = defineProps([
|
||||||
'item'
|
'item'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Show/Spot icon
|
||||||
|
*/
|
||||||
const icon = () => {
|
const icon = () => {
|
||||||
switch (props.item.type) {
|
switch (props.item.type) {
|
||||||
case 'show':
|
case 'show':
|
||||||
|
@ -11,9 +14,6 @@ const icon = () => {
|
||||||
case 'ad':
|
case 'ad':
|
||||||
return 'mdi-advertisements';
|
return 'mdi-advertisements';
|
||||||
break;
|
break;
|
||||||
case 'jingle':
|
|
||||||
return 'mdi-music';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue