Skip to content

Commit

Permalink
sveltekit: fix lucide imports
Browse files Browse the repository at this point in the history
  • Loading branch information
while1618 committed Dec 22, 2024
1 parent 95cadc1 commit eebf743
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import { Button } from '$lib/components/ui/button';
import { Separator } from '$lib/components/ui/separator';
import * as Sheet from '$lib/components/ui/sheet';
import { MenuIcon } from 'lucide-svelte';
import MenuIcon from 'lucide-svelte/icons/menu';
import LanguageSwitcher from './language-switcher.svelte';
import ThemeSwitcher from './theme-switcher.svelte';
</script>

<header class="sticky top-0 z-50 bg-primary-foreground py-2">
<header class="bg-primary-foreground sticky top-0 z-50 py-2">
<div class="container">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3 lg:hidden">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { Button } from '$lib/components/ui/button';
import { MoonIcon, SunIcon } from 'lucide-svelte';
import MoonIcon from 'lucide-svelte/icons/moon';
import SunIcon from 'lucide-svelte/icons/sun';
import { toggleMode } from 'mode-watcher';
</script>

Expand Down
14 changes: 6 additions & 8 deletions frontend/svelte-kit/src/lib/components/navbar/user-navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
import { Separator } from '$lib/components/ui/separator';
import * as Sheet from '$lib/components/ui/sheet';
import * as m from '$lib/paraglide/messages.js';
import {
ChartBarIncreasingIcon,
LogOutIcon,
MenuIcon,
SettingsIcon,
UserIcon,
} from 'lucide-svelte';
import ChartBarIncreasingIcon from 'lucide-svelte/icons/chart-bar-increasing';
import LogOutIcon from 'lucide-svelte/icons/log-out';
import MenuIcon from 'lucide-svelte/icons/menu';
import SettingsIcon from 'lucide-svelte/icons/settings';
import UserIcon from 'lucide-svelte/icons/user';
import LanguageSwitcher from './language-switcher.svelte';
import ThemeSwitcher from './theme-switcher.svelte';
Expand All @@ -22,7 +20,7 @@
const { isAdmin }: Props = $props();
</script>

<header class="sticky top-0 z-50 bg-primary-foreground py-2">
<header class="bg-primary-foreground sticky top-0 z-50 py-2">
<div class="container">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3 lg:hidden">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { LoaderCircleIcon } from 'lucide-svelte';
import LoaderCircleIcon from 'lucide-svelte/icons/loader-circle';
</script>

<div class="flex h-screen flex-col items-center justify-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import { page } from '$app/stores';
import { Button } from '$lib/components/ui/button';
import * as m from '$lib/paraglide/messages.js';
import { ChevronLeftIcon, ChevronRightIcon, Ellipsis } from 'lucide-svelte';
import ChevronLeftIcon from 'lucide-svelte/icons/chevron-left';
import ChevronRightIcon from 'lucide-svelte/icons/chevron-right';
import EllipsisIcon from 'lucide-svelte/icons/ellipsis';
interface Props {
currentPage: number;
Expand All @@ -27,7 +29,7 @@

{#if currentPage > 2}
<Button variant="ghost" href="{$page.route.id}?page=1&size={size}">1</Button>
<Ellipsis class="size-4 self-center" />
<EllipsisIcon class="size-4 self-center" />
{/if}

{#if currentPage - 1 > 0}
Expand All @@ -45,7 +47,7 @@
{/if}

{#if currentPage < totalPages - 1}
<Ellipsis class="size-4 self-center" />
<EllipsisIcon class="size-4 self-center" />
<Button variant="ghost" href="{$page.route.id}?page={totalPages}&size={size}">
{totalPages}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import { Button } from '$lib/components/ui/button';
import type { AdminUser } from '$lib/models/user/user';
import * as m from '$lib/paraglide/messages.js';
import { CheckIcon, XIcon } from 'lucide-svelte';
import CheckIcon from 'lucide-svelte/icons/check';
import XIcon from 'lucide-svelte/icons/x';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Label } from '$lib/components/ui/label';
import type { AdminUser } from '$lib/models/user/user';
import * as m from '$lib/paraglide/messages.js';
import { PencilIcon } from 'lucide-svelte';
import PencilIcon from 'lucide-svelte/icons/pencil';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Button, buttonVariants } from '$lib/components/ui/button';
import type { AdminUser } from '$lib/models/user/user';
import * as m from '$lib/paraglide/messages.js';
import { Trash2Icon } from 'lucide-svelte';
import Trash2Icon from 'lucide-svelte/icons/trash-2';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import { Button } from '$lib/components/ui/button';
import type { AdminUser } from '$lib/models/user/user';
import * as m from '$lib/paraglide/messages.js';
import { LockKeyholeIcon, LockKeyholeOpenIcon } from 'lucide-svelte';
import LockKeyholeIcon from 'lucide-svelte/icons/lock-keyhole';
import LockKeyholeOpenIcon from 'lucide-svelte/icons/lock-keyhole-open';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Input } from '$lib/components/ui/input';
import { Label } from '$lib/components/ui/label';
import * as m from '$lib/paraglide/messages.js';
import { LoaderCircle } from 'lucide-svelte';
import LoaderCircleIcon from 'lucide-svelte/icons/loader-circle';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down Expand Up @@ -59,7 +59,7 @@

{#if $submitting}
<Form.Button disabled>
<LoaderCircle class="animate-spin" />
<LoaderCircleIcon class="animate-spin" />
{m.general_send()}
</Form.Button>
{:else}
Expand Down
4 changes: 2 additions & 2 deletions frontend/svelte-kit/src/routes/auth/sign-up/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Input } from '$lib/components/ui/input';
import { Label } from '$lib/components/ui/label';
import * as m from '$lib/paraglide/messages.js';
import { LoaderCircle } from 'lucide-svelte';
import LoaderCircleIcon from 'lucide-svelte/icons/loader-circle';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down Expand Up @@ -88,7 +88,7 @@

{#if $submitting}
<Form.Button disabled>
<LoaderCircle class="animate-spin" />
<LoaderCircleIcon class="animate-spin" />
{m.auth_signUp()}
</Form.Button>
{:else}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Input } from '$lib/components/ui/input/index.js';
import { Label } from '$lib/components/ui/label/index.js';
import * as m from '$lib/paraglide/messages.js';
import { LoaderCircle } from 'lucide-svelte';
import LoaderCircleIcon from 'lucide-svelte/icons/loader-circle';
import { toast } from 'svelte-sonner';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
Expand Down Expand Up @@ -58,7 +58,7 @@

{#if $delayed}
<Form.Button disabled>
<LoaderCircle class="animate-spin" />
<LoaderCircleIcon class="animate-spin" />
{m.general_save()}
</Form.Button>
{:else}
Expand Down

0 comments on commit eebf743

Please sign in to comment.