Perf: Fase 2 optimización de imágenes y asincronía en interfaz finalizada

This commit is contained in:
2026-03-21 16:06:21 -05:00
parent 64c3bbb1d7
commit 3cda38bf8f
8 changed files with 43 additions and 61 deletions

View File

@ -1,4 +1,4 @@
<template>
<template>
<div class="admin-drivers">
<div class="header">
<button class="back-link" @click="router.push('/admin')"> Volver al Panel</button>
@ -19,7 +19,7 @@
<div v-for="taxi in taxis" :key="taxi.id" class="item-card taxi-card">
<div class="card-header">
<div class="avatar">
<img v-if="taxi.image_url" :src="getImageUrl(taxi.image_url)" alt="Taxi">
<AppImage v-if="taxi.image_url" :src="taxi.image_url" type="taxi" alt="Taxi" />
<span v-else class="material-icons">local_taxi</span>
</div>
<div class="info">
@ -167,9 +167,10 @@
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, computed } from 'vue'
import { computed, onMounted, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { supabase } from '@/supabase'
import AppImage from '@/components/AppImage.vue'
const router = useRouter()
const isLoading = ref(false)
@ -324,13 +325,6 @@ function getShiftLabel(shift: string) {
return labels[shift] || shift
}
function getImageUrl(path: string) {
if (!path) return ''
if (path.startsWith('http')) return path
return path
}
</script>
<style scoped>