summaryrefslogtreecommitdiff
path: root/pse-dashboard/src/views/EpisodesView.vue
diff options
context:
space:
mode:
Diffstat (limited to 'pse-dashboard/src/views/EpisodesView.vue')
-rw-r--r--pse-dashboard/src/views/EpisodesView.vue42
1 files changed, 42 insertions, 0 deletions
diff --git a/pse-dashboard/src/views/EpisodesView.vue b/pse-dashboard/src/views/EpisodesView.vue
new file mode 100644
index 0000000..a7027b1
--- /dev/null
+++ b/pse-dashboard/src/views/EpisodesView.vue
@@ -0,0 +1,42 @@
+<script setup>
+import { DashboardLayout, EpisodeEntry, LoadingConditional } from '@/components'
+import { ref, onMounted } from 'vue';
+import { getEpisodeActions } from '@/api/pse-squared.js';
+
+const episodes = ref(null);
+const received = ref(false);
+
+onMounted(async () => {
+ try {
+ const response = await getEpisodeActions();
+
+ received.value = true;
+ episodes.value = response.data;
+ } catch(err) {
+ }
+});
+
+</script>
+<template>
+ <DashboardLayout>
+ <h1 class="h1 mb-4">
+ {{ $t("message.mostRecentlyHeardEpisodes") }}
+ </h1>
+
+ <LoadingConditional :waiting-for="received">
+ <div class="list-group w-auto">
+ <EpisodeEntry
+ v-for="(action, index) in episodes.actions"
+ :key="index"
+ :action="action"
+ />
+ </div>
+ <p v-if="episodes.actions.length == 0">
+ {{ $t('message.noEpisodes') }}
+ </p>
+ </LoadingConditional>
+ </DashboardLayout>
+</template>
+<style>
+</style>
+