forked from XiaoMo/ChatGPT-Next-Web
feat: new chat-item avatar
This commit is contained in:
parent
ae479f4a92
commit
a3ca8ea5c4
@ -1,4 +1,6 @@
|
|||||||
import DeleteIcon from "../icons/delete.svg";
|
import DeleteIcon from "../icons/delete.svg";
|
||||||
|
import BotIcon from "../icons/bot.svg";
|
||||||
|
|
||||||
import styles from "./home.module.scss";
|
import styles from "./home.module.scss";
|
||||||
import {
|
import {
|
||||||
DragDropContext,
|
DragDropContext,
|
||||||
@ -35,9 +37,19 @@ export function ChatItem(props: {
|
|||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
{...provided.draggableProps}
|
{...provided.draggableProps}
|
||||||
{...provided.dragHandleProps}
|
{...provided.dragHandleProps}
|
||||||
|
title={`${props.title}\n${Locale.ChatItem.ChatItemCount(
|
||||||
|
props.count,
|
||||||
|
)}`}
|
||||||
>
|
>
|
||||||
{props.narrow ? (
|
{props.narrow ? (
|
||||||
<div className={styles["chat-item-narrow"]}>{props.count}</div>
|
<div className={styles["chat-item-narrow"]}>
|
||||||
|
<div className={styles["chat-item-avatar"] + " no-dark"}>
|
||||||
|
<BotIcon></BotIcon>
|
||||||
|
</div>
|
||||||
|
<div className={styles["chat-item-narrow-count"]}>
|
||||||
|
{props.count}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div className={styles["chat-item-title"]}>{props.title}</div>
|
<div className={styles["chat-item-title"]}>{props.title}</div>
|
||||||
|
@ -154,7 +154,6 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-item:hover {
|
.chat-item:hover {
|
||||||
@ -228,6 +227,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
transition: all ease 0.3s;
|
transition: all ease 0.3s;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.chat-item-narrow {
|
.chat-item-narrow {
|
||||||
@ -237,15 +237,31 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chat-item-narrow {
|
.chat-item-narrow {
|
||||||
font-weight: bolder;
|
|
||||||
font-size: 24px;
|
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
transition: all ease 0.3s;
|
transition: all ease 0.3s;
|
||||||
opacity: 0.1;
|
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.chat-item-avatar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
opacity: 0.1;
|
||||||
|
position: absolute;
|
||||||
|
transform: scale(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-item-narrow-count {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bolder;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--primary);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-item-delete {
|
.chat-item-delete {
|
||||||
|
@ -94,7 +94,7 @@ export function SideBar(props: { className?: string }) {
|
|||||||
<div className={styles["sidebar-sub-title"]}>
|
<div className={styles["sidebar-sub-title"]}>
|
||||||
Build your own AI assistant.
|
Build your own AI assistant.
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["sidebar-logo"]}>
|
<div className={styles["sidebar-logo"] + " no-dark"}>
|
||||||
<ChatGptIcon />
|
<ChatGptIcon />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user