220 lines
4.5 KiB
TypeScript
220 lines
4.5 KiB
TypeScript
import { createStyles } from "antd-style";
|
|
|
|
export const useStyle = createStyles(({ token, css }) => {
|
|
return {
|
|
menuCollapsed: css`
|
|
width: 0;
|
|
min-width: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: none;
|
|
|
|
transform: translateX(-999px);
|
|
.functionMenu,
|
|
.chooseModel,
|
|
.conversationsContainer {
|
|
display: none;
|
|
}
|
|
`,
|
|
menu: css`
|
|
background: #fff;
|
|
max-width: 320px;
|
|
min-width: 280px;
|
|
width: 320px;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin: 0 15px 0 0;
|
|
padding: 0 20px;
|
|
border-radius: 15px;
|
|
box-sizing: border-box;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
transition: width 0.8s ease-in-out;
|
|
`,
|
|
userProfile: css`
|
|
display: flex;
|
|
height: 30px;
|
|
width: 100%;
|
|
justify-content: flex-start;
|
|
gap: 168px;
|
|
align-items: center;
|
|
padding: 16px 0 16px 8px;
|
|
border-bottom: 1px solid ${token.colorBorderSecondary};
|
|
margin-bottom: 16px;
|
|
img {
|
|
height: 88px;
|
|
width: 88px;
|
|
object-fit: contain;
|
|
}
|
|
`,
|
|
logoClickable: css`
|
|
cursor: pointer;
|
|
transition: all 0.2s ease-in-out;
|
|
border-radius: 4px;
|
|
padding: 2px;
|
|
|
|
&:hover {
|
|
background-color: ${token.colorBgTextHover};
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
&:active {
|
|
transform: scale(0.95);
|
|
}
|
|
`,
|
|
functionMenu: css`
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
padding: 10px 0;
|
|
`,
|
|
functionMenuItem: css`
|
|
padding: 10px 20px;
|
|
cursor: pointer;
|
|
border-radius: 10px;
|
|
transition: all 0.2s;
|
|
background-color: #f3f4f5 !important;
|
|
box-shadow: none !important;
|
|
color: #000F33 !important;
|
|
|
|
&:hover {
|
|
background-color: #000F33 !important;
|
|
color: #ffffff !important;
|
|
}
|
|
|
|
.anticon {
|
|
font-size: 14px;
|
|
margin-right: 0px;
|
|
}
|
|
|
|
span {
|
|
font-size: 14px;
|
|
}
|
|
`,
|
|
chooseModel: css`
|
|
padding-top: 15px;
|
|
display: flex;
|
|
// flex-direction: column;
|
|
color: rgba(0, 0, 0, 0.88);
|
|
margin: 0 0 12px;
|
|
gap: 8px;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 8px;
|
|
`,
|
|
conversationsContainer: css`
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
position: relative;
|
|
`,
|
|
conversationsScrollContainer: css`
|
|
height: 100%;
|
|
overflow: auto;
|
|
padding-right: 2px;
|
|
margin-bottom: 48px;
|
|
`,
|
|
conversationItem: css`
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
margin: 2px 0;
|
|
cursor: pointer;
|
|
border-radius: 10px;
|
|
transition: background-color 0.2s ease;
|
|
|
|
&:hover {
|
|
background-color: ${token.colorBgTextHover};
|
|
}
|
|
|
|
&.active {
|
|
background-color: #EBF0FC;
|
|
}
|
|
`,
|
|
conversationTitle: css`
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 15px;
|
|
flex: 1;
|
|
`,
|
|
actionButtonsContainer: css`
|
|
display: flex;
|
|
gap: 4px;
|
|
visibility: hidden;
|
|
|
|
.active & {
|
|
visibility: visible;
|
|
}
|
|
|
|
.conversationItem:hover & {
|
|
visibility: visible;
|
|
}
|
|
`,
|
|
editButton: css`
|
|
&.ant-btn {
|
|
padding: 0;
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
`,
|
|
deleteButton: css`
|
|
&.ant-btn {
|
|
padding: 0;
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
`,
|
|
titleEditContainer: css`
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
gap: 4px;
|
|
`,
|
|
titleInput: css`
|
|
flex: 1;
|
|
font-size: 15px;
|
|
`,
|
|
titleEditButton: css`
|
|
padding: 0 4px;
|
|
font-size: 16px;
|
|
height: 22px;
|
|
min-width: 22px;
|
|
`,
|
|
collapsedMenuBtn: css`
|
|
position: fixed;
|
|
top: 12px;
|
|
left: 12px;
|
|
z-index: 1000;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: ${token.boxShadowSecondary};
|
|
cursor: pointer;
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
|
|
&:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
`,
|
|
bottomLinkWrapper: css`
|
|
position: absolute;
|
|
left: 20px;
|
|
bottom: 8px;
|
|
z-index: 10;
|
|
`,
|
|
menuTitle: css`
|
|
color: ${token.colorTextTertiary};
|
|
font-size: 14px;
|
|
`,
|
|
};
|
|
});
|