mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
Improve chat menu height
This commit is contained in:
parent
e4fd9cca92
commit
d01d63d82a
@ -132,7 +132,7 @@ class ChatMenu extends React.Component {
|
||||
const items = this.chatsToItems(this.props.chats);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<Button
|
||||
icon={<PlusOutlined />}
|
||||
style={{
|
||||
@ -158,6 +158,7 @@ class ChatMenu extends React.Component {
|
||||
New Chat
|
||||
</Button>
|
||||
<Menu
|
||||
style={{maxHeight: "calc(100vh - 140px - 40px - 8px)", overflowY: "auto"}}
|
||||
mode="inline"
|
||||
openKeys={this.state.openKeys}
|
||||
selectedKeys={this.state.selectedKeys}
|
||||
@ -165,7 +166,7 @@ class ChatMenu extends React.Component {
|
||||
onSelect={this.onSelect}
|
||||
items={items}
|
||||
/>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ class ChatPage extends BaseListPage {
|
||||
|
||||
return (
|
||||
<div style={{display: "flex", height: "calc(100vh - 140px)"}}>
|
||||
<div style={{width: "250px", height: "100%", backgroundColor: "white", borderRight: "1px solid rgb(245,245,245)"}}>
|
||||
<div style={{width: "250px", height: "100%", backgroundColor: "white", borderRight: "1px solid rgb(245,245,245)", borderBottom: "1px solid rgb(245,245,245)"}}>
|
||||
<ChatMenu ref={this.menu} chats={chats} onSelectChat={onSelectChat} onAddChat={onAddChat} onDeleteChat={onDeleteChat} />
|
||||
</div>
|
||||
<div style={{flex: 1, height: "100%", backgroundColor: "white", position: "relative"}}>
|
||||
@ -194,6 +194,7 @@ class ChatPage extends BaseListPage {
|
||||
backgroundBlendMode: "luminosity",
|
||||
filter: "grayscale(80%) brightness(140%) contrast(90%)",
|
||||
opacity: 0.5,
|
||||
pointerEvents: "none",
|
||||
}}>
|
||||
</div>
|
||||
)
|
||||
@ -217,7 +218,7 @@ class ChatPage extends BaseListPage {
|
||||
if (setLoading) {
|
||||
this.setState({loading: true});
|
||||
}
|
||||
ChatBackend.getChats("admin", params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
|
||||
ChatBackend.getChats("admin", params.pagination.current, -1, field, value, sortField, sortOrder)
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
this.setState({
|
||||
|
Loading…
x
Reference in New Issue
Block a user