feat: replace SVG icons with Lucide components in chat and profile pages for improved consistency and maintainability

This commit is contained in:
2025-12-05 05:03:45 -03:00
parent 6e659514e3
commit 8e09e8cada
3 changed files with 25 additions and 115 deletions

View File

@@ -745,9 +745,6 @@
<div class="flex items-start gap-3">
<div class="bg-primary/20 flex h-10 w-10 shrink-0 items-center justify-center rounded-full">
<Bell class="text-primary h-5 w-5" strokeWidth={2} />
d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"
/>
</svg>
</div>
<div class="min-w-0 flex-1">
<p class="text-base-content mb-1 text-sm font-semibold">

View File

@@ -1511,20 +1511,7 @@
class="stat rounded-box border-2 border-primary/30 bg-linear-to-br from-primary/10 to-primary/20 shadow-lg"
>
<div class="stat-figure text-primary">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<Smile class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Em Férias</div>
<div class="stat-value text-primary">
@@ -1677,20 +1664,7 @@
<div class="grid grid-cols-1 gap-4 md:grid-cols-4">
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-warning">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
<FileText class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Total</div>
<div class="stat-value text-warning">
@@ -1751,19 +1725,7 @@
/>
{:else}
<div class="alert alert-info">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="stroke-info h-6 w-6 shrink-0"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<Info class="stroke-info h-6 w-6 shrink-0" strokeWidth={2} />
<span
>Você ainda não possui solicitações de ausência. Clique em "Solicitar Ausência"
para criar uma nova.</span
@@ -1833,10 +1795,6 @@
{#if ausenciasFiltradas.length === 0}
<div class="alert">
<Info class="stroke-info h-6 w-6 shrink-0" strokeWidth={2} />
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<span>Nenhuma solicitação encontrada com os filtros aplicados.</span>
</div>
{:else}
@@ -2183,38 +2141,14 @@
<!-- Mensagens de Sucesso/Erro -->
{#if sucessoSalvarTema}
<div class="alert alert-success shadow-lg">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<CheckCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
<span>{sucessoSalvarTema}</span>
</div>
{/if}
{#if erroSalvarTema}
<div class="alert alert-error shadow-lg">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<XCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
<span>{erroSalvarTema}</span>
</div>
{/if}
@@ -2362,20 +2296,7 @@
onclick={() => (modoFoto = 'avatar')}
disabled={uploadandoFoto}
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="mr-2 h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<Smile class="mr-2 h-5 w-5" strokeWidth={2} />
Escolher Avatar
</button>
<button
@@ -2385,20 +2306,7 @@
onclick={() => (modoFoto = 'upload')}
disabled={uploadandoFoto}
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="mr-2 h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
/>
</svg>
<Camera class="mr-2 h-5 w-5" strokeWidth={2} />
Enviar Foto
</button>
</div>
@@ -2463,19 +2371,7 @@
{#if erroUpload}
<div class="alert alert-error mt-6 shadow-lg">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<XCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
<span class="font-semibold">{erroUpload}</span>
</div>
{/if}

View File

@@ -137,6 +137,23 @@
}
};
// Mapeamento de ícones para componentes Lucide
const iconComponents: Record<FeatureIcon, typeof Settings> = {
control: Settings,
support: Headphones,
shieldCheck: ShieldCheck,
envelope: Mail,
users: Users,
bell: Bell,
monitor: Monitor,
document: FileText,
teams: Users,
userPlus: UserPlus,
clock: Clock,
video: Video,
building: Building
};
// Removido: iconPaths substituído por iconComponents com Lucide
const iconPaths_OLD: Record<FeatureIcon, IconPath[]> = {
control: [