diff --git a/src/ui/analytics.js b/src/ui/analytics.js index 2dffc0b6c..45a82dc7e 100644 --- a/src/ui/analytics.js +++ b/src/ui/analytics.js @@ -6,6 +6,8 @@ import { history } from './store'; import ElectronCookies from '@exponent/electron-cookies'; // @endif +const isProduction = process.env.NODE_ENV === 'production'; + type Analytics = { pageView: string => void, setUser: Object => void, @@ -61,18 +63,20 @@ const analytics: Analytics = { } }, apiLogSearch: () => { - if (analyticsEnabled) { + if (analyticsEnabled && isProduction) { Lbryio.call('event', 'search'); } }, apiLogPublish: () => { - if (analyticsEnabled) { + if (analyticsEnabled && isProduction) { Lbryio.call('event', 'publish'); } }, apiSearchFeedback: (query, vote) => { - // We don't need to worry about analytics enabled here because users manually click on the button to provide feedback - Lbryio.call('feedback', 'search', { query, vote }); + if (isProduction) { + // We don't need to worry about analytics enabled here because users manually click on the button to provide feedback + Lbryio.call('feedback', 'search', { query, vote }); + } }, }; diff --git a/src/ui/page/search/index.js b/src/ui/page/search/index.js index 1abe41438..144c8a76b 100644 --- a/src/ui/page/search/index.js +++ b/src/ui/page/search/index.js @@ -9,7 +9,7 @@ const select = state => ({ }); const perform = dispatch => ({ - doSearch: query => doSearch(query), + search: query => dispatch(doSearch(query)), onFeedbackPositive: query => { analytics.apiSearchFeedback(query, 1); dispatch( diff --git a/src/ui/page/search/view.jsx b/src/ui/page/search/view.jsx index 45967d79d..0bc39f4d2 100644 --- a/src/ui/page/search/view.jsx +++ b/src/ui/page/search/view.jsx @@ -9,7 +9,7 @@ import SearchOptions from 'component/searchOptions'; import Button from 'component/button'; type Props = { - doSearch: string => void, + search: string => void, location: UrlLocation, uris: Array, onFeedbackNegative: string => void, @@ -17,14 +17,8 @@ type Props = { }; export default function SearchPage(props: Props) { - const { - doSearch, - uris, - onFeedbackPositive, - onFeedbackNegative, - location: { search }, - } = props; - const urlParams = new URLSearchParams(search); + const { search, uris, onFeedbackPositive, onFeedbackNegative, location } = props; + const urlParams = new URLSearchParams(location.search); const urlQuery = urlParams.get('q'); const isValid = isURIValid(urlQuery); @@ -35,9 +29,10 @@ export default function SearchPage(props: Props) { useEffect(() => { if (urlQuery) { - doSearch(urlQuery); + console.log('search', urlQuery); + search(urlQuery); } - }, [doSearch, urlQuery]); + }, [search, urlQuery]); return ( diff --git a/src/ui/scss/component/_file-list.scss b/src/ui/scss/component/_file-list.scss index ded90bb46..cc08e1b85 100644 --- a/src/ui/scss/component/_file-list.scss +++ b/src/ui/scss/component/_file-list.scss @@ -1,7 +1,7 @@ .file-list__header { display: flex; align-items: center; - height: 4.5rem; + min-height: 4.5rem; padding: var(--spacing-medium); font-size: 1rem; // Ensures select & header text have same font-size color: $lbry-white; @@ -24,6 +24,11 @@ color: $lbry-teal-1; } } + + // Fix this in @lbry/components, we shouldn't need to be this specific + checkbox-element input[type='checkbox']:checked + label { + color: $lbry-white; + } } .file-list__header--small { diff --git a/static/locales/en.json b/static/locales/en.json index 240e27e31..770d0e5b5 100644 --- a/static/locales/en.json +++ b/static/locales/en.json @@ -251,5 +251,38 @@ "Waiting for blob.": "Waiting for blob.", "Waiting for metadata.": "Waiting for metadata.", "Sorry, looks like we can't play this file.": "Sorry, looks like we can't play this file.", - "Sorry, looks like we can't preview this file.": "Sorry, looks like we can't preview this file." + "Sorry, looks like we can't preview this file.": "Sorry, looks like we can't preview this file.", + "Search For": "Search For", + "Files": "Files", + "Channels": "Channels", + "Everything": "Everything", + "File Types": "File Types", + "Videos": "Videos", + "Audio": "Audio", + "Images": "Images", + "Text": "Text", + "Other Files": "Other Files", + "Other Options": "Other Options", + "Returned Results": "Returned Results", + "Custom Code": "Custom Code", + "Are you a supermodel or rockstar that received a custom reward code? Claim it here.": "Are you a supermodel or rockstar that received a custom reward code? Claim it here.", + "Get": "Get", + "Go To Invites": "Go To Invites", + "Enter Code": "Enter Code", + "Reward history is tied to your email. In case of lost or multiple wallets, your balance may differ from the amounts claimed": "Reward history is tied to your email. In case of lost or multiple wallets, your balance may differ from the amounts claimed", + "Views": "Views", + "Edit": "Edit", + "Copied": "Copied", + "View": "View", + "Full screen (f)": "Full screen (f)", + "Fullscreen": "Fullscreen", + "The publisher has chosen to charge LBC to view this content. Your balance is currently too low to view it.": "The publisher has chosen to charge LBC to view this content. Your balance is currently too low to view it.", + "Checkout": "Checkout", + "the rewards page": "the rewards page", + "or send more LBC to your wallet.": "or send more LBC to your wallet.", + "Requesting stream...": "Requesting stream...", + "Connecting...": "Connecting...", + "Downloading stream... not long left now!": "Downloading stream... not long left now!", + "Downloading: ": "Downloading: ", + "% complete": "% complete" } \ No newline at end of file