summaryrefslogtreecommitdiff
path: root/pse-dashboard/src/views/EpisodesView.vue
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2024-06-19 00:14:49 +0200
committerOrangerot <purple@orangerot.dev>2024-06-27 12:11:14 +0200
commit5b8851b6c268d0e93c158908fbfae9f8473db5ff (patch)
tree7010eb85d86fa2da06ea4ffbcdb01a685d502ae8 /pse-dashboard/src/views/EpisodesView.vue
Initial commitHEADmain
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>
+