From dae603339b64a9ab8eec743fd097b0241908b329 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 17 Jun 2019 16:32:38 -0400 Subject: [PATCH 1/2] moar discovery --- package.json | 4 +- src/ui/component/button/view.jsx | 1 + src/ui/component/copyableText/view.jsx | 2 +- src/ui/component/fileList/view.jsx | 26 +- src/ui/component/fileListDiscover/index.js | 4 +- src/ui/component/fileListDiscover/view.jsx | 69 ++-- src/ui/component/fileListItem/view.jsx | 4 +- src/ui/component/fileProperties/view.jsx | 3 +- src/ui/component/fileTags/view.jsx | 20 +- src/ui/component/header/index.js | 16 +- src/ui/component/header/view.jsx | 104 +++--- src/ui/component/inviteNew/view.jsx | 4 +- src/ui/component/page/index.js | 16 +- src/ui/component/page/view.jsx | 95 ++---- src/ui/component/recommendedContent/view.jsx | 2 +- src/ui/component/rewardLink/view.jsx | 2 +- src/ui/component/rewardListClaimed/view.jsx | 4 +- src/ui/component/rewardSummary/index.js | 3 +- src/ui/component/rewardSummary/view.jsx | 48 +-- src/ui/component/rewardTile/view.jsx | 4 +- src/ui/component/rewardTotal/index.js | 25 ++ .../rewardTotal/total-background.png | Bin 0 -> 47186 bytes src/ui/component/rewardTotal/view.jsx | 25 ++ src/ui/component/router/view.jsx | 5 +- src/ui/component/sideBar/index.js | 3 +- src/ui/component/sideBar/view.jsx | 43 +-- src/ui/component/subscribeButton/view.jsx | 4 +- src/ui/component/tag/view.jsx | 17 +- src/ui/component/tagsSelect/view.jsx | 1 + src/ui/component/transactionList/index.js | 2 + .../internal/transaction-list-item.jsx | 4 +- src/ui/component/transactionList/view.jsx | 46 ++- .../component/transactionListRecent/index.js | 10 +- .../component/transactionListRecent/view.jsx | 49 +-- src/ui/component/userEmail/index.js | 18 ++ src/ui/component/userEmail/view.jsx | 60 ++++ src/ui/component/userEmailNew/view.jsx | 1 + src/ui/component/userEmailVerify/view.jsx | 2 +- src/ui/component/walletAddress/view.jsx | 6 +- src/ui/component/walletBalance/view.jsx | 8 +- src/ui/component/walletSend/view.jsx | 4 +- src/ui/constants/icons.js | 5 + src/ui/constants/pages.js | 1 + src/ui/constants/tags.js | 14 + src/ui/page/account/index.js | 10 +- src/ui/page/account/view.jsx | 18 +- src/ui/page/auth/index.js | 11 +- src/ui/page/auth/view.jsx | 49 +-- src/ui/page/discover/view.jsx | 2 +- src/ui/page/file/view.jsx | 61 ++-- src/ui/page/help/view.jsx | 14 +- src/ui/page/invite/view.jsx | 5 +- src/ui/page/rewards/view.jsx | 4 +- src/ui/page/sendCredits/index.js | 3 - src/ui/page/sendCredits/view.jsx | 18 -- src/ui/page/subscriptions/index.js | 5 +- src/ui/page/subscriptions/view.jsx | 53 ++- src/ui/page/tags/index.js | 8 +- src/ui/page/tags/view.jsx | 23 +- src/ui/page/transactionHistory/index.js | 8 +- src/ui/page/transactionHistory/view.jsx | 27 +- src/ui/page/userHistory/view.jsx | 2 - src/ui/page/wallet/index.js | 11 + src/ui/page/wallet/view.jsx | 17 + src/ui/reducers.js | 15 +- src/ui/redux/selectors/subscriptions.js | 2 +- src/ui/scss/all.scss | 2 +- src/ui/scss/component/_badge.scss | 3 + src/ui/scss/component/_button.scss | 38 ++- src/ui/scss/component/_card.scss | 55 ++-- src/ui/scss/component/_content.scss | 3 +- src/ui/scss/component/_file-list.scss | 27 +- src/ui/scss/component/_file-properties.scss | 14 +- src/ui/scss/component/_form-field.scss | 12 +- src/ui/scss/component/_header.scss | 42 +-- src/ui/scss/component/_icon.scss | 11 - src/ui/scss/component/_main.scss | 35 +- src/ui/scss/component/_markdown-preview.scss | 8 +- src/ui/scss/component/_media.scss | 31 +- src/ui/scss/component/_navigation.scss | 9 +- src/ui/scss/component/_spinner.scss | 1 + src/ui/scss/component/_table.scss | 29 +- src/ui/scss/component/_tags.scss | 33 +- src/ui/scss/component/_wunderbar.scss | 10 +- src/ui/scss/component/menu-button.scss | 96 ++++++ src/ui/scss/init/_gui.scss | 6 +- src/ui/scss/init/_vars.scss | 2 +- src/ui/util/format-credits.js | 5 +- src/ui/util/use-tween.js | 31 ++ static/locales/en.json | 302 ++++++------------ yarn.lock | 58 +++- 91 files changed, 1123 insertions(+), 890 deletions(-) create mode 100644 src/ui/component/rewardTotal/index.js create mode 100644 src/ui/component/rewardTotal/total-background.png create mode 100644 src/ui/component/rewardTotal/view.jsx create mode 100644 src/ui/component/userEmail/index.js create mode 100644 src/ui/component/userEmail/view.jsx create mode 100644 src/ui/constants/tags.js delete mode 100644 src/ui/page/sendCredits/index.js delete mode 100644 src/ui/page/sendCredits/view.jsx create mode 100644 src/ui/page/wallet/index.js create mode 100644 src/ui/page/wallet/view.jsx delete mode 100644 src/ui/scss/component/_icon.scss create mode 100644 src/ui/scss/component/menu-button.scss create mode 100644 src/ui/util/use-tween.js diff --git a/package.json b/package.json index 6fed1a788..ec02d7d8e 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,8 @@ "postinstall": "electron-builder install-app-deps && node ./build/downloadDaemon.js" }, "dependencies": { + "@reach/menu-button": "^0.1.18", + "@reach/tooltip": "^0.2.1", "electron-dl": "^1.11.0", "electron-log": "^2.2.12", "electron-updater": "^4.0.6", @@ -119,7 +121,7 @@ "jsmediatags": "^3.8.1", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#291324d03f694c4fefa6967aa7be02d9245596a8", + "lbry-redux": "lbryio/lbry-redux#6a447d0542d23b9a37e266f5f85d3bde5297a451", "lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/src/ui/component/button/view.jsx b/src/ui/component/button/view.jsx index 4c62c3aab..0949ecdfb 100644 --- a/src/ui/component/button/view.jsx +++ b/src/ui/component/button/view.jsx @@ -105,6 +105,7 @@ class Button extends React.PureComponent { exact to={path} title={title} + disabled={disabled} onClick={e => { e.stopPropagation(); if (onClick) { diff --git a/src/ui/component/copyableText/view.jsx b/src/ui/component/copyableText/view.jsx index 1ac15adce..5a292719c 100644 --- a/src/ui/component/copyableText/view.jsx +++ b/src/ui/component/copyableText/view.jsx @@ -44,7 +44,7 @@ export default class CopyableText extends React.PureComponent { onFocus={this.onFocus} inputButton={ + + - + )}
- } headerAltControls={ diff --git a/src/ui/page/subscriptions/view.jsx b/src/ui/page/subscriptions/view.jsx index d259d5800..28774a65d 100644 --- a/src/ui/page/subscriptions/view.jsx +++ b/src/ui/page/subscriptions/view.jsx @@ -2,7 +2,7 @@ import * as PAGES from 'constants/pages'; import React, { useEffect } from 'react'; import Page from 'component/page'; -import FileList from 'component/fileList'; +import ClaimList from 'component/claimList'; import Button from 'component/button'; type Props = { @@ -62,7 +62,7 @@ export default function SubscriptionsPage(props: Props) { return (
- {viewingSuggestedSubs ? __('Discover New Channels') : __('Latest From Your Subscriptions')}} headerAltControls={ diff --git a/src/ui/page/tags/view.jsx b/src/ui/page/tags/view.jsx index 148641244..e56be12bc 100644 --- a/src/ui/page/tags/view.jsx +++ b/src/ui/page/tags/view.jsx @@ -1,7 +1,7 @@ // @flow import React from 'react'; import Page from 'component/page'; -import FileListDiscover from 'component/fileListDiscover'; +import ClaimListDiscover from 'component/claimListDiscover'; import Button from 'component/button'; type Props = { @@ -28,7 +28,7 @@ function TagsPage(props: Props) { return ( - state.subscriptions || {}; // Returns the list of channel uris a user is subscribed to export const selectSubscriptions = createSelector( selectState, - state => state.subscriptions.sort((a, b) => a.channelName.localeCompare(b.channelName)) + state => state.subscriptions && state.subscriptions.sort((a, b) => a.channelName.localeCompare(b.channelName)) ); // Fetching list of users subscriptions diff --git a/src/ui/scss/component/_file-list.scss b/src/ui/scss/component/_file-list.scss index 19a78b506..ded90bb46 100644 --- a/src/ui/scss/component/_file-list.scss +++ b/src/ui/scss/component/_file-list.scss @@ -26,7 +26,7 @@ } } -.file-list__header--slim { +.file-list__header--small { height: 3rem; font-size: 1em; } diff --git a/src/ui/scss/component/_navigation.scss b/src/ui/scss/component/_navigation.scss index 059708973..10f8928f6 100644 --- a/src/ui/scss/component/_navigation.scss +++ b/src/ui/scss/component/_navigation.scss @@ -8,7 +8,6 @@ .navigation { width: var(--side-nav-width); font-size: 1.4rem; - position: fixed; @media (max-width: 600px) { display: none; @@ -36,6 +35,10 @@ color: lighten($lbry-black, 20%); margin-top: var(--spacing-miniscule); + .icon { + margin-right: var(--spacing-small); + } + &:hover { color: $lbry-teal-4; .icon { diff --git a/src/ui/scss/component/menu-button.scss b/src/ui/scss/component/menu-button.scss index 6e35834ac..f3613f74a 100644 --- a/src/ui/scss/component/menu-button.scss +++ b/src/ui/scss/component/menu-button.scss @@ -73,7 +73,7 @@ padding-right: 0; span { - margin-left: var(--spacing-tiny); + margin-left: var(--spacing-small); } } @@ -85,7 +85,8 @@ .menu__title, .menu__link { - font-size: 1.2rem; + font-size: 1.3rem; + color: lighten($lbry-black, 20%); .icon { margin-right: var(--spacing-small); diff --git a/static/locales/en.json b/static/locales/en.json index f1400a65e..48e468eef 100644 --- a/static/locales/en.json +++ b/static/locales/en.json @@ -175,5 +175,77 @@ "Try": "Try", "refreshing the app": "refreshing the app", "to fix it": "to fix it", - "Search": "Search" + "Search": "Search", + "Starting up": "Starting up", + "Connecting": "Connecting", + "It looks like you deleted or moved this file. We're rebuilding it now. It will only take a few seconds.": "It looks like you deleted or moved this file. We're rebuilding it now. It will only take a few seconds.", + "Newest First": "Newest First", + "Oldest First": "Oldest First", + "Contact": "Contact", + "Site": "Site", + "Send a tip to": "Send a tip to", + "This will appear as a tip for \"Why I Quit YouTube\".": "This will appear as a tip for \"Why I Quit YouTube\".", + "You sent 10 LBC as a tip, Mahalo!": "You sent 10 LBC as a tip, Mahalo!", + "History": "History", + "/wallet": "/wallet", + "Pending": "Pending", + "You have %s in unclaimed rewards.": "You have %s in unclaimed rewards.", + "Download Directory": "Download Directory", + "LBRY downloads will be saved here.": "LBRY downloads will be saved here.", + "Max Purchase Price": "Max Purchase Price", + "No Limit": "No Limit", + "Choose limit": "Choose limit", + "This will prevent you from purchasing any content over a certain cost, as a safety measure.": "This will prevent you from purchasing any content over a certain cost, as a safety measure.", + "Purchase Confirmations": "Purchase Confirmations", + "Always confirm before purchasing content": "Always confirm before purchasing content", + "Only confirm purchases over a certain price": "Only confirm purchases over a certain price", + "When this option is chosen, LBRY won't ask you to confirm downloads below your chosen price.": "When this option is chosen, LBRY won't ask you to confirm downloads below your chosen price.", + "Content Settings": "Content Settings", + "Show NSFW content": "Show NSFW content", + "NSFW content may include nudity, intense sexuality, profanity, or other adult content. By displaying NSFW content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ": "NSFW content may include nudity, intense sexuality, profanity, or other adult content. By displaying NSFW content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ", + "Notifications": "Notifications", + "Show Desktop Notifications": "Show Desktop Notifications", + "Get notified when a publish is confirmed, or when new content is available to watch.": "Get notified when a publish is confirmed, or when new content is available to watch.", + "Share Diagnostic Data": "Share Diagnostic Data", + "Help make LBRY better by contributing analytics and diagnostic data about my usage.": "Help make LBRY better by contributing analytics and diagnostic data about my usage.", + "You will be ineligible to earn rewards while diagnostics are not being shared.": "You will be ineligible to earn rewards while diagnostics are not being shared.", + "Appearance": "Appearance", + "Theme": "Theme", + "Automatic dark mode (9pm to 8am)": "Automatic dark mode (9pm to 8am)", + "Wallet Security": "Wallet Security", + "Encrypt my wallet with a custom password.": "Encrypt my wallet with a custom password.", + "Secure your local wallet data with a custom password.": "Secure your local wallet data with a custom password.", + "Lost passwords cannot be recovered.": "Lost passwords cannot be recovered.", + "Experimental Settings": "Experimental Settings", + "Automatically download new content from my subscriptions": "Automatically download new content from my subscriptions", + "The latest file from each of your subscriptions will be downloaded for quick access as soon as it's published.": "The latest file from each of your subscriptions will be downloaded for quick access as soon as it's published.", + "Autoplay media files": "Autoplay media files", + "Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.": "Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.", + "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.", + "Application Cache": "Application Cache", + "This will clear the application cache. Your wallet will not be affected.": "This will clear the application cache. Your wallet will not be affected.", + "Clear Cache": "Clear Cache", + "Choose Directory": "Choose Directory", + "Currency": "Currency", + "LBRY Credits (LBC)": "LBRY Credits (LBC)", + "US Dollars": "US Dollars", + "There's nothing available at this location.": "There's nothing available at this location.", + "Loading decentralized data...": "Loading decentralized data...", + "Confirm File Remove": "Confirm File Remove", + "Remove": "Remove", + "Are you sure you'd like to remove": "Are you sure you'd like to remove", + "from the LBRY app?": "from the LBRY app?", + "Also delete this file from my computer": "Also delete this file from my computer", + "Less": "Less", + "Warning!": "Warning!", + "Confirm External Resource": "Confirm External Resource", + "Continue": "Continue", + "This file has been shared with you by other people.": "This file has been shared with you by other people.", + "LBRY Inc is not responsible for its content, click continue to proceed at your own risk.": "LBRY Inc is not responsible for its content, click continue to proceed at your own risk.", + "Find what you were looking for?": "Find what you were looking for?", + "Yes": "Yes", + "No": "No", + "These search results are provided by LBRY, Inc.": "These search results are provided by LBRY, Inc.", + "FILTER": "FILTER", + "View file": "View file" } \ No newline at end of file diff --git a/static/locales/pl.json b/static/locales/pl.json index d00674e60..617233669 100644 --- a/static/locales/pl.json +++ b/static/locales/pl.json @@ -283,5 +283,8 @@ "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." + "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" } \ No newline at end of file