chore: style change

This commit is contained in:
Hk-Gosuto 2023-12-06 13:10:50 +08:00
parent 7f3d261fb2
commit f9846e4813
2 changed files with 25 additions and 19 deletions

View File

@ -556,6 +556,7 @@
} }
.chat-input-image-close { .chat-input-image-close {
background-color: white;
fill: black; fill: black;
border: none; border: none;
align-items: center; align-items: center;
@ -563,11 +564,14 @@
display: flex; display: flex;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
background-color: white;
width: 22px; width: 22px;
height: 48px; height: 48px;
} }
.chat-input-image-close:hover {
background-color: #f3f3f3;
}
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
.chat-input { .chat-input {
font-size: 16px; font-size: 16px;

View File

@ -22,7 +22,8 @@ import MinIcon from "../icons/min.svg";
import ResetIcon from "../icons/reload.svg"; import ResetIcon from "../icons/reload.svg";
import BreakIcon from "../icons/break.svg"; import BreakIcon from "../icons/break.svg";
import SettingsIcon from "../icons/chat-settings.svg"; import SettingsIcon from "../icons/chat-settings.svg";
import DeleteIcon from "../icons/clear.svg"; import ClearIcon from "../icons/clear.svg";
import CloseIcon from "../icons/close.svg";
import PinIcon from "../icons/pin.svg"; import PinIcon from "../icons/pin.svg";
import EditIcon from "../icons/rename.svg"; import EditIcon from "../icons/rename.svg";
import ConfirmIcon from "../icons/confirm.svg"; import ConfirmIcon from "../icons/confirm.svg";
@ -567,21 +568,22 @@ export function ChatActions(props: {
icon={usePlugins ? <EnablePluginIcon /> : <DisablePluginIcon />} icon={usePlugins ? <EnablePluginIcon /> : <DisablePluginIcon />}
/> />
)} )}
{currentModel == "gpt-4-vision-preview" && (
<ChatAction <ChatAction
onClick={selectImage} onClick={selectImage}
text="选择图片" text="选择图片"
icon={<UploadIcon />} icon={<UploadIcon />}
innerNode={ innerNode={
<input <input
type="file" type="file"
accept=".png,.jpg,.webp,.jpeg" accept=".png,.jpg,.webp,.jpeg"
id="chat-image-file-select-upload" id="chat-image-file-select-upload"
style={{ display: "none" }} style={{ display: "none" }}
onChange={onImageSelected} onChange={onImageSelected}
/> />
} }
/> />
)}
{showModelSelector && ( {showModelSelector && (
<Selector <Selector
@ -1289,7 +1291,7 @@ function _Chat() {
<ChatAction <ChatAction
text={Locale.Chat.Actions.Delete} text={Locale.Chat.Actions.Delete}
icon={<DeleteIcon />} icon={<ClearIcon />}
onClick={() => onDelete(message.id ?? i)} onClick={() => onDelete(message.id ?? i)}
/> />
@ -1439,7 +1441,7 @@ function _Chat() {
setUserImage(null); setUserImage(null);
}} }}
> >
X <CloseIcon />
</button> </button>
</div> </div>
)} )}