diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 83c25d0..712bc6f 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -56,6 +56,7 @@ const replaceMarkdown = (text: string): string => { const MessageList: React.FC = () => { const [isLoading, setIsLoading] = useState(false); + const [isSearching, setIsSearching] = useState(false); const [messages, setMessages] = useState([]); const [hasMore, setHasMore] = useState(true); const [curMonth, setCurMonth] = useState(new Date().toISOString().slice(0, 7)); @@ -127,7 +128,7 @@ const MessageList: React.FC = () => { const month = date.slice(0, 7); return ( -
+
{
setIsDropdownOpen(!isDropdownOpen) } > { curMonth } {
{ isDropdownOpen && ( -
+
{ months.map((month) => (
{ type="text" placeholder="Search..." value={ searchTerm } + onFocus={ () => setIsSearching(true) } + onBlur={ () => setIsSearching(false) } + onInput={ handleSearch } onChange={ handleSearch } className="w-full font-mono px-3 py-2 shadow-md text-base placeholder-bg-secondary text-card-bg border-[2.5px] rounded-lg focus:outline-none border-card-bg border-opacity-50 focus:border-dashed" /> @@ -237,8 +247,8 @@ const MessageList: React.FC = () => { dataLength={ filteredMessages.length } next={ loadNextMonth } hasMore={ hasMore } - loader={

加载中...

} - endMessage={

没有更多了...

} + loader={

loading...

} + endMessage={

No More

} > { filteredMessages.map((message, index) => ( diff --git a/tailwind.config.cjs b/tailwind.config.cjs index f775d79..63a2454 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -21,8 +21,8 @@ module.exports = { colors: { 'bg': '#f8f8f8', 'bg-secondary': '#e0e0e0', - 'card-bg': '#3a3a3a', - 'text': '#2a2a2a' + 'card-bg': '#2a2a2a', + 'text': '#1a1a1a' }, }, },