Skip to content

Commit

Permalink
Use lucide icon for everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero Liu committed Nov 10, 2024
1 parent 40cfc31 commit 61e5167
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 278 deletions.
21 changes: 7 additions & 14 deletions src/components/ChatComponents/ChatButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import {
CheckIcon,
CopyClipboardIcon,
DeleteIcon,
EditIcon,
InsertIcon,
RegenerateIcon,
} from "@/components/Icons";
import { USER_SENDER } from "@/constants";
import { ChatMessage } from "@/sharedState";
import { Check, Copy, MessageSquarePlus, PenSquare, RotateCw, Trash2 } from "lucide-react";
import React from "react";

interface ChatButtonsProps {
Expand All @@ -32,15 +25,15 @@ export const ChatButtons: React.FC<ChatButtonsProps> = ({
return (
<div className="chat-message-buttons">
<button onClick={onCopy} className="clickable-icon" title="Copy">
{isCopied ? <CheckIcon /> : <CopyClipboardIcon />}
{isCopied ? <Check /> : <Copy />}
</button>
{message.sender === USER_SENDER ? (
<>
<button onClick={onEdit} className="clickable-icon" title="Edit">
<EditIcon />
<PenSquare />
</button>
<button onClick={onDelete} className="clickable-icon" title="Delete">
<DeleteIcon />
<Trash2 />
</button>
</>
) : (
Expand All @@ -50,13 +43,13 @@ export const ChatButtons: React.FC<ChatButtonsProps> = ({
className="clickable-icon"
title="Insert to note at cursor"
>
<InsertIcon />
<MessageSquarePlus />
</button>
<button onClick={onRegenerate} className="clickable-icon" title="Regenerate">
<RegenerateIcon />
<RotateCw />
</button>
<button onClick={onDelete} className="clickable-icon" title="Delete">
<DeleteIcon />
<Trash2 />
</button>
</>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ChatComponents/ChatSingleMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChatButtons } from "@/components/ChatComponents/ChatButtons";
import { BotIcon, UserIcon } from "@/components/Icons";
import { USER_SENDER } from "@/constants";
import { ChatMessage } from "@/sharedState";
import { BotMessageSquare, User } from "lucide-react";
import { App, Component, MarkdownRenderer } from "obsidian";
import React, { useEffect, useRef, useState } from "react";

Expand Down Expand Up @@ -122,7 +122,7 @@ const ChatSingleMessage: React.FC<ChatSingleMessageProps> = ({
<div className="chat-message-container">
<div className={`message ${message.sender === USER_SENDER ? "user-message" : "bot-message"}`}>
<div className="message-icon">
{message.sender === USER_SENDER ? <UserIcon /> : <BotIcon />}
{message.sender === USER_SENDER ? <User /> : <BotMessageSquare />}
</div>
<div className="message-content-wrapper">
<div className="message-content">
Expand Down
262 changes: 0 additions & 262 deletions src/components/Icons.tsx

This file was deleted.

0 comments on commit 61e5167

Please sign in to comment.