feat: replace SVG icons with Lucide components in various dashboard pages for improved consistency and maintainability

This commit is contained in:
2025-12-04 15:34:24 -03:00
parent 88f25dc6ab
commit eb7f3507d3
14 changed files with 151 additions and 1248 deletions

View File

@@ -4,6 +4,7 @@
import type { FunctionReference } from 'convex/server';
import type { Id, Doc } from '@sgse-app/backend/convex/_generated/dataModel';
import { resolve } from '$app/paths';
import { FileText, ArrowLeft, Plus, Edit, Trash2, X } from 'lucide-svelte';
const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>);
@@ -105,20 +106,7 @@
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
<div class="flex items-center gap-4">
<div class="from-info/15 via-primary/10 to-secondary/10 rounded-2xl bg-gradient-to-br p-3">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-info h-9 w-9"
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="text-info h-9 w-9" strokeWidth={2} />
</div>
<div>
<h1 class="text-base-content text-3xl font-bold">Gerenciar Templates</h1>
@@ -131,20 +119,7 @@
</div>
</div>
<a href="/ti/notificacoes" class="btn btn-outline gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 19l-7-7m0 0l7-7m-7 7h18"
/>
</svg>
<ArrowLeft class="h-5 w-5" strokeWidth={2} />
Voltar para Notificações
</a>
</div>
@@ -163,7 +138,7 @@
class="btn btn-sm btn-circle btn-ghost"
onclick={() => (mensagem = null)}
>
<X class="h-4 w-4" strokeWidth={2} />
</button>
</div>
{/if}
@@ -204,20 +179,7 @@
<div class="mb-4 flex items-center justify-between">
<h2 class="card-title">Templates ({templatesFiltrados.length})</h2>
<a href={resolve('/ti/notificacoes/templates/novo')} class="btn btn-primary gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4v16m8-8H4"
/>
</svg>
<Plus class="h-5 w-5" strokeWidth={2} />
Novo Template
</a>
</div>
@@ -284,20 +246,7 @@
class="btn btn-sm btn-ghost"
title="Editar"
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
/>
</svg>
<Edit class="h-4 w-4" strokeWidth={2} />
</a>
{#if template.tipo === 'customizado'}
<button
@@ -307,20 +256,7 @@
disabled={processando}
title="Excluir"
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
<Trash2 class="h-4 w-4" strokeWidth={2} />
</button>
{/if}
</div>

View File

@@ -6,6 +6,7 @@
import type { Doc, Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { FileText } from 'lucide-svelte';
const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>);
@@ -140,20 +141,7 @@
<div class="mb-4 flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="from-info/15 via-primary/10 to-secondary/10 rounded-2xl bg-gradient-to-br p-3">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-info h-9 w-9"
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="text-info h-9 w-9" strokeWidth={2} />
</div>
<div>
<h1 class="text-base-content text-3xl font-bold">Editar Template</h1>

View File

@@ -5,6 +5,7 @@
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { FileText } from 'lucide-svelte';
const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>);
@@ -86,20 +87,7 @@
<div class="mb-4 flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="bg-gradient-to-br from-info/15 via-primary/10 to-secondary/10 rounded-2xl p-3">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-info h-9 w-9"
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="text-info h-9 w-9" strokeWidth={2} />
</div>
<div>
<h1 class="text-base-content text-3xl font-bold">Novo Template</h1>