|
3 | 3 | <Head title="Speech Audio" />
|
4 | 4 |
|
5 | 5 | <template #header>
|
6 |
| - <h2 |
7 |
| - class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight" |
8 |
| - > |
| 6 | + <h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight"> |
9 | 7 | Speech Audios
|
10 | 8 | </h2>
|
11 | 9 | </template>
|
12 | 10 |
|
13 | 11 | <div class="py-12">
|
14 | 12 | <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
15 | 13 | <div class="flex justify-between mb-6">
|
16 |
| - <Pagination |
17 |
| - class="hidden sm:block" |
18 |
| - :links="speechAudios.links" |
19 |
| - /> |
| 14 | + <Pagination class="hidden sm:block" :links="speechAudios.links"/> |
20 | 15 |
|
21 | 16 | <PrimaryButton @click="showModal = true">
|
22 | 17 | <i class="fas fa-plus mr-2"></i> Create Speech Audio
|
23 | 18 | </PrimaryButton>
|
24 | 19 | </div>
|
25 |
| - <!-- Tabla de géneros --> |
26 |
| - <div |
27 |
| - class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg" |
28 |
| - > |
29 |
| - <div class="overflow-x-auto"> |
| 20 | + |
| 21 | + <div class="bg-white dark:bg-gray-800 shadow-sm sm:rounded-lg"> |
30 | 22 | <table class="w-full min-w-max">
|
31 | 23 | <thead>
|
32 | 24 | <tr>
|
|
47 | 39 | </tr>
|
48 | 40 | </thead>
|
49 | 41 | <tbody>
|
50 |
| - <tr |
51 |
| - v-if=" |
52 |
| - !speechAudios || |
53 |
| - !speechAudios.data || |
54 |
| - speechAudios.data.length === 0 |
55 |
| - " |
56 |
| - > |
57 |
| - <td |
58 |
| - colspan="5" |
59 |
| - class="text-white px-4 py-8 text-center bg-gray-700 rounded-lg" |
60 |
| - > |
| 42 | + <tr v-if="!speechAudios || !speechAudios.data || speechAudios.data.length === 0"> |
| 43 | + <td colspan="5" class="text-white px-4 py-8 text-center bg-gray-700 rounded-lg"> |
61 | 44 | No speech audios found.
|
62 | 45 | </td>
|
63 | 46 | </tr>
|
64 |
| - <tr |
65 |
| - v-else |
66 |
| - v-for="speechAudio in speechAudios.data" |
67 |
| - :key="speechAudio.id" |
68 |
| - > |
| 47 | + <tr v-else v-for="speechAudio in speechAudios.data" :key="speechAudio.id"> |
69 | 48 | <td class="text-white px-4 py-2">
|
70 | 49 | {{ speechAudio.id }}
|
71 | 50 | </td>
|
|
75 | 54 | </td>
|
76 | 55 |
|
77 | 56 | <td class="text-white px-4 py-2">
|
78 |
| - {{ |
79 |
| - format( |
80 |
| - new Date( |
81 |
| - speechAudio.created_at |
82 |
| - ), |
83 |
| - "dd/MM/yyyy HH:mm:ss" |
84 |
| - ) |
85 |
| - }} |
| 57 | + {{ format(new Date(speechAudio.created_at),"dd/MM/yyyy HH:mm:ss") }} |
86 | 58 | </td>
|
87 | 59 |
|
88 |
| - <td |
89 |
| - class="text-white px-4 py-2 space-x-2 text-center" |
90 |
| - > |
91 |
| - <div |
92 |
| - class="flex space-x-2 justify-center" |
93 |
| - > |
94 |
| - <AudioPlayer |
95 |
| - :audioUrl="speechAudio.audioUrl" |
96 |
| - v-model:isPlaying=" |
97 |
| - speechAudio.isPlaying |
98 |
| - " |
99 |
| - /> |
| 60 | + <td class="text-white px-4 py-2 space-x-2 text-center"> |
| 61 | + <div class="flex space-x-2 justify-center"> |
| 62 | + <AudioPlayer :audioUrl="speechAudio.audioUrl" v-model:isPlaying=" speechAudio.isPlaying"/> |
100 | 63 | <DropdownMenu>
|
101 |
| - <PrimaryButton |
102 |
| - @click=" |
103 |
| - downloadText( |
104 |
| - speechAudio.id |
105 |
| - ) |
106 |
| - " |
107 |
| - class="bg-green-500 hover:bg-green-700 text-white w-full text-left" |
108 |
| - > |
109 |
| - <i |
110 |
| - class="fas fa-download mr-2" |
111 |
| - ></i> |
| 64 | + <PrimaryButton @click="downloadText(speechAudio.id)" class="bg-green-500 hover:bg-green-700 text-white w-full text-left"> |
| 65 | + <i class="fas fa-download mr-2"></i> |
112 | 66 | Download Text
|
113 | 67 | </PrimaryButton>
|
114 |
| - <PrimaryButton |
115 |
| - @click=" |
116 |
| - downloadSpeechAudio( |
117 |
| - speechAudio.id |
118 |
| - ) |
119 |
| - " |
120 |
| - class="bg-green-500 hover:bg-green-700 text-white w-full text-left" |
121 |
| - > |
122 |
| - <i |
123 |
| - class="fas fa-download mr-2" |
124 |
| - ></i> |
| 68 | + <PrimaryButton @click="downloadSpeechAudio(speechAudio.id)" class="bg-green-500 hover:bg-green-700 text-white w-full text-left"> |
| 69 | + <i class="fas fa-download mr-2"></i> |
125 | 70 | Download Audio
|
126 | 71 | </PrimaryButton>
|
127 |
| - <PrimaryButton |
128 |
| - @click=" |
129 |
| - deleteSpeechAudio( |
130 |
| - speechAudio.id |
131 |
| - ) |
132 |
| - " |
133 |
| - class="bg-red-500 hover:bg-red-700 text-white w-full text-left" |
134 |
| - > |
135 |
| - <i |
136 |
| - class="fas fa-trash mr-2" |
137 |
| - ></i> |
| 72 | + <PrimaryButton @click="deleteSpeechAudio(speechAudio.id)" class="bg-red-500 hover:bg-red-700 text-white w-full text-left"> |
| 73 | + <i class="fas fa-trash mr-2"></i> |
138 | 74 | Delete
|
139 | 75 | </PrimaryButton>
|
140 | 76 | </DropdownMenu>
|
|
143 | 79 | </tr>
|
144 | 80 | </tbody>
|
145 | 81 | </table>
|
146 |
| - </div> |
147 | 82 | </div>
|
148 | 83 |
|
149 | 84 | <div class="flex justify-left mb-6 mt-6">
|
|
154 | 89 |
|
155 | 90 | <!-- Modal for Form -->
|
156 | 91 | <Modal :show="showModal" @close="showModal = false">
|
157 |
| - <Form |
158 |
| - :submitAction="submitForm" |
159 |
| - buttonText="Generate Speech Audio" |
160 |
| - :errors="errors" |
161 |
| - /> |
| 92 | + <Form :submitAction="submitForm" buttonText="Generate Speech Audio" :errors="errors"/> |
162 | 93 | </Modal>
|
163 | 94 |
|
164 |
| - <!-- Speech Audio Progress Animation --> |
165 |
| - <!-- <SpeechAudioProgress ref="speechAudioProgress" id="speech-audio-progress" /> --> |
166 | 95 | </AuthenticatedLayout>
|
167 | 96 | </template>
|
168 | 97 |
|
|
0 commit comments