diff --git a/main.js b/main.js index c3622b2ae..5267211b7 100644 --- a/main.js +++ b/main.js @@ -535,7 +535,7 @@ function showAbout() { resizable: false, title: locale.messages.about, autoHideMenuBar: true, - backgroundColor: '#2090EA', + backgroundColor: '#ffffff', show: false, webPreferences: { nodeIntegration: false, diff --git a/stylesheets/_global.scss b/stylesheets/_global.scss index 12eb31a0f..589097abc 100644 --- a/stylesheets/_global.scss +++ b/stylesheets/_global.scss @@ -100,7 +100,8 @@ button.grey { } a { - color: $blue; + cursor: auto; + user-select: text; } .file-input { diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index b61df3693..739a12995 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -1628,12 +1628,6 @@ background-color: rgba(var(--color-sent-message-text), 0.2); } -// Module: Highlighted Message Body - -.module-message-body__highlight { - font-weight: bold; -} - // Module: Search Results .module-search-results { diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 48a027819..a594052e0 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -36,13 +36,13 @@ textarea { input, textarea { user-select: text; - - &::selection { - background: var(--color-text-highlight); - } } } +::selection { + background: var(--color-text-highlight); +} + .shadowed { opacity: $session-shadow-opacity; } diff --git a/ts/components/MessageBodyHighlight.tsx b/ts/components/MessageBodyHighlight.tsx deleted file mode 100644 index f42cfe1f8..000000000 --- a/ts/components/MessageBodyHighlight.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import React from 'react'; - -import { MessageBody } from './conversation/MessageBody'; -import { Emojify } from './conversation/Emojify'; -import { AddNewLines } from './conversation/AddNewLines'; - -import { SizeClassType } from '../util/emoji'; - -import { RenderTextCallbackType } from '../types/Util'; - -type Props = { - text: string; -}; - -const renderNewLines: RenderTextCallbackType = ({ text, key }) => ( - -); - -const renderEmoji = ({ - text, - key, - sizeClass, - renderNonEmoji, -}: { - text: string; - key: number; - sizeClass?: SizeClassType; - renderNonEmoji: RenderTextCallbackType; -}) => ; - -export const MessageBodyHighlight = (props: Props) => { - const { text } = props; - const results: Array = []; - const FIND_BEGIN_END = /<>(.+?)<>/g; - - let match = FIND_BEGIN_END.exec(text); - let last = 0; - let count = 1; - - if (!match) { - return ; - } - - const sizeClass = ''; - - while (match) { - if (last < match.index) { - const beforeText = text.slice(last, match.index); - results.push( - renderEmoji({ - text: beforeText, - sizeClass, - key: count++, - renderNonEmoji: renderNewLines, - }) - ); - } - - const [, toHighlight] = match; - results.push( - - {renderEmoji({ - text: toHighlight, - sizeClass, - key: count++, - renderNonEmoji: renderNewLines, - })} - - ); - - // @ts-ignore - last = FIND_BEGIN_END.lastIndex; - match = FIND_BEGIN_END.exec(text); - } - - if (last < text.length) { - results.push( - renderEmoji({ - text: text.slice(last), - sizeClass, - key: count++, - renderNonEmoji: renderNewLines, - }) - ); - } - - return results; -}; diff --git a/ts/state/ducks/SessionTheme.tsx b/ts/state/ducks/SessionTheme.tsx index 52999b083..df22031c7 100644 --- a/ts/state/ducks/SessionTheme.tsx +++ b/ts/state/ducks/SessionTheme.tsx @@ -50,7 +50,7 @@ const darkConversationItemSelected = '#404040'; const darkConversationItemHasUnread = '#2c2c2c'; const darkConversationList = '#1b1b1b'; -const darkTextHighlight = accentDarkTheme; +const darkTextHighlight = `${white}88`; const darkForegroundPrimary = white; const darkBackgroundPrimary = '#474646'; const darkButtonGreen = accentDarkTheme; @@ -179,7 +179,7 @@ const lightConversationItemSelected = '#f0f0f0'; const lightConversationItemHasUnread = '#fcfcfc'; const lightConversationList = '#f9f9f9'; -const lightTextHighlight = accentLightTheme; +const lightTextHighlight = `${black}88`; const lightForegroundPrimary = white; const lightBackgroundPrimary = '#272726'; const lightButtonGreen = '#272726';