@golstats/gsc-reports 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/FilterConditions-55d68355-C5NIJbY6-xW04mYhu-DRN4eEO4.js +191 -0
- package/dist/FilterField-59a73e38-DO8nYLqs-Da7H_Fvj-ZuLwDGOM.js +21 -0
- package/dist/FilterSubcategories-a9b32cc9-DlkHni1L-BXid_sIn-BvoU3OqZ.js +42 -0
- package/dist/css/fonts.css +83 -0
- package/dist/fonts/BebasNeue-Bold.otf +0 -0
- package/dist/fonts/BebasNeue-Bold.ttf +0 -0
- package/dist/fonts/BebasNeue-Bold.woff2 +0 -0
- package/dist/fonts/BebasNeue-Book.otf +0 -0
- package/dist/fonts/BebasNeue-Book.ttf +0 -0
- package/dist/fonts/BebasNeue-Book.woff2 +0 -0
- package/dist/fonts/BebasNeue-Light.otf +0 -0
- package/dist/fonts/BebasNeue-Light.ttf +0 -0
- package/dist/fonts/BebasNeue-Light.woff2 +0 -0
- package/dist/fonts/BebasNeue-Regular.otf +0 -0
- package/dist/fonts/BebasNeue-Regular.ttf +0 -0
- package/dist/fonts/BebasNeue-Regular.woff2 +0 -0
- package/dist/fonts/BebasNeue-Thin.otf +0 -0
- package/dist/fonts/BebasNeue-Thin.ttf +0 -0
- package/dist/fonts/BebasNeue-Thin.woff2 +0 -0
- package/dist/fonts/Montserrat-Black.otf +0 -0
- package/dist/fonts/Montserrat-BlackItalic.otf +0 -0
- package/dist/fonts/Montserrat-Bold.otf +0 -0
- package/dist/fonts/Montserrat-BoldItalic.otf +0 -0
- package/dist/fonts/Montserrat-ExtraBold.otf +0 -0
- package/dist/fonts/Montserrat-ExtraBoldItalic.otf +0 -0
- package/dist/fonts/Montserrat-ExtraLight.otf +0 -0
- package/dist/fonts/Montserrat-ExtraLightItalic.otf +0 -0
- package/dist/fonts/Montserrat-Italic.otf +0 -0
- package/dist/fonts/Montserrat-Light.otf +0 -0
- package/dist/fonts/Montserrat-LightItalic.otf +0 -0
- package/dist/fonts/Montserrat-Medium.otf +0 -0
- package/dist/fonts/Montserrat-MediumItalic.otf +0 -0
- package/dist/fonts/Montserrat-Regular.otf +0 -0
- package/dist/fonts/Montserrat-SemiBold.otf +0 -0
- package/dist/fonts/Montserrat-SemiBoldItalic.otf +0 -0
- package/dist/fonts/Montserrat-Thin.otf +0 -0
- package/dist/fonts/Montserrat-ThinItalic.otf +0 -0
- package/dist/fonts/Oswald-Bold.ttf +0 -0
- package/dist/fonts/Oswald-ExtraLight.ttf +0 -0
- package/dist/fonts/Oswald-Light.ttf +0 -0
- package/dist/fonts/Oswald-Medium.ttf +0 -0
- package/dist/fonts/Oswald-Regular.ttf +0 -0
- package/dist/fonts/Oswald-SemiBold.ttf +0 -0
- package/dist/fonts/Poppins-Black.otf +0 -0
- package/dist/fonts/Poppins-BlackItalic.otf +0 -0
- package/dist/fonts/Poppins-Bold.otf +0 -0
- package/dist/fonts/Poppins-BoldItalic.otf +0 -0
- package/dist/fonts/Poppins-ExtraBold.otf +0 -0
- package/dist/fonts/Poppins-ExtraBoldItalic.otf +0 -0
- package/dist/fonts/Poppins-ExtraLight.otf +0 -0
- package/dist/fonts/Poppins-ExtraLightItalic.otf +0 -0
- package/dist/fonts/Poppins-Italic.otf +0 -0
- package/dist/fonts/Poppins-Light.otf +0 -0
- package/dist/fonts/Poppins-LightItalic.otf +0 -0
- package/dist/fonts/Poppins-Medium.otf +0 -0
- package/dist/fonts/Poppins-MediumItalic.otf +0 -0
- package/dist/fonts/Poppins-Regular.otf +0 -0
- package/dist/fonts/Poppins-SemiBold.otf +0 -0
- package/dist/fonts/Poppins-SemiBoldItalic.otf +0 -0
- package/dist/fonts/Poppins-Thin.otf +0 -0
- package/dist/fonts/Poppins-ThinItalic.otf +0 -0
- package/dist/gsc-reports.css +1 -0
- package/dist/gsc-reports.es.js +4 -0
- package/dist/gsc-reports.umd.js +4079 -0
- package/dist/icons/icn-close.svg +5 -0
- package/dist/icons/icn-delete-delete.svg +3 -0
- package/dist/icons/icn-delete.svg +3 -0
- package/dist/icons/icn-download.svg +4 -0
- package/dist/icons/icn-duplicate-white.svg +11 -0
- package/dist/icons/icn-duplicate.svg +11 -0
- package/dist/icons/icn-edit.svg +11 -0
- package/dist/icons/icn-editar-withe.svg +3 -0
- package/dist/icons/icn-rename-white.svg +3 -0
- package/dist/icons/icn-rename.svg +3 -0
- package/dist/icons/icn-report-white.svg +11 -0
- package/dist/icons/icn-report.svg +11 -0
- package/dist/images/background-postmatch-template-01.jpg +0 -0
- package/dist/images/background-postmatch-template-02.jpg +0 -0
- package/dist/images/canchaRPH.svg +30 -0
- package/dist/index-B1R4W2EC.js +128151 -0
- package/dist/reports/background-postmatch-template-01@2x.jpg +0 -0
- package/dist/reports/background-postmatch-template-02@2x.jpg +0 -0
- package/dist/reports/thumbnail-portada-01@2x.png +0 -0
- package/dist/reports/thumbnail-portada-02@2x.png +0 -0
- package/dist/reports/thumbnail-portada-03@2x.png +0 -0
- package/dist/reports/thumbnail-portada-04@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-01@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-02@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-03@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-04@2x.png +0 -0
- package/dist/thumb1.png +0 -0
- package/dist/thumbnail-portada-01.jpg +0 -0
- package/dist/thumbnail-portada-02.jpg +0 -0
- package/dist/thumbnail-portada-03.jpg +0 -0
- package/dist/thumbnail-portada-04.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-01.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-02.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-03.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-04.jpg +0 -0
- package/package.json +70 -0
- package/src/App.vue +28 -0
- package/src/components/ReportsSection.vue +764 -0
- package/src/components/TemplatesSection.vue +911 -0
- package/src/components/elementsTemplates/ModalCreateTemplate.vue +407 -0
- package/src/components/elementsTemplates/ModalDeleteReport.vue +231 -0
- package/src/components/elementsTemplates/ModalDeleteTemplate.vue +234 -0
- package/src/components/elementsTemplates/ModalGenerarReporte.vue +1151 -0
- package/src/components/elementsTemplates/ModalRenameReporte.vue +315 -0
- package/src/components/elementsTemplates/ModalRenameTemplate.vue +320 -0
- package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -0
- package/src/components/elementsTemplates/ModalduplicateTemplate.vue +283 -0
- package/src/components/elementsTemplates/ReportItem.vue +458 -0
- package/src/components/elementsTemplates/TemplateItem.vue +360 -0
- package/src/components/elementsTemplates/TooltipReportOptions.vue +85 -0
- package/src/components/elementsTemplates/TooltipTemplateOptions.vue +141 -0
- package/src/components/filters.vue +935 -0
- package/src/components/gsc-reports.vue +452 -0
- package/src/components/template-report-maker/CoverPage.vue +636 -0
- package/src/components/template-report-maker/CoverSelector.vue +165 -0
- package/src/components/template-report-maker/ReportAndTemplateMaker.vue +675 -0
- package/src/components/template-report-maker/ReportView.vue +66 -0
- package/src/components/template-report-maker/TemplateReportPage.vue +398 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +463 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +462 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +164 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +163 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -0
- package/src/index.js +4 -0
- package/src/main.js +4 -0
- package/src/types.d.ts +45 -0
- package/src/utils/dateUtils.js +52 -0
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="templates-section" ref="templatesSectionRef">
|
|
3
|
+
<div class="templates-header">
|
|
4
|
+
<span
|
|
5
|
+
>Templates <span class="count">({{ filteredTemplates.length }})</span></span
|
|
6
|
+
>
|
|
7
|
+
<!-- Debug temporal -->
|
|
8
|
+
<div class="sort-dropdown" ref="sortDropdownRef">
|
|
9
|
+
<button class="sort-button" @click="toggleSortDropdown">
|
|
10
|
+
{{ getSortOptionLabel(selectedSortOption) || 'Ordenar' }}
|
|
11
|
+
<span class="dropdown-arrow" :class="{ rotated: showSortDropdown }"></span>
|
|
12
|
+
</button>
|
|
13
|
+
<div class="sort-options" v-if="showSortDropdown">
|
|
14
|
+
<div
|
|
15
|
+
v-for="option in sortOptions"
|
|
16
|
+
:key="option.value"
|
|
17
|
+
class="sort-option"
|
|
18
|
+
:class="{ selected: selectedSortOption === option.value }"
|
|
19
|
+
@click="selectSortOption(option.value)"
|
|
20
|
+
>
|
|
21
|
+
<span>{{ option.label }}</span>
|
|
22
|
+
<span v-if="selectedSortOption === option.value" class="checkmark">
|
|
23
|
+
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
+
<path
|
|
25
|
+
d="M5 10.5L9 14.5L15 7.5"
|
|
26
|
+
stroke="#cbee6b"
|
|
27
|
+
stroke-width="2"
|
|
28
|
+
stroke-linecap="round"
|
|
29
|
+
stroke-linejoin="round"
|
|
30
|
+
/>
|
|
31
|
+
</svg>
|
|
32
|
+
</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<!-- Estado de carga -->
|
|
39
|
+
<div v-if="loadingTemplates" class="loading-state">
|
|
40
|
+
<div class="loading-spinner"></div>
|
|
41
|
+
<p>Cargando templates...</p>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<!-- Lista de templates -->
|
|
45
|
+
<div v-else class="templates-list" :class="gridClass" ref="templatesListRef">
|
|
46
|
+
<!-- Botón Crear Template - siempre visible -->
|
|
47
|
+
<div class="template-card create" @click="showModalCreateTemplate = true">
|
|
48
|
+
<div class="inner-card">
|
|
49
|
+
<div class="plus">
|
|
50
|
+
<img
|
|
51
|
+
src="http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png"
|
|
52
|
+
alt="Agregar"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="create-text">Crear Template</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<!-- Templates dinámicos -->
|
|
59
|
+
<TemplateItem
|
|
60
|
+
v-for="template in filteredTemplates"
|
|
61
|
+
:key="template.id"
|
|
62
|
+
:template="template"
|
|
63
|
+
@generar-reporte="
|
|
64
|
+
(nombre) => {
|
|
65
|
+
generarTemplateId = template.id
|
|
66
|
+
generarTemplateType = template.template_type
|
|
67
|
+
showModalGenerarReporte = true
|
|
68
|
+
}
|
|
69
|
+
"
|
|
70
|
+
@renombrar="
|
|
71
|
+
(nombre) => {
|
|
72
|
+
renameTemplateId = template.id
|
|
73
|
+
renameTemplateName = nombre
|
|
74
|
+
renameTemplateType = template.template_type
|
|
75
|
+
showModalRenameTemplate = true
|
|
76
|
+
}
|
|
77
|
+
"
|
|
78
|
+
@duplicar="
|
|
79
|
+
(nombre) => {
|
|
80
|
+
duplicarTemplateId = template.id
|
|
81
|
+
duplicateTemplateName = nombre
|
|
82
|
+
showModalDuplicateTemplate = true
|
|
83
|
+
}
|
|
84
|
+
"
|
|
85
|
+
@eliminar="
|
|
86
|
+
(template) => {
|
|
87
|
+
deleteTemplateName = template.name
|
|
88
|
+
deleteTemplateId = template.id
|
|
89
|
+
showModalDeleteTemplate = true
|
|
90
|
+
}
|
|
91
|
+
"
|
|
92
|
+
@edit-template="onEditTemplate"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
<ModalCreateTemplate
|
|
96
|
+
:token="token"
|
|
97
|
+
v-if="showModalCreateTemplate"
|
|
98
|
+
@close="showModalCreateTemplate = false"
|
|
99
|
+
@open-modal-new-template="onOpenModalNewTemplate"
|
|
100
|
+
/>
|
|
101
|
+
<ModalGenerarReporte
|
|
102
|
+
:user-id="userId"
|
|
103
|
+
:token="token"
|
|
104
|
+
:template-id="generarTemplateId"
|
|
105
|
+
:template-type="generarTemplateType"
|
|
106
|
+
v-if="showModalGenerarReporte"
|
|
107
|
+
@close="showModalGenerarReporte = false"
|
|
108
|
+
@switch-to-reports="$emit('switch-to-reports')"
|
|
109
|
+
/>
|
|
110
|
+
<ModalRenameTemplate
|
|
111
|
+
v-if="showModalRenameTemplate"
|
|
112
|
+
:initialName="renameTemplateName"
|
|
113
|
+
:token="token"
|
|
114
|
+
:template-id="renameTemplateId"
|
|
115
|
+
:template-type="renameTemplateType"
|
|
116
|
+
:user-id="userId"
|
|
117
|
+
@refresh="obtenerTemplates()"
|
|
118
|
+
@close="showModalRenameTemplate = false"
|
|
119
|
+
@rename="
|
|
120
|
+
(nuevoNombre) => {
|
|
121
|
+
showModalRenameTemplate = false /* Aquí puedes manejar el cambio de nombre */
|
|
122
|
+
}
|
|
123
|
+
"
|
|
124
|
+
/>
|
|
125
|
+
<ModalduplicateTemplate
|
|
126
|
+
v-if="showModalDuplicateTemplate"
|
|
127
|
+
:initialName="duplicateTemplateName"
|
|
128
|
+
:token="token"
|
|
129
|
+
:template-id="duplicarTemplateId"
|
|
130
|
+
@close="showModalDuplicateTemplate = false"
|
|
131
|
+
@template-duplicated="
|
|
132
|
+
(data) => {
|
|
133
|
+
showModalDuplicateTemplate = false
|
|
134
|
+
// Recargar la lista de templates después de duplicar
|
|
135
|
+
obtenerTemplates()
|
|
136
|
+
}
|
|
137
|
+
"
|
|
138
|
+
/>
|
|
139
|
+
<ModalDeleteTemplate
|
|
140
|
+
v-if="showModalDeleteTemplate"
|
|
141
|
+
:template-id="deleteTemplateId"
|
|
142
|
+
:user-id="userId"
|
|
143
|
+
:token="token"
|
|
144
|
+
@close="showModalDeleteTemplate = false"
|
|
145
|
+
@templateDeleted="
|
|
146
|
+
(templateId) => {
|
|
147
|
+
showModalDeleteTemplate = false
|
|
148
|
+
// Recargar la lista de templates después de eliminar
|
|
149
|
+
obtenerTemplates()
|
|
150
|
+
}
|
|
151
|
+
"
|
|
152
|
+
/>
|
|
153
|
+
</div>
|
|
154
|
+
</template>
|
|
155
|
+
|
|
156
|
+
<script setup>
|
|
157
|
+
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
158
|
+
import axios from 'axios'
|
|
159
|
+
import TemplateItem from './elementsTemplates/TemplateItem.vue'
|
|
160
|
+
import ModalCreateTemplate from './elementsTemplates/ModalCreateTemplate.vue'
|
|
161
|
+
import ModalGenerarReporte from './elementsTemplates/ModalGenerarReporte.vue'
|
|
162
|
+
import ModalRenameTemplate from './elementsTemplates/ModalRenameTemplate.vue'
|
|
163
|
+
import ModalduplicateTemplate from './elementsTemplates/ModalduplicateTemplate.vue'
|
|
164
|
+
import ModalDeleteTemplate from './elementsTemplates/ModalDeleteTemplate.vue'
|
|
165
|
+
|
|
166
|
+
// Definir las props y emits
|
|
167
|
+
const emit = defineEmits(['switch-to-reports', 'open-modal-new-template', 'edit-template'])
|
|
168
|
+
|
|
169
|
+
// Definir las props
|
|
170
|
+
const props = defineProps({
|
|
171
|
+
userId: {
|
|
172
|
+
type: Number,
|
|
173
|
+
required: true,
|
|
174
|
+
},
|
|
175
|
+
team: {
|
|
176
|
+
type: Number,
|
|
177
|
+
required: true,
|
|
178
|
+
},
|
|
179
|
+
token: {
|
|
180
|
+
type: String,
|
|
181
|
+
required: true,
|
|
182
|
+
},
|
|
183
|
+
searchQuery: {
|
|
184
|
+
type: String,
|
|
185
|
+
default: '',
|
|
186
|
+
},
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
const showSortDropdown = ref(false)
|
|
190
|
+
const selectedSortOption = ref(null)
|
|
191
|
+
const showModalCreateTemplate = ref(false)
|
|
192
|
+
const showModalGenerarReporte = ref(false)
|
|
193
|
+
const showModalRenameTemplate = ref(false)
|
|
194
|
+
const showModalDuplicateTemplate = ref(false)
|
|
195
|
+
const showModalDeleteTemplate = ref(false)
|
|
196
|
+
const renameTemplateName = ref('')
|
|
197
|
+
const renameTemplateType = ref('')
|
|
198
|
+
const duplicateTemplateName = ref('')
|
|
199
|
+
const deleteTemplateName = ref('')
|
|
200
|
+
const deleteTemplateId = ref('')
|
|
201
|
+
const duplicarTemplateId = ref('')
|
|
202
|
+
const generarTemplateId = ref('')
|
|
203
|
+
const renameTemplateId = ref('')
|
|
204
|
+
const generarTemplateType = ref('')
|
|
205
|
+
const sortDropdownRef = ref(null)
|
|
206
|
+
const templatesSectionRef = ref(null)
|
|
207
|
+
const templatesListRef = ref(null)
|
|
208
|
+
const containerWidth = ref(0)
|
|
209
|
+
|
|
210
|
+
// Estado para los templates
|
|
211
|
+
const templates = ref([])
|
|
212
|
+
const loadingTemplates = ref(false)
|
|
213
|
+
const errorTemplates = ref(null)
|
|
214
|
+
|
|
215
|
+
// Watcher para las props - recargar templates cuando cambien
|
|
216
|
+
watch(
|
|
217
|
+
[() => props.team, () => props.token],
|
|
218
|
+
() => {
|
|
219
|
+
if (props.team && props.token) {
|
|
220
|
+
obtenerTemplates()
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{ immediate: false },
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
const sortOptions = [
|
|
227
|
+
{ label: 'A - Z', value: 'name-asc' },
|
|
228
|
+
{ label: 'Más recientes', value: 'date-desc' },
|
|
229
|
+
]
|
|
230
|
+
|
|
231
|
+
// Función para obtener los templates del equipo
|
|
232
|
+
const obtenerTemplates = async () => {
|
|
233
|
+
try {
|
|
234
|
+
loadingTemplates.value = true
|
|
235
|
+
errorTemplates.value = null
|
|
236
|
+
|
|
237
|
+
const response = await axios.get(
|
|
238
|
+
`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${props.team}`,
|
|
239
|
+
{
|
|
240
|
+
headers: {
|
|
241
|
+
Authorization: `${props.token}`,
|
|
242
|
+
'Content-Type': 'application/json',
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
// Verificar la estructura de la respuesta
|
|
248
|
+
if (response.data && Array.isArray(response.data)) {
|
|
249
|
+
templates.value = response.data
|
|
250
|
+
} else if (response.data && response.data.templates) {
|
|
251
|
+
templates.value = response.data.templates
|
|
252
|
+
} else if (response.data && response.data.data) {
|
|
253
|
+
templates.value = response.data.data
|
|
254
|
+
} else {
|
|
255
|
+
templates.value = []
|
|
256
|
+
}
|
|
257
|
+
} catch (error) {
|
|
258
|
+
console.error('Error al obtener templates:', error)
|
|
259
|
+
console.error('Error response:', error.response)
|
|
260
|
+
errorTemplates.value = error.message || 'Error al cargar los templates'
|
|
261
|
+
templates.value = [] // Asegurar que esté vacío en caso de error
|
|
262
|
+
} finally {
|
|
263
|
+
loadingTemplates.value = false
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Computed property para filtrar y ordenar los templates
|
|
268
|
+
const filteredTemplates = computed(() => {
|
|
269
|
+
if (!templates.value.length) return []
|
|
270
|
+
|
|
271
|
+
let filtered = [...templates.value]
|
|
272
|
+
|
|
273
|
+
// Aplicar filtro de búsqueda
|
|
274
|
+
if (props.searchQuery.trim()) {
|
|
275
|
+
const query = props.searchQuery.toLowerCase().trim()
|
|
276
|
+
filtered = filtered.filter((template) => template.name.toLowerCase().includes(query))
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Aplicar ordenamiento
|
|
280
|
+
switch (selectedSortOption.value) {
|
|
281
|
+
case 'name-asc':
|
|
282
|
+
return filtered.sort((a, b) => a.name.localeCompare(b.name))
|
|
283
|
+
case 'date-desc':
|
|
284
|
+
return filtered.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))
|
|
285
|
+
default:
|
|
286
|
+
return filtered
|
|
287
|
+
}
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
// Computed property para determinar las clases del grid basado en el ancho del contenedor
|
|
291
|
+
const gridClass = computed(() => {
|
|
292
|
+
if (!containerWidth.value) return 'grid-1-column'
|
|
293
|
+
|
|
294
|
+
// Calculamos cuántos items caben en el ancho disponible
|
|
295
|
+
const itemWidth = 340 // Ancho base del TemplateItem
|
|
296
|
+
const gap = 20 // Gap entre items
|
|
297
|
+
const padding = 40 // Padding del contenedor (20px * 2)
|
|
298
|
+
|
|
299
|
+
// Ancho disponible para el grid
|
|
300
|
+
const availableWidth = containerWidth.value - padding
|
|
301
|
+
|
|
302
|
+
// Calculamos cuántos items caben considerando el gap
|
|
303
|
+
// Para n items necesitamos: n * itemWidth + (n-1) * gap
|
|
304
|
+
// Despejando: n = (availableWidth + gap) / (itemWidth + gap)
|
|
305
|
+
const itemsPerRow = Math.floor((availableWidth + gap) / (itemWidth + gap))
|
|
306
|
+
|
|
307
|
+
// Aseguramos que al menos tengamos 1 columna
|
|
308
|
+
const finalItemsPerRow = Math.max(1, itemsPerRow)
|
|
309
|
+
|
|
310
|
+
if (finalItemsPerRow >= 4) {
|
|
311
|
+
return 'grid-4-columns'
|
|
312
|
+
} else if (finalItemsPerRow >= 3) {
|
|
313
|
+
return 'grid-3-columns'
|
|
314
|
+
} else if (finalItemsPerRow >= 2) {
|
|
315
|
+
return 'grid-2-columns'
|
|
316
|
+
} else {
|
|
317
|
+
return 'grid-1-column'
|
|
318
|
+
}
|
|
319
|
+
})
|
|
320
|
+
|
|
321
|
+
const toggleSortDropdown = () => {
|
|
322
|
+
showSortDropdown.value = !showSortDropdown.value
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const selectSortOption = (option) => {
|
|
326
|
+
selectedSortOption.value = option
|
|
327
|
+
showSortDropdown.value = false
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const getSortOptionLabel = (value) => {
|
|
331
|
+
const option = sortOptions.find((opt) => opt.value === value)
|
|
332
|
+
return option ? option.label : null
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const handleClickOutside = (event) => {
|
|
336
|
+
if (
|
|
337
|
+
showSortDropdown.value &&
|
|
338
|
+
sortDropdownRef.value &&
|
|
339
|
+
!sortDropdownRef.value.contains(event.target)
|
|
340
|
+
) {
|
|
341
|
+
showSortDropdown.value = false
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Función para actualizar el ancho del contenedor
|
|
346
|
+
const updateContainerWidth = () => {
|
|
347
|
+
if (templatesSectionRef.value) {
|
|
348
|
+
containerWidth.value = templatesSectionRef.value.offsetWidth
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function onEditTemplate(template) {
|
|
353
|
+
emit('edit-template', template)
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// Resize observer para detectar cambios en el tamaño del contenedor
|
|
357
|
+
let resizeObserver = null
|
|
358
|
+
|
|
359
|
+
onMounted(async () => {
|
|
360
|
+
document.addEventListener('mousedown', handleClickOutside)
|
|
361
|
+
|
|
362
|
+
// Esperar a que el DOM esté completamente renderizado
|
|
363
|
+
await nextTick()
|
|
364
|
+
|
|
365
|
+
// Inicializar el ancho del contenedor
|
|
366
|
+
updateContainerWidth()
|
|
367
|
+
|
|
368
|
+
// Configurar el ResizeObserver para detectar cambios en el tamaño
|
|
369
|
+
if (window.ResizeObserver) {
|
|
370
|
+
resizeObserver = new ResizeObserver(() => {
|
|
371
|
+
updateContainerWidth()
|
|
372
|
+
})
|
|
373
|
+
|
|
374
|
+
if (templatesSectionRef.value) {
|
|
375
|
+
resizeObserver.observe(templatesSectionRef.value)
|
|
376
|
+
}
|
|
377
|
+
} else {
|
|
378
|
+
// Fallback para navegadores que no soportan ResizeObserver
|
|
379
|
+
window.addEventListener('resize', updateContainerWidth)
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// Obtener los templates cuando se monta el componente
|
|
383
|
+
obtenerTemplates()
|
|
384
|
+
})
|
|
385
|
+
|
|
386
|
+
function onOpenModalNewTemplate(data) {
|
|
387
|
+
console.log('onOpenModalNewTemplate template section, called with data:', data)
|
|
388
|
+
emit('open-modal-new-template', data)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
onBeforeUnmount(() => {
|
|
392
|
+
document.removeEventListener('mousedown', handleClickOutside)
|
|
393
|
+
|
|
394
|
+
if (resizeObserver) {
|
|
395
|
+
resizeObserver.disconnect()
|
|
396
|
+
} else {
|
|
397
|
+
window.removeEventListener('resize', updateContainerWidth)
|
|
398
|
+
}
|
|
399
|
+
})
|
|
400
|
+
</script>
|
|
401
|
+
|
|
402
|
+
<style scoped>
|
|
403
|
+
.templates-section {
|
|
404
|
+
padding: 24px 20px;
|
|
405
|
+
border-radius: 8px;
|
|
406
|
+
height: auto;
|
|
407
|
+
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.25);
|
|
408
|
+
background-color: rgba(38, 50, 60, 0.4);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.templates-header {
|
|
412
|
+
display: flex;
|
|
413
|
+
justify-content: space-between;
|
|
414
|
+
align-items: center;
|
|
415
|
+
margin-bottom: 20px;
|
|
416
|
+
font-family: Poppins-Medium;
|
|
417
|
+
font-size: 20px;
|
|
418
|
+
font-weight: 500;
|
|
419
|
+
font-stretch: normal;
|
|
420
|
+
font-style: normal;
|
|
421
|
+
line-height: normal;
|
|
422
|
+
letter-spacing: normal;
|
|
423
|
+
text-align: left;
|
|
424
|
+
color: #fff;
|
|
425
|
+
position: relative;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.templates-header::after {
|
|
429
|
+
content: '';
|
|
430
|
+
position: absolute;
|
|
431
|
+
bottom: -20px;
|
|
432
|
+
left: 50%;
|
|
433
|
+
transform: translateX(-50%);
|
|
434
|
+
width: 100%;
|
|
435
|
+
height: 1px;
|
|
436
|
+
background-color: #3d4a54;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.count {
|
|
440
|
+
color: #8b98a9;
|
|
441
|
+
font-size: 9px;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.sort-dropdown {
|
|
445
|
+
position: relative;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.sort-button {
|
|
449
|
+
width: 148px;
|
|
450
|
+
height: 40px;
|
|
451
|
+
border-radius: 8px;
|
|
452
|
+
background-color: rgba(255, 255, 255, 0.04);
|
|
453
|
+
font-family: Poppins-Regular;
|
|
454
|
+
font-size: 14px;
|
|
455
|
+
font-weight: normal;
|
|
456
|
+
font-stretch: normal;
|
|
457
|
+
font-style: normal;
|
|
458
|
+
line-height: 1.71;
|
|
459
|
+
letter-spacing: normal;
|
|
460
|
+
text-align: left;
|
|
461
|
+
color: #fff;
|
|
462
|
+
border: none;
|
|
463
|
+
padding: 8px 12px;
|
|
464
|
+
cursor: pointer;
|
|
465
|
+
display: flex;
|
|
466
|
+
justify-content: space-between;
|
|
467
|
+
align-items: center;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.sort-button:hover {
|
|
471
|
+
background-color: rgba(255, 255, 255, 0.08);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.dropdown-arrow {
|
|
475
|
+
width: 8px;
|
|
476
|
+
height: 8px;
|
|
477
|
+
position: relative;
|
|
478
|
+
transition: transform 0.2s;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.dropdown-arrow::before,
|
|
482
|
+
.dropdown-arrow::after {
|
|
483
|
+
content: '';
|
|
484
|
+
position: absolute;
|
|
485
|
+
background-color: #fff;
|
|
486
|
+
width: 1px;
|
|
487
|
+
height: 6px;
|
|
488
|
+
top: 1px;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.dropdown-arrow::before {
|
|
492
|
+
left: 2px;
|
|
493
|
+
transform: rotate(45deg);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.dropdown-arrow::after {
|
|
497
|
+
right: 2px;
|
|
498
|
+
transform: rotate(-45deg);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.dropdown-arrow.rotated {
|
|
502
|
+
transform: rotate(0deg);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.dropdown-arrow {
|
|
506
|
+
transform: rotate(180deg);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.sort-options {
|
|
510
|
+
position: absolute;
|
|
511
|
+
top: 100%;
|
|
512
|
+
right: 0;
|
|
513
|
+
left: auto;
|
|
514
|
+
width: 206px;
|
|
515
|
+
height: auto;
|
|
516
|
+
max-height: 96px;
|
|
517
|
+
background-color: #2e3b46;
|
|
518
|
+
border-radius: 12px;
|
|
519
|
+
margin-top: 4px;
|
|
520
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
521
|
+
z-index: 3200;
|
|
522
|
+
overflow: hidden;
|
|
523
|
+
padding: 0;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.sort-option {
|
|
527
|
+
display: flex;
|
|
528
|
+
align-items: center;
|
|
529
|
+
justify-content: space-between;
|
|
530
|
+
flex-grow: 0;
|
|
531
|
+
font-family: Poppins-Regular;
|
|
532
|
+
font-size: 13px;
|
|
533
|
+
font-weight: normal;
|
|
534
|
+
font-stretch: normal;
|
|
535
|
+
font-style: normal;
|
|
536
|
+
line-height: 1.5;
|
|
537
|
+
letter-spacing: normal;
|
|
538
|
+
text-align: left;
|
|
539
|
+
color: #fff;
|
|
540
|
+
cursor: pointer;
|
|
541
|
+
transition:
|
|
542
|
+
background-color 0.2s,
|
|
543
|
+
color 0.2s;
|
|
544
|
+
background: none;
|
|
545
|
+
padding: 14px 18px;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.sort-option.selected {
|
|
549
|
+
color: #cbee6b;
|
|
550
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.sort-option:hover {
|
|
554
|
+
background-color: rgba(255, 255, 255, 0.08);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.sort-option:not(:last-child) {
|
|
558
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.checkmark {
|
|
562
|
+
width: 18px;
|
|
563
|
+
height: 18px;
|
|
564
|
+
display: flex;
|
|
565
|
+
align-items: center;
|
|
566
|
+
justify-content: center;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.checkmark svg {
|
|
570
|
+
width: 16px;
|
|
571
|
+
height: 16px;
|
|
572
|
+
color: #cbee6b;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/* Base styles para templates-list */
|
|
576
|
+
.templates-list {
|
|
577
|
+
display: grid;
|
|
578
|
+
gap: 20px;
|
|
579
|
+
margin-top: 40px;
|
|
580
|
+
width: 100%;
|
|
581
|
+
justify-items: center;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/* Clases dinámicas basadas en el número de columnas que caben */
|
|
585
|
+
.grid-4-columns {
|
|
586
|
+
grid-template-columns: repeat(4, 340px);
|
|
587
|
+
gap: 20px;
|
|
588
|
+
justify-content: center;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.grid-3-columns {
|
|
592
|
+
grid-template-columns: repeat(3, 340px);
|
|
593
|
+
gap: 20px;
|
|
594
|
+
justify-content: center;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.grid-2-columns {
|
|
598
|
+
grid-template-columns: repeat(2, 340px);
|
|
599
|
+
gap: 20px;
|
|
600
|
+
justify-content: center;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.grid-1-column {
|
|
604
|
+
grid-template-columns: 340px;
|
|
605
|
+
gap: 20px;
|
|
606
|
+
justify-content: center;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/* Ajustes responsivos para el contenedor y header */
|
|
610
|
+
.grid-1-column .templates-section {
|
|
611
|
+
padding: 16px 12px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.grid-2-columns .templates-section {
|
|
615
|
+
padding: 20px 16px;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.grid-1-column .templates-header {
|
|
619
|
+
font-size: 18px;
|
|
620
|
+
margin-bottom: 16px;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.grid-2-columns .templates-header {
|
|
624
|
+
font-size: 19px;
|
|
625
|
+
margin-bottom: 18px;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.grid-1-column .sort-button {
|
|
629
|
+
width: 120px;
|
|
630
|
+
height: 36px;
|
|
631
|
+
font-size: 12px;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.grid-2-columns .sort-button {
|
|
635
|
+
width: 130px;
|
|
636
|
+
height: 38px;
|
|
637
|
+
font-size: 13px;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/* Asegurar que los items del grid mantengan su tamaño */
|
|
641
|
+
.templates-list .template-card {
|
|
642
|
+
width: 340px;
|
|
643
|
+
flex-shrink: 0;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/* Optimización para pantallas muy pequeñas */
|
|
647
|
+
@media (max-width: 400px) {
|
|
648
|
+
.templates-list {
|
|
649
|
+
gap: 16px;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.templates-list .template-card {
|
|
653
|
+
width: 320px;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.grid-1-column {
|
|
657
|
+
grid-template-columns: 320px;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.template-card.create {
|
|
662
|
+
border-radius: 5.7px;
|
|
663
|
+
background-color: rgba(25, 51, 70, 0.5);
|
|
664
|
+
width: 100%;
|
|
665
|
+
max-width: 340px;
|
|
666
|
+
height: 388px;
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: center;
|
|
669
|
+
justify-content: center;
|
|
670
|
+
cursor: pointer;
|
|
671
|
+
transition: background 0.2s;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.inner-card {
|
|
675
|
+
background: #193346;
|
|
676
|
+
border-radius: 12px;
|
|
677
|
+
width: calc(100% - 26px);
|
|
678
|
+
height: 364px;
|
|
679
|
+
display: flex;
|
|
680
|
+
flex-direction: column;
|
|
681
|
+
align-items: center;
|
|
682
|
+
justify-content: center;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.template-card.create:hover {
|
|
686
|
+
opacity: 0.7;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.plus {
|
|
690
|
+
display: flex;
|
|
691
|
+
align-items: center;
|
|
692
|
+
justify-content: center;
|
|
693
|
+
margin-bottom: 8px;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.plus img {
|
|
697
|
+
width: 48px;
|
|
698
|
+
height: 48px;
|
|
699
|
+
object-fit: contain;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.create-text {
|
|
703
|
+
margin-top: 4px;
|
|
704
|
+
font-family: Poppins-Regular;
|
|
705
|
+
font-size: 14px;
|
|
706
|
+
font-weight: 500;
|
|
707
|
+
font-stretch: normal;
|
|
708
|
+
font-style: normal;
|
|
709
|
+
line-height: normal;
|
|
710
|
+
letter-spacing: normal;
|
|
711
|
+
text-align: left;
|
|
712
|
+
color: #fff;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.template-card.postpartido {
|
|
716
|
+
border-radius: 5.7px;
|
|
717
|
+
background: #1a2a3a;
|
|
718
|
+
width: 100%;
|
|
719
|
+
max-width: 340px;
|
|
720
|
+
height: 388px;
|
|
721
|
+
display: flex;
|
|
722
|
+
align-items: center;
|
|
723
|
+
justify-content: center;
|
|
724
|
+
position: relative;
|
|
725
|
+
overflow: hidden;
|
|
726
|
+
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.25);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.inner-card-postpartido {
|
|
730
|
+
background: linear-gradient(180deg, #1a2a3a 60%, #193346 100%);
|
|
731
|
+
border-radius: 12px;
|
|
732
|
+
width: calc(100% - 26px);
|
|
733
|
+
height: 314px;
|
|
734
|
+
display: flex;
|
|
735
|
+
flex-direction: column;
|
|
736
|
+
align-items: center;
|
|
737
|
+
justify-content: space-between;
|
|
738
|
+
padding: 18px 0 0 0;
|
|
739
|
+
position: relative;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.logo-golstats {
|
|
743
|
+
width: 90px;
|
|
744
|
+
margin-bottom: 6px;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.postpartido-header {
|
|
748
|
+
text-align: center;
|
|
749
|
+
color: #fff;
|
|
750
|
+
margin-bottom: 8px;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.postpartido-title {
|
|
754
|
+
font-family: Poppins-Bold;
|
|
755
|
+
font-size: 20px;
|
|
756
|
+
margin-bottom: 2px;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.postpartido-title .bold {
|
|
760
|
+
font-weight: bold;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.postpartido-subtitle {
|
|
764
|
+
font-size: 12px;
|
|
765
|
+
color: #c0cbe0;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.postpartido-score-row {
|
|
769
|
+
display: flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
justify-content: center;
|
|
772
|
+
margin: 12px 0 0 0;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.postpartido-shield {
|
|
776
|
+
width: 60px;
|
|
777
|
+
height: 70px;
|
|
778
|
+
background: rgba(0, 0, 0, 0.15);
|
|
779
|
+
border-radius: 10px;
|
|
780
|
+
margin: 0 18px;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.postpartido-score {
|
|
784
|
+
font-size: 64px;
|
|
785
|
+
font-family: Poppins-Bold;
|
|
786
|
+
color: #fff;
|
|
787
|
+
margin: 0 12px;
|
|
788
|
+
min-width: 48px;
|
|
789
|
+
text-align: center;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.postpartido-names-row {
|
|
793
|
+
display: flex;
|
|
794
|
+
justify-content: space-between;
|
|
795
|
+
width: 80%;
|
|
796
|
+
margin: 8px auto 0 auto;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.postpartido-name {
|
|
800
|
+
font-size: 13px;
|
|
801
|
+
color: #fff;
|
|
802
|
+
opacity: 0.8;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.postpartido-footer {
|
|
806
|
+
width: 100%;
|
|
807
|
+
padding: 12px 18px 0 18px;
|
|
808
|
+
display: flex;
|
|
809
|
+
flex-direction: column;
|
|
810
|
+
align-items: flex-start;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.postpartido-version {
|
|
814
|
+
font-size: 16px;
|
|
815
|
+
color: #fff;
|
|
816
|
+
font-family: Poppins-Bold;
|
|
817
|
+
margin-bottom: 2px;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.postpartido-status {
|
|
821
|
+
font-size: 13px;
|
|
822
|
+
color: #b0b8c1;
|
|
823
|
+
margin-bottom: 10px;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.postpartido-btn {
|
|
827
|
+
width: 100%;
|
|
828
|
+
padding: 10px 0;
|
|
829
|
+
border-radius: 24px;
|
|
830
|
+
background: linear-gradient(90deg, #cbee6b 0%, #b6e14b 100%);
|
|
831
|
+
color: #1a2a3a;
|
|
832
|
+
font-family: Poppins-Bold;
|
|
833
|
+
font-size: 16px;
|
|
834
|
+
border: none;
|
|
835
|
+
cursor: pointer;
|
|
836
|
+
margin-top: 8px;
|
|
837
|
+
transition: opacity 0.2s;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.postpartido-btn:hover {
|
|
841
|
+
opacity: 0.8;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.btn-generar-reporte {
|
|
845
|
+
background: linear-gradient(90deg, #cbee6b 0%, #b6e14b 100%);
|
|
846
|
+
border: none;
|
|
847
|
+
border-radius: 24px;
|
|
848
|
+
color: #26323c;
|
|
849
|
+
font-family: Poppins-Bold;
|
|
850
|
+
font-size: 16px;
|
|
851
|
+
padding: 10px 32px;
|
|
852
|
+
cursor: pointer;
|
|
853
|
+
margin-bottom: 24px;
|
|
854
|
+
margin-top: 8px;
|
|
855
|
+
box-shadow: 0 2px 8px 0 rgba(203, 238, 107, 0.15);
|
|
856
|
+
grid-column: span 3;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/* Estados de carga y error */
|
|
860
|
+
.loading-state,
|
|
861
|
+
.error-state {
|
|
862
|
+
display: flex;
|
|
863
|
+
flex-direction: column;
|
|
864
|
+
align-items: center;
|
|
865
|
+
justify-content: center;
|
|
866
|
+
padding: 60px 20px;
|
|
867
|
+
text-align: center;
|
|
868
|
+
color: #fff;
|
|
869
|
+
font-family: 'Poppins-Regular', sans-serif;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
.loading-spinner {
|
|
873
|
+
width: 40px;
|
|
874
|
+
height: 40px;
|
|
875
|
+
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
876
|
+
border-top: 3px solid #cbee6b;
|
|
877
|
+
border-radius: 50%;
|
|
878
|
+
animation: spin 1s linear infinite;
|
|
879
|
+
margin-bottom: 16px;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
@keyframes spin {
|
|
883
|
+
0% {
|
|
884
|
+
transform: rotate(0deg);
|
|
885
|
+
}
|
|
886
|
+
100% {
|
|
887
|
+
transform: rotate(360deg);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.error-state p {
|
|
892
|
+
margin-bottom: 16px;
|
|
893
|
+
color: #ff6b6b;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.retry-button {
|
|
897
|
+
background: linear-gradient(90deg, #cbee6b 0%, #b6e14b 100%);
|
|
898
|
+
border: none;
|
|
899
|
+
border-radius: 8px;
|
|
900
|
+
color: #1a2a3a;
|
|
901
|
+
font-family: 'Poppins-Medium', sans-serif;
|
|
902
|
+
font-size: 14px;
|
|
903
|
+
padding: 10px 20px;
|
|
904
|
+
cursor: pointer;
|
|
905
|
+
transition: opacity 0.2s;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.retry-button:hover {
|
|
909
|
+
opacity: 0.8;
|
|
910
|
+
}
|
|
911
|
+
</style>
|