summaryrefslogtreecommitdiff
path: root/pse-dashboard/src/components/EpisodeEntry.vue
blob: c651484184d8e32c7a1d730215fd469f92debe71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<script setup>
import { LastUpdate, ProgressTime } from '@/components'

const props = defineProps({
    action: {
        type: Object,
        default: undefined
    }
});

</script>
<template>
    <a
        href="#"
        class="list-group-item list-group-item-action py-3"
        aria-current="true"
    >
        <!-- title with timestamp -->
        <div class="d-flex gap-3">
            <i
                class="fa fa-podcast rounded-circle flex-shring-0"
                style="font-size: 32px"
            />
            <div class="d-flex gap-2 w-100 justify-content-between">
                <div>
                    <h6 class="mb-0">{{ action.title }}</h6>
                    <p class="mb-0 opacity-75">{{ action.description }}</p>
                </div>
                <small class="opacity-50 text-nowrap">
                    <LastUpdate :iso="action.timestamp" />
                </small>
            </div>
        </div>

        <!-- Progress bar with Progress time -->
        <div class="d-flex">
            <ProgressTime :unix="action.position" />
            <div
                class="progress flex-grow-1 m-2"
                style="height:10px; "
            >
                <div
                    class="progress-bar"
                    :style="{width: 100*action.position/action.total + '%'}"
                />
            </div>
            <ProgressTime :unix="action.total" />
        </div>
    </a>
</template>
<style>
</style>