From 5b8851b6c268d0e93c158908fbfae9f8473db5ff Mon Sep 17 00:00:00 2001
From: Orangerot <purple@orangerot.dev>
Date: Wed, 19 Jun 2024 00:14:49 +0200
Subject: Initial commit

---
 pse-dashboard/src/views/EpisodesView.vue | 42 ++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 pse-dashboard/src/views/EpisodesView.vue

(limited to 'pse-dashboard/src/views/EpisodesView.vue')

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>
+
-- 
cgit v1.2.3

