mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-30 23:26:39 +08:00
opt: remove icon
This commit is contained in:
parent
568cd7d194
commit
e1684b3014
@ -375,24 +375,14 @@
|
||||
}
|
||||
|
||||
.chat-message-action-edit {
|
||||
font-size: 12px;
|
||||
color: black;
|
||||
opacity: 0.5;
|
||||
color: var(--black);
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.chat-message-action-edit-button {
|
||||
width: 24px;
|
||||
height: 15px;
|
||||
opacity: 1;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border: 1px solid rgba(29.044500000000014, 147.21574999999993, 170.85, 1);
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
&:not(:first-child) {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,6 @@ import MenuIcon from "../icons/menu.svg";
|
||||
import CloseIcon from "../icons/close.svg";
|
||||
import CopyIcon from "../icons/copy.svg";
|
||||
import DownloadIcon from "../icons/download.svg";
|
||||
import OkIcon from "../icons/ok.svg";
|
||||
import ErrorIcon from "../icons/error.svg";
|
||||
|
||||
import { Message, SubmitKey, useChatStore, ChatSession } from "../store";
|
||||
import { showModal, showToast } from "./ui-lib";
|
||||
@ -192,11 +190,11 @@ export function Chat(props: {
|
||||
const fontSize = useChatStore((state) => state.config.fontSize);
|
||||
|
||||
const inputRef = useRef<HTMLTextAreaElement>(null);
|
||||
const MessageInputRefs = useRef<HTMLDivElement[]>([]);
|
||||
const messageInputRefs = useRef<HTMLDivElement[]>([]);
|
||||
// avoid rendered more hooks error
|
||||
const setMessageInputRef = (element: HTMLDivElement | null, index: number) => {
|
||||
if (element) {
|
||||
MessageInputRefs.current[index] = element;
|
||||
messageInputRefs.current[index] = element;
|
||||
}
|
||||
};
|
||||
const [userInput, setUserInput] = useState("");
|
||||
@ -511,14 +509,19 @@ export function Chat(props: {
|
||||
</div>
|
||||
)}
|
||||
{isUser && message.isEditing && (
|
||||
<div className={styles["chat-message-actions"]}>
|
||||
<div className={styles["chat-message-action-edit-button"]} onClick={()=>{confirmEdit(i, MessageInputRefs.current[i].innerText!!)}}>
|
||||
<OkIcon />
|
||||
</div>
|
||||
<div className={styles["chat-message-action-edit-button"]} onClick={()=>{cancelEdit(message)}}>
|
||||
<ErrorIcon />
|
||||
</div>
|
||||
<div style={{display: "flex"}}>
|
||||
<div
|
||||
className={styles["chat-message-action-edit"]}
|
||||
onClick={() => confirmEdit(i, messageInputRefs.current[i].innerText)}>
|
||||
{Locale.Chat.Actions.Confirm}
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={styles["chat-message-action-edit"]}
|
||||
onClick={() => cancelEdit(message)}>
|
||||
{Locale.Chat.Actions.Cancel}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 10 10" fill="none"><defs><rect id="path_0" x="0" y="0" width="10" height="10" /></defs><g opacity="1" transform="translate(0 0) rotate(0 5 5)"><mask id="bg-mask-0" fill="white"><use xlink:href="#path_0"></use></mask><g mask="url(#bg-mask-0)" ><path id="路径 1" style="stroke:#D43030; stroke-width:1.3333333333333333; stroke-opacity:1; stroke-dasharray:0 0" transform="translate(1.25 1.25) rotate(0 3.75 3.75)" d="M6.46,7.5L7.5,6.46L4.79,3.75L7.5,1.04L6.46,0L3.75,2.71L1.04,0L0,1.04L2.71,3.75L0,6.46L1.04,7.5L3.75,4.79L6.46,7.5Z " /></g></g></svg>
|
Before Width: | Height: | Size: 670 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 10 10" fill="none"><defs><rect id="path_0" x="0" y="0" width="10" height="10" /></defs><g opacity="1" transform="translate(0 0) rotate(0 5 5)"><mask id="bg-mask-0" fill="white"><use xlink:href="#path_0"></use></mask><g mask="url(#bg-mask-0)" ><path id="路径 1" style="stroke:#43CF7C; stroke-width:1.3333333333333333; stroke-opacity:1; stroke-dasharray:0 0" transform="translate(0.8333333333332575 1.875) rotate(0 4.166666666666667 3.125)" d="M3.13,6.25L8.33,1.04L7.29,0L3.13,4.17L1.04,2.08L0,3.13L3.13,6.25Z " /></g></g></svg>
|
Before Width: | Height: | Size: 650 B |
@ -17,7 +17,9 @@ const cn = {
|
||||
Copy: "复制",
|
||||
Stop: "停止",
|
||||
Retry: "重试",
|
||||
Edit: "编辑"
|
||||
Edit: "编辑",
|
||||
Confirm: "确认",
|
||||
Cancel: "取消",
|
||||
},
|
||||
Rename: "重命名对话",
|
||||
Typing: "正在输入…",
|
||||
|
@ -20,6 +20,8 @@ const en: LocaleType = {
|
||||
Stop: "Stop",
|
||||
Retry: "Retry",
|
||||
Edit: "Edit",
|
||||
Confirm: "confirm",
|
||||
Cancel: "cancel"
|
||||
},
|
||||
Rename: "Rename Chat",
|
||||
Typing: "Typing…",
|
||||
|
@ -20,6 +20,8 @@ const es: LocaleType = {
|
||||
Stop: "Detener",
|
||||
Retry: "Reintentar",
|
||||
Edit: "Editar",
|
||||
Confirm: "Confirmar",
|
||||
Cancel: "Cancelar",
|
||||
},
|
||||
Rename: "Renombrar chat",
|
||||
Typing: "Escribiendo...",
|
||||
|
Loading…
Reference in New Issue
Block a user