From 52ec4555ee8a2f88997f7b98af92703a516e11a9 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 9 Jul 2019 12:18:06 -0400 Subject: [PATCH 1/5] fix double page count on web --- src/ui/analytics.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/analytics.js b/src/ui/analytics.js index 45a82dc7e..b8bf48261 100644 --- a/src/ui/analytics.js +++ b/src/ui/analytics.js @@ -98,7 +98,9 @@ ReactGA.initialize(UA_ID, { // Manually call the first page view // React Router doesn't include this on `history.listen` +// @if TARGET='web' analytics.pageView(window.location.pathname + window.location.search); +// @endif // @if TARGET='app' ReactGA.set({ checkProtocolTask: null }); -- 2.45.3 From 10fa9d840309355606ec1777e44c8d2d31e70b9f Mon Sep 17 00:00:00 2001 From: kodxana Date: Tue, 9 Jul 2019 20:15:00 +0200 Subject: [PATCH 2/5] Updated Polish translation fixed missing strings --- static/locales/pl.json | 130 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 121 insertions(+), 9 deletions(-) diff --git a/static/locales/pl.json b/static/locales/pl.json index 85fb7d220..7b1a46dfa 100644 --- a/static/locales/pl.json +++ b/static/locales/pl.json @@ -281,13 +281,125 @@ "Delete": "Usuń", "Downloaded to": "Pobrano do", "Open file": "Otwórz plik", - "NEW": "NEW", - "Failed to load settings.": "Failed to load settings.", - "Multi-language support is brand new and incomplete. Switching your language may have unintended consequences.": "Multi-language support is brand new and incomplete. Switching your language may have unintended consequences.", - "Wallet": "Wallet", - "Home": "Home", - "Following": "Following", - "Update ready to install": "Update ready to install", - "Install now": "Install now", - "Edit": "Edit" + "NEW": "NOWE", + "Failed to load settings.": "Błąd ładowania ustawień.", + "Multi-language support is brand new and incomplete. Switching your language may have unintended consequences.": "Obsługa wielu języków jest zupełnie nowa i niekompletna. Zmiana języka może mieć niezamierzone konsekwencje.", + "Wallet": "Portfel", + "Home": "Dom", + "Following": "Subskrybowany", + "Update ready to install": "Aktuazlizacja gotowa do instalacji", + "Install now": "Zainstaluj teraz", + "Edit": "Edytuj", + "Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.": "O o. Strumień w naszym Retro Encabulatorze musi być niezawodny. Spróbuj odświeżyć, aby to naprawić.", + "If you still have issues, your anti-virus software or firewall may be preventing startup.": "Jeśli nadal masz problemy, oprogramowanie antywirusowe lub zapora sieciowa mogą uniemożliwiać uruchomienie.", + "Reach out to hello@lbry.com for help, or check out": "Napisz do nas na adres hello@lbry.com by uzyskać pomoc, albo zobacz", + "Unlock Wallet": "Odblokuj portfel", + "Unlock": "Odblokuj", + "Exit": "Wyjście", + "Your wallet has been encrypted with a local password. Please enter your wallet password to proceed.": "Twój portfel został zaszyfrowany lokalnym hasłem. Wprowadź hasło portfela, aby kontynuować.", + "Wallet Password": "Hasło portfela", + "Account": "Konto", + "Customize": "Dostosuj", + "Customize Your Homepage": "Dostosuj swoją stronę główną", + "For": "dla", + "Tags You Follow": "Tagi, które śledzisz", + "Channels You Follow": "Kanały, które śledzisz", + "Everyone": "Wszyscy", + "View tag": "Wyświetl tag", + "Featured content. Earn rewards for watching.": "Polecane treści. Zarabiaj nagrody za oglądanie.", + "You are subscribed to this channel.": "Subskrybujesz ten kanał.", + "The tags you follow will change what's trending for you.": "Tagi, które śledzisz, zmienią twoje trendy.", + "Remove tag": "Usuń tag", + "Tag Search": "Wyszukiwarka tagów", + "Search for more tags": "Wyszukaj więcej tagów", + "Add tag": "Dodaj tag", + "This file is downloaded.": "Ten plik zostanie pobrany.", + "Customize Your Tags": "Dostosuj swoje tagi", + "Find New Channels": "Znajdź nowe kanały", + "publishes": "publikacje", + "Share Channel": "Udostępnij kanał", + "Go to page:": "Idź do strony:", + "Nothing here yet": "Nic tu jeszcze nie ma", + "Share on Facebook": "Udostępnij na Facebook", + "Share On Twitter": "Udostępnij na Twitter", + "View on lbry.tv": "Wyświetl na lbry.tv", + "Comments": "Komentarze", + "Full screen (f)": "Pełny ekran (f)", + "Fullscreen": "Pełny ekran", + "Got it!": "Rozumiem!", + "Related": "Powiązane", + "No related content found": "Nie znaleziono powiązanych treści", + "Add to your library": "Dodaj do własnej biblioteki", + "Less": "Mniej", + "Comment": "Komentarz", + "Your comment": "Twój komentarz", + "Post": "Umieść", + "Channel": "Kanał", + "Your Library": "Twoja biblioteka", + "Newest First": "Od najnowszych", + "Oldest First": "Od najstarszych", + "The better your tags are, the easier it will be for people to discover your content.": "Im lepsze są twoje tagi, tym łatwiej będzie ludziom odkryć twoją treść.", + "No tags added": "Nie dodano tagów", + "Choose a file": "Wybierz plik", + "My description for this and that": "Mój opis tego i tamtego", + "Add a price to this file": "Dodaj cenę do tego pliku", + "Additional Options": "Dodatkowe opcje", + "A name is required": "Wymagana jest nazwa", + "Checking the winning claim amount...": "Sprawdzanie zwycięskiej kwoty ...", + "Choose a thumbnail": "Wybierz miniaturę", + "Upload your thumbnail to": "Prześlij swoją miniaturę na", + "You have": "Posiadasz", + "in unclaimed rewards": "w nieodebranych nagrodach", + "Claim Rewards": "Odbierz nagrody", + "Earned From Rewards": "Zdobyte z nagród", + "You have...": "Posiadasz...", + "You have no rewards available, please check": "Nie masz dostępnych nagród, sprawdź", + "View file": "Zobacz plik", + "Final Human Proof": "Finalna weryfikacja człowieczeństwa", + "1) Proof via Credit": "1) Dowód za pomocą kartu płatniczej", + "If you have a valid credit or debit card, you can use it to instantly prove your humanity.": "Jeśli masz ważną kartę kredytową lub debetową, możesz jej użyć, aby natychmiast udowodnić swoje człowieczeństwo.", + "LBRY does not store your credit card information. There is no charge at all for this, now or in the future.": "LBRY nie przechowuje informacji o karcie kredytowej. Nie ma żadnych opłat za to, teraz lub w przyszłości.", + "Perform Card Verification": "Wykonaj weryfikację karty", + "A $1 authorization may temporarily appear with your provider.": "Autoryzacja 1 USD może tymczasowo pojawić się u Twojego operatora.", + "Read more about why we do this.": "Przeczytaj więcej o tym, dlaczego to robimy.", + "2) Proof via Phone": "2) Dowód przez telefon", + "You will receive an SMS text message confirming that your phone number is correct.": "Otrzymasz wiadomość tekstową SMS potwierdzającą poprawność numeru telefonu.", + "Submit Phone Number": "Prześlij numer telefonu", + "Standard messaging rates apply. Having trouble?": "Obowiązują standardowe stawki wiadomości. Masz problemy?", + "Read more.": "Czytaj więcej.", + "3) Proof via Chat": "3) Dowód przez czat", + "A moderator capable of approving you is typically available in the discord server. Check out the #rewards-approval channel for more information.": "Moderator, który może Cię zatwierdzić, jest zazwyczaj dostępny na serwerze Discord. Sprawdź kanał #rewards-approval po więcej informacji. ", + "This process will likely involve providing proof of a stable and established online or real-life identity.": "Proces ten będzie prawdopodobnie obejmował dostarczenie dowodu na stabilną i ustaloną tożsamość online lub prawdziwego życia.", + "Join LBRY Chat": "Dołącz na czat LBRY", + "Or, Skip It Entirely": "Lub pomiń go całkowicie", + "You can continue without this step, but you will not be eligible to earn rewards.": "Możesz kontynuować bez tego kroku, ale nie będziesz uprawniony do zdobywania nagród.", + "Skip Rewards": "Pomiń nagrody", + "Confirm Identity": "Potwierdź tożsamość", + "Enter Your Phone Number": "Wprowadź swój numer telefonu", + "Enter your phone number and we will send you a verification code. We will not share your phone number with third parties.": "Wprowadź swój numer telefonu, a wyślemy Ci kod weryfikacyjny. Nie udostępnimy Twojego numeru telefonu osobom trzecim.", + "Country": "Kraj", + "Number": "Numer", + "Path copied.": "Ścieżka skopiowana.", + "Open Folder": "Otwórz Folder", + "Create Backup": "Utwórz Backup", + "Connection Failure": "Błąd połączenia", + "Dark": "Ciemny", + "Light": "Jasny", + "Trending": "Trendy", + "Advanced Editor": "Zaawansowany edytor", + "Try closing all LBRY processes and starting again. If this still happens, your anti-virus software or firewall may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.": "Spróbuj zamknąć wszystkie procesy LBRY i zacznij od nowa. Jeśli jest tak nadal, oprogramowanie antywirusowe lub zapora sieciowa mogą uniemożliwiać połączenie LBRY. Skontaktuj się z hello@lbry.com, jeśli uważasz, że jest to błąd oprogramowania.", + "Balance": "Balans", + "You currently have": "Obecnie masz", + "Recent Transactions": "Ostatnie transakcje", + "Looks like you don't have any recent transactions.": "Wygląda na to, że nie masz żadnych transakcji.", + "Full History": "Pełna historia", + "Prove Humanity": "Udowonij człowieczeństwo", + "Disabled": "Zablokowane", + "Rewards are currently disabled for your account. Turn on diagnostic data sharing, in": "Nagrody są obecnie wyłączone dla twojego konta. Włącz udostępnianie danych diagnostycznych", + ", in order to re-enable them.": ", by je odblokować.", + "Fetching rewards": "Zbieranie nagród", + "No Rewards Available": "Brak dostepnych nagród", + "There are no rewards available at this time, please check back later.": "W tej chwili nie ma żadnych nagród, sprawdź później.", + "You haven't downloaded anything from LBRY yet.": "Nie pobrałeś niczego z LBRY.", + "Explore new content": "Odkrywaj nową zawartość" } -- 2.45.3 From d61057f739c043bab4fb2634e956b79adf266268 Mon Sep 17 00:00:00 2001 From: jessop Date: Tue, 9 Jul 2019 18:19:28 -0400 Subject: [PATCH 3/5] discovery previews use filter api --- src/ui/component/claimPreview/index.js | 3 ++- src/ui/component/claimPreview/view.jsx | 15 +++++++++++++++ src/ui/index.jsx | 9 ++++++++- src/ui/reducers.js | 11 ++++++++++- 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/ui/component/claimPreview/index.js b/src/ui/component/claimPreview/index.js index 6d08b46e0..96bcfdc89 100644 --- a/src/ui/component/claimPreview/index.js +++ b/src/ui/component/claimPreview/index.js @@ -9,7 +9,7 @@ import { makeSelectTitleForUri, makeSelectClaimIsNsfw, } from 'lbry-redux'; -import { selectBlackListedOutpoints } from 'lbryinc'; +import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; import { selectShowNsfw } from 'redux/selectors/settings'; import ClaimPreview from './view'; @@ -23,6 +23,7 @@ const select = (state, props) => ({ title: makeSelectTitleForUri(props.uri)(state), nsfw: makeSelectClaimIsNsfw(props.uri)(state), blackListedOutpoints: selectBlackListedOutpoints(state), + filteredOutpoints: selectFilteredOutpoints(state), }); const perform = dispatch => ({ diff --git a/src/ui/component/claimPreview/view.jsx b/src/ui/component/claimPreview/view.jsx index 4cae67543..a73094fe7 100644 --- a/src/ui/component/claimPreview/view.jsx +++ b/src/ui/component/claimPreview/view.jsx @@ -33,6 +33,10 @@ type Props = { txid: string, nout: number, }>, + filteredOutpoints: Array<{ + txid: string, + nout: number, + }>, }; function ClaimPreview(props: Props) { @@ -51,6 +55,7 @@ function ClaimPreview(props: Props) { placeholder, type, blackListedOutpoints, + filteredOutpoints, } = props; const haventFetched = claim === undefined; const abandoned = !isResolvingUri && !claim && !placeholder; @@ -70,6 +75,16 @@ function ClaimPreview(props: Props) { } } + if (claim && !shouldHide && filteredOutpoints) { + for (let i = 0; i < filteredOutpoints.length; i += 1) { + const outpoint = filteredOutpoints[i]; + if (outpoint.txid === claim.txid && outpoint.nout === claim.nout) { + shouldHide = true; + break; + } + } + } + function handleContextMenu(e) { e.preventDefault(); e.stopPropagation(); diff --git a/src/ui/index.jsx b/src/ui/index.jsx index 23fa738c8..28ab11c74 100644 --- a/src/ui/index.jsx +++ b/src/ui/index.jsx @@ -14,7 +14,13 @@ import { Provider } from 'react-redux'; import { doConditionalAuthNavigate, doDaemonReady, doAutoUpdate, doOpenModal, doHideModal } from 'redux/actions/app'; import { Lbry, doToast, isURIValid, setSearchApi } from 'lbry-redux'; import { doInitLanguage, doUpdateIsNightAsync } from 'redux/actions/settings'; -import { doAuthenticate, Lbryio, rewards, doBlackListedOutpointsSubscribe } from 'lbryinc'; +import { + doAuthenticate, + Lbryio, + rewards, + doBlackListedOutpointsSubscribe, + doFilteredOutpointsSubscribe, +} from 'lbryinc'; import { store, history } from 'store'; import pjson from 'package.json'; import app from './app'; @@ -216,6 +222,7 @@ const init = () => { app.store.dispatch(doInitLanguage()); app.store.dispatch(doBlackListedOutpointsSubscribe()); + app.store.dispatch(doFilteredOutpointsSubscribe()); function onDaemonReady() { // @if TARGET='app' diff --git a/src/ui/reducers.js b/src/ui/reducers.js index 43e83882a..66f0ae7c0 100644 --- a/src/ui/reducers.js +++ b/src/ui/reducers.js @@ -9,7 +9,15 @@ import { tagsReducer, commentReducer, } from 'lbry-redux'; -import { userReducer, rewardsReducer, costInfoReducer, blacklistReducer, homepageReducer, statsReducer } from 'lbryinc'; +import { + userReducer, + rewardsReducer, + costInfoReducer, + blacklistReducer, + filteredReducer, + homepageReducer, + statsReducer, +} from 'lbryinc'; import appReducer from 'redux/reducers/app'; import availabilityReducer from 'redux/reducers/availability'; import contentReducer from 'redux/reducers/content'; @@ -23,6 +31,7 @@ export default history => app: appReducer, availability: availabilityReducer, blacklist: blacklistReducer, + filtered: filteredReducer, claims: claimsReducer, comments: commentReducer, content: contentReducer, -- 2.45.3 From 03837708d17ecd0a3975064986ead89f54c0e989 Mon Sep 17 00:00:00 2001 From: jessop Date: Tue, 9 Jul 2019 18:35:17 -0400 Subject: [PATCH 4/5] updates lbryinc --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c2b052ac..be9a7b11b 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-redux": "lbryio/lbry-redux#bb82aed61a5569e565daa784eb25fc1d639c0c22", - "lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845", + "lbryinc": "lbryio/lbryinc#284cff48c2bdf3ce1004cf67cf3d61bc93005470", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.11", -- 2.45.3 From 178fdfd2a909325b2f0d235a3e13bd8639348bee Mon Sep 17 00:00:00 2001 From: jessop Date: Wed, 10 Jul 2019 21:40:42 -0400 Subject: [PATCH 5/5] refactor --- package.json | 2 +- src/ui/component/claimPreview/view.jsx | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index be9a7b11b..4d17e5211 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-redux": "lbryio/lbry-redux#bb82aed61a5569e565daa784eb25fc1d639c0c22", - "lbryinc": "lbryio/lbryinc#284cff48c2bdf3ce1004cf67cf3d61bc93005470", + "lbryinc": "lbryio/lbryinc#69f9562b016030b481375443f56147ff5e273c0e", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.11", diff --git a/src/ui/component/claimPreview/view.jsx b/src/ui/component/claimPreview/view.jsx index a73094fe7..8da045d10 100644 --- a/src/ui/component/claimPreview/view.jsx +++ b/src/ui/component/claimPreview/view.jsx @@ -65,24 +65,13 @@ function ClaimPreview(props: Props) { let shouldHide = abandoned || (!claimIsMine && obscureNsfw && nsfw); // This will be replaced once blocking is done at the wallet server level + if (claim && !shouldHide && blackListedOutpoints) { - for (let i = 0; i < blackListedOutpoints.length; i += 1) { - const outpoint = blackListedOutpoints[i]; - if (outpoint.txid === claim.txid && outpoint.nout === claim.nout) { - shouldHide = true; - break; - } - } + shouldHide = blackListedOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout); } if (claim && !shouldHide && filteredOutpoints) { - for (let i = 0; i < filteredOutpoints.length; i += 1) { - const outpoint = filteredOutpoints[i]; - if (outpoint.txid === claim.txid && outpoint.nout === claim.nout) { - shouldHide = true; - break; - } - } + shouldHide = filteredOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout); } function handleContextMenu(e) { -- 2.45.3