21
21
</div >
22
22
23
23
<div class =" bg-white dark:bg-gray-800 shadow-sm sm:rounded-lg" >
24
- <table class =" w-full min-w-max" >
25
- <thead >
26
- <tr >
24
+ <table class =" w-full min-w-max" >
25
+ <thead >
26
+ <tr >
27
+ <th class =" text-white p-4 text-left" >
28
+ <i class =" fas fa-font mr-2" ></i >
29
+ <span class =" hidden sm:inline" >Title</span >
30
+ </th >
31
+ <th class =" text-white p-4 text-left hidden sm:table-cell" >
32
+ <i class =" fas fa-align-left mr-2" ></i >
33
+ <span class =" hidden sm:inline" >Content</span >
34
+ </th >
27
35
<th class =" text-white p-4 text-left" >
28
- <i class =" fas fa-font mr-2" ></i >Title
29
- </th >
30
- <th class =" text-white p-4 text-left" >
31
- <i class =" fas fa-align-left mr-2" ></i
32
- >Content
33
- </th >
34
- <th class =" text-white p-4 text-left" >
35
- <i class =" fas fa-calendar-alt mr-2" ></i
36
- >Language
37
- </th >
38
- <th class =" text-white p-4" >
39
- <i class =" fas fa-cogs mr-2" ></i >Actions
40
- </th >
41
- </tr >
42
- </thead >
43
- <tbody >
44
- <tr v-if =" !transcriptions || !transcriptions.data || transcriptions.data.length === 0" >
45
- <td colspan =" 5" class =" text-white px-4 py-8 text-center bg-gray-700 rounded-lg" >
46
- No transcriptions found.
47
- </td >
48
- </tr >
49
- <tr v-else v-for =" transcription in transcriptions.data" :key =" transcription.id" >
50
- <td class =" text-white px-4 py-2" >
51
- {{ transcription.title }}
52
- </td >
53
- <td class =" text-white px-4 py-2" >
54
- {{
55
- truncate(transcription.content, 30)
56
- }}
57
- </td >
58
- <td class =" text-white px-4 py-2" >
59
- <span v-if =" transcription.language === 'en'" >
60
- 🇺🇸
61
- </span >
62
- <span v-else-if =" transcription.language === 'es'" >
63
- 🇪🇸
64
- </span >
65
- {{ transcription.language }}
66
- </td >
67
- <td class =" text-white px-4 py-2 space-x-2 text-center" >
68
- <div class =" flex space-x-2 justify-center" >
36
+ <i class =" fas fa-globe mr-2" ></i >
37
+ <span class =" hidden sm:inline" >Language</span >
38
+ </th >
39
+ <th class =" text-white p-4" >
40
+ <i class =" fas fa-cogs mr-2" ></i >
41
+ <span class =" hidden sm:inline" >Actions</span >
42
+ </th >
43
+ </tr >
44
+ </thead >
45
+ <tbody >
46
+ <tr v-if =" !transcriptions || !transcriptions.data || transcriptions.data.length === 0" >
47
+ <td colspan =" 4" class =" text-white px-4 py-8 text-center bg-gray-700 rounded-lg" >
48
+ No transcriptions found.
49
+ </td >
50
+ </tr >
51
+ <tr v-else v-for =" transcription in transcriptions.data" :key =" transcription.id" >
52
+ <td class =" text-white px-4 py-2" >
53
+ {{ truncate(transcription.title, 12) }}
54
+ </td >
55
+ <td class =" text-white px-4 py-2 hidden sm:table-cell" >
56
+ {{ truncate(transcription.content, 30) }}
57
+ </td >
58
+ <td class =" text-white px-4 py-2" >
59
+ <span v-if =" transcription.language === 'en'" >
60
+ 🇺🇸
61
+ </span >
62
+ <span v-else-if =" transcription.language === 'es'" >
63
+ 🇪🇸
64
+ </span >
65
+ {{ transcription.language }}
66
+ </td >
67
+ <td class =" text-white px-2 py-2 space-x-2 text-center" >
68
+ <div class =" flex space-x-1 justify-center" >
69
69
<AudioPlayer :audioUrl =" transcription.audioUrl" v-model:isPlaying =" transcription.isPlaying" />
70
70
<DropdownMenu >
71
- <PrimaryButton @click =" viewTranscription(transcription.slug)" class =" bg-blue-500 hover:bg-blue-700 text-white w-full text-left" >
72
- <i class =" fas fa-eye mr-2" ></i >
73
- View PDF
71
+ <PrimaryButton @click =" viewTranscription(transcription.slug)" class =" bg-blue-500 hover:bg-blue-700 text-white w-full text-left px-2 py-1 text-xs sm:text-sm " >
72
+ <i class =" fas fa-eye mr-1 sm:mr- 2" ></i >
73
+ < span class = " hidden sm:inline " > View PDF</ span >
74
74
</PrimaryButton >
75
- <PrimaryButton @click =" downloadTranscription(transcription.slug)" class =" bg-green-500 hover:bg-green-700 text-white w-full text-left" >
76
- <i class =" fas fa-download mr-2" ></i >
77
- Download PDF
75
+ <PrimaryButton @click =" downloadTranscription(transcription.slug)" class =" bg-green-500 hover:bg-green-700 text-white w-full text-left px-2 py-1 text-xs sm:text-sm " >
76
+ <i class =" fas fa-download mr-1 sm:mr- 2" ></i >
77
+ < span class = " hidden sm:inline " > Download PDF</ span >
78
78
</PrimaryButton >
79
- <PrimaryButton @click =" deletetranscription(transcription.slug)" class =" bg-red-500 hover:bg-red-700 text-white w-full text-left" >
80
- <i class =" fas fa-trash mr-2" ></i >
81
- Delete
79
+ <PrimaryButton @click =" deletetranscription(transcription.slug)" class =" bg-red-500 hover:bg-red-700 text-white w-full text-left px-2 py-1 text-xs sm:text-sm " >
80
+ <i class =" fas fa-trash mr-1 sm:mr- 2" ></i >
81
+ < span class = " hidden sm:inline " > Delete</ span >
82
82
</PrimaryButton >
83
83
</DropdownMenu >
84
84
</div >
85
85
</td >
86
- </tr >
87
- </tbody >
88
- </table >
86
+ </tr >
87
+ </tbody >
88
+ </table >
89
89
</div >
90
90
91
91
<div class =" flex justify-left mb-6 mt-6" >
@@ -112,7 +112,7 @@ import Form from "@/Pages/Transcriptions/Form.vue";
112
112
import { Head , router , usePage } from " @inertiajs/vue3" ;
113
113
import Swal from " sweetalert2" ;
114
114
import { ref , onMounted , watch } from " vue" ;
115
- import eventBus from " @/Components/eventBus.js" ;
115
+ import eventBus from " @/Components/eventBus.js" ;
116
116
117
117
defineProps ({
118
118
transcriptions: {
0 commit comments