From ebe8ad86695484011f6e43a07ee9de7a27af1889 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Mon, 10 Apr 2023 00:55:43 +0800 Subject: [PATCH] Improve UI effect --- web/src/App.js | 2 +- web/src/ChatBox.js | 145 +++++++++++++++++++++++++++----------------- web/src/ChatPage.js | 6 +- 3 files changed, 93 insertions(+), 60 deletions(-) diff --git a/web/src/App.js b/web/src/App.js index a5f2581c..b87a659d 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -629,7 +629,7 @@ class App extends Component { } - {Setting.isMobile() ? + {(Setting.isMobile() || window.location.pathname === "/chat") ? this.renderRouter() : {this.renderRouter()} diff --git a/web/src/ChatBox.js b/web/src/ChatBox.js index 592f1795..8bf1f218 100644 --- a/web/src/ChatBox.js +++ b/web/src/ChatBox.js @@ -43,75 +43,108 @@ class ChatBox extends React.Component { this.setState({inputValue: ""}); }; - render() { + renderList() { return ( -
+
( - - } - title={
{item.text}
} - /> -
- - - + +
+ } + title={
{item.text}
} + /> +
+ + + +
)} /> -
-
-