Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32297126
D8302.1765281930.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D8302.1765281930.diff
View Options
diff --git a/web/chat/thread-top-bar.css b/web/chat/thread-top-bar.css
--- a/web/chat/thread-top-bar.css
+++ b/web/chat/thread-top-bar.css
@@ -24,13 +24,6 @@
text-overflow: ellipsis;
}
-button.topBarMenu {
- background-color: transparent;
- border: none;
- cursor: pointer;
- color: var(--thread-top-bar-menu-color);
-}
-
.pinnedCountBanner {
background-color: var(--pinned-count-banner-color);
height: 40px;
@@ -55,3 +48,13 @@
.chevronRight {
vertical-align: middle;
}
+
+.searchButton {
+ color: var(--thread-top-bar-search-button-color);
+ margin-right: 30px;
+}
+
+.buttons {
+ flex-direction: row;
+ display: flex;
+}
diff --git a/web/chat/thread-top-bar.react.js b/web/chat/thread-top-bar.react.js
--- a/web/chat/thread-top-bar.react.js
+++ b/web/chat/thread-top-bar.react.js
@@ -4,6 +4,7 @@
import { ChevronRight } from 'react-feather';
import { useModalContext } from 'lib/components/modal-provider.react.js';
+import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import { threadIsPending } from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
@@ -11,8 +12,10 @@
import ThreadMenu from './thread-menu.react.js';
import css from './thread-top-bar.css';
import ThreadAvatar from '../avatars/thread-avatar.react.js';
+import Button from '../components/button.react.js';
import { InputStateContext } from '../input/input-state.js';
import MessageResultsModal from '../modals/chat/message-results-modal.react.js';
+import MessageSearchModal from '../modals/search/message-search-modal.react.js';
type ThreadTopBarProps = {
+threadInfo: ThreadInfo,
@@ -63,6 +66,16 @@
);
}, [bannerText, pushThreadPinsModal]);
+ const onClickSearch = React.useCallback(
+ () =>
+ pushModal(
+ <InputStateContext.Provider value={inputState}>
+ <MessageSearchModal threadInfo={threadInfo} />
+ </InputStateContext.Provider>,
+ ),
+ [inputState, pushModal, threadInfo],
+ );
+
const { uiName } = useResolvedThreadInfo(threadInfo);
return (
@@ -72,7 +85,16 @@
<ThreadAvatar size="small" threadInfo={threadInfo} />
<div className={css.threadTitle}>{uiName}</div>
</div>
- {threadMenu}
+ <div className={css.buttons}>
+ <Button className={css.button} onClick={onClickSearch}>
+ <SWMansionIcon
+ size={24}
+ icon="search"
+ className={css.searchButton}
+ />
+ </Button>
+ {threadMenu}
+ </div>
</div>
{pinnedCountBanner}
</>
diff --git a/web/theme.css b/web/theme.css
--- a/web/theme.css
+++ b/web/theme.css
@@ -111,7 +111,7 @@
--disconnected-bar-connecting-color: var(--shades-black-100);
--permission-color: var(--shades-white-60);
--thread-top-bar-color: var(--shades-white-100);
- --thread-top-bar-menu-color: var(--shades-white-70);
+ --thread-top-bar-search-button-color: var(--shades-black-60);
--thread-ancestor-keyserver-border: var(--shades-black-70);
--thread-ancestor-color: var(--shades-white-100);
--thread-ancestor-separator-color: var(--shades-white-60);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 9, 12:05 PM (6 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848407
Default Alt Text
D8302.1765281930.diff (3 KB)
Attached To
Mode
D8302: [web] Add message search button
Attached
Detach File
Event Timeline
Log In to Comment