Skip to content

Commit 666fda7

Browse files
aster-voidclaude
andcommitted
treewide: replace unplugin-icons with lucide-svelte
Migrate from unplugin-icons to @lucide/svelte for simpler icon handling. Removes vite plugin dependency and improves tree-shaking with deep imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 90e649d commit 666fda7

16 files changed

+37
-109
lines changed

apps/desktop/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"@codemirror/state": "^6.5.2",
3636
"@codemirror/theme-one-dark": "^6.1.3",
3737
"@codemirror/view": "^6.38.8",
38-
"@iconify-json/mdi": "^1.2.3",
3938
"@lezer/highlight": "^1.2.3",
4039
"@sveltejs/adapter-static": "^3.0.10",
4140
"@tauri-apps/api": "^2.9.1",
@@ -46,7 +45,7 @@
4645
"emoji-picker-element": "^1.28.0",
4746
"robot3": "^1.2.0",
4847
"runed": "^0.37.0",
49-
"unplugin-icons": "^22.5.0",
48+
"@lucide/svelte": "^0.561.0",
5049
"valibot": "^1.2.0"
5150
}
5251
}

apps/desktop/src/components/app/OrganizationSidebar.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts">
22
import type { Organization } from "@apps/api-client";
3+
import ArrowLeftRight from "@lucide/svelte/icons/arrow-left-right";
4+
import Settings from "@lucide/svelte/icons/settings";
35
import type { Snippet } from "svelte";
4-
import MdiCog from "~icons/mdi/cog";
5-
import MdiSwapHorizontal from "~icons/mdi/swap-horizontal";
66
77
interface Props {
88
organization: Organization | undefined;
@@ -29,14 +29,14 @@
2929
class="btn btn-ghost btn-sm btn-square hover-highlight"
3030
title="組織設定"
3131
>
32-
<MdiCog class="text-muted h-4 w-4" />
32+
<Settings class="text-muted size-4" />
3333
</a>
3434
<a
3535
href="/"
3636
class="btn btn-ghost btn-sm btn-square hover-highlight"
3737
title="組織を切り替え"
3838
>
39-
<MdiSwapHorizontal class="text-muted h-4 w-4" />
39+
<ArrowLeftRight class="text-muted size-4" />
4040
</a>
4141
</div>
4242
</header>

apps/desktop/src/components/channels/Channel.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<script lang="ts">
22
import type { Channel as ChannelType, Message } from "@apps/api-client";
3+
import Hash from "@lucide/svelte/icons/hash";
4+
import Search from "@lucide/svelte/icons/search";
35
import { onMount } from "svelte";
46
import {
57
getApiClient,
68
getChannel,
79
unwrapResponse,
810
useQuery,
911
} from "@/lib/api.svelte";
10-
import MdiMagnify from "~icons/mdi/magnify";
11-
import MdiPound from "~icons/mdi/pound";
1212
import MessageInput from "../chat/MessageInput.svelte";
1313
import MessageList from "../chat/MessageList.svelte";
1414
import type { SearchResult } from "../chat/messageSearch.svelte.ts";
@@ -85,7 +85,7 @@
8585
class="border-subtle flex items-center justify-between border-b px-6 py-4"
8686
>
8787
<div class="flex items-center gap-3">
88-
<MdiPound class="h-5 w-5 opacity-50" />
88+
<Hash class="size-5 opacity-50" />
8989
<h1 class="text-base font-semibold">
9090
{selectedChannel.data?.name ?? "..."}
9191
</h1>
@@ -120,8 +120,8 @@
120120
title="検索"
121121
onclick={() => (showSearch = !showSearch)}
122122
>
123-
<MdiMagnify
124-
class="h-5 w-5 opacity-50 transition-opacity duration-150 hover:opacity-80"
123+
<Search
124+
class="size-5 opacity-50 transition-opacity duration-150 hover:opacity-80"
125125
/>
126126
</button>
127127
</div>

apps/desktop/src/components/channels/ChannelList.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script lang="ts">
22
import type { Channel } from "@apps/api-client";
3+
import Hash from "@lucide/svelte/icons/hash";
4+
import Plus from "@lucide/svelte/icons/plus";
5+
import User from "@lucide/svelte/icons/user";
36
import { onMount } from "svelte";
47
import { getApiClient, unwrapResponse, useQuery } from "@/lib/api.svelte";
58
import { UnreadManager } from "@/lib/unread.svelte";
69
import { useWebSocket } from "@/lib/websocket";
710
import type { Selection } from "$components/chat/types";
811
import DMList from "$components/dms/DMList.svelte";
912
import UserSearch from "$components/dms/UserSearch.svelte";
10-
import MdiAccount from "~icons/mdi/account";
11-
import MdiPlus from "~icons/mdi/plus";
12-
import MdiPound from "~icons/mdi/pound";
1313
import CreateChannelButton from "./CreateChannelButton.svelte";
1414
1515
const api = getApiClient();
@@ -65,9 +65,9 @@
6565
: "text-base-content/80 hover:bg-base-300 hover:text-base-content",
6666
]}
6767
>
68-
<MdiPound
68+
<Hash
6969
class={[
70-
"h-4 w-4 flex-shrink-0",
70+
"size-4 flex-shrink-0",
7171
active ? "text-primary" : "text-muted",
7272
]}
7373
/>
@@ -108,7 +108,7 @@
108108
title="新しいDM"
109109
onclick={() => (showUserSearch = !showUserSearch)}
110110
>
111-
<MdiPlus class="text-muted h-4 w-4" />
111+
<Plus class="text-muted size-4" />
112112
</button>
113113
</header>
114114

@@ -134,7 +134,7 @@
134134
href={`/orgs/${organizationId}/personalization`}
135135
class="text-muted hover:bg-base-300 hover:text-base-content flex items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors"
136136
>
137-
<MdiAccount class="h-4 w-4" />
137+
<User class="size-4" />
138138
<span>個人設定</span>
139139
</a>
140140
</footer>

apps/desktop/src/components/channels/CreateChannelButton.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2+
import Plus from "@lucide/svelte/icons/plus";
23
import { getApiClient, unwrapResponse } from "@/lib/api.svelte";
34
import Modal, { ModalManager } from "@/lib/modal/modal.svelte";
4-
import MdiPlus from "~icons/mdi/plus";
55
66
const api = getApiClient();
77
@@ -47,7 +47,7 @@
4747
modalManager.dispatch(createChannelModalContent);
4848
}}
4949
>
50-
<MdiPlus class="text-muted h-4 w-4" />
50+
<Plus class="text-muted size-4" />
5151
</button>
5252

5353
{#snippet createChannelModalContent()}

apps/desktop/src/components/chat/MessageInput.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import type { Message } from "@apps/api-client";
3+
import X from "@lucide/svelte/icons/x";
34
import FileSelector from "@/features/files/upload/Selector.svelte";
4-
import MdiClose from "~icons/mdi/close";
55
import EmojiButton from "./EmojiButton.svelte";
66
import EmojiPalette from "./EmojiPalette.svelte";
77
import FileAttachmentPreview from "./FileAttachmentPreview.svelte";
@@ -41,7 +41,7 @@
4141
class="btn btn-ghost btn-xs btn-square"
4242
onclick={() => (replyingTo = null)}
4343
>
44-
<MdiClose class="h-4 w-4" />
44+
<X class="size-4" />
4545
</button>
4646
</div>
4747
{/if}

apps/desktop/src/components/chat/MessageItem.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts">
22
import type { Message } from "@apps/api-client";
3-
import MdiDotsVertical from "~icons/mdi/dots-vertical";
4-
import MdiPin from "~icons/mdi/pin";
5-
import MdiReply from "~icons/mdi/reply";
3+
import EllipsisVertical from "@lucide/svelte/icons/ellipsis-vertical";
4+
import Pin from "@lucide/svelte/icons/pin";
5+
import Reply from "@lucide/svelte/icons/reply";
66
import FileAttachment from "../../features/files/view/FileAttachment.svelte";
77
import ReactionButtons from "./ReactionButtons.svelte";
88
import VoteViewer from "./VoteViewer.svelte";
@@ -54,7 +54,7 @@
5454
<div
5555
class="mb-2 flex items-center gap-1.5 text-xs opacity-60 transition-opacity duration-150 group-hover:opacity-80"
5656
>
57-
<MdiReply class="h-3 w-3" />
57+
<Reply class="size-3" />
5858
<span class="text-primary/80 font-medium">{parentMessage.author}</span>
5959
<span class="truncate">{parentMessage.content}</span>
6060
</div>
@@ -75,7 +75,7 @@
7575
{/if}
7676
{#if message.pinnedAt}
7777
<span class="text-warning flex items-center gap-1 text-xs opacity-70">
78-
<MdiPin class="h-3 w-3" />
78+
<Pin class="size-3" />
7979
ピン留め
8080
</span>
8181
{/if}
@@ -137,7 +137,7 @@
137137
onclick={onDotsClick}
138138
title="メニュー"
139139
>
140-
<MdiDotsVertical class="h-4 w-4 opacity-60" />
140+
<EllipsisVertical class="size-4 opacity-60" />
141141
</button>
142142
</div>
143143
</article>

apps/desktop/src/components/chat/MessageTextarea.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import Attachment from "@/icons/attachment.svelte";
2+
import Paperclip from "@lucide/svelte/icons/paperclip";
33
44
interface Props {
55
value: string;
@@ -41,7 +41,7 @@
4141
title="ファイルを添付"
4242
type="button"
4343
>
44-
<Attachment />
44+
<Paperclip class="size-4" />
4545
{showFileSelector ? "キャンセル" : "ファイル添付"}
4646
</button>
4747
<button

apps/desktop/src/components/chat/PinnedMessages.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import type { Message } from "@apps/api-client";
3-
import MdiPin from "@/icons/mdi-pin.svelte";
3+
import Pin from "@lucide/svelte/icons/pin";
44
import { getApiClient, unwrapResponse, useQuery } from "@/lib/api.svelte";
55
import { useWebSocket } from "@/lib/websocket";
66
@@ -63,7 +63,7 @@
6363
{#if messages.length > 0}
6464
<div class="bg-base-200 border-b p-2">
6565
<div class="text-warning mb-2 flex items-center gap-2">
66-
<MdiPin class="h-4 w-4" />
66+
<Pin class="size-4" />
6767
<span class="text-sm font-semibold">ピン留めされたメッセージ</span>
6868
</div>
6969
<div class="space-y-1">

apps/desktop/src/components/chat/ReplyBanner.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import type { Message } from "@apps/api-client";
3-
import MdiClose from "@/icons/mdi-close.svelte";
3+
import X from "@lucide/svelte/icons/x";
44
55
interface Props {
66
replyingTo: Message;
@@ -23,6 +23,6 @@
2323
<span class="truncate">: {replyingTo.content}</span>
2424
</div>
2525
<button class="btn btn-ghost btn-circle btn-sm" onclick={onclose}>
26-
<MdiClose />
26+
<X class="size-4" />
2727
</button>
2828
</div>

0 commit comments

Comments
 (0)