Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
698a23c7f2 |
No files matched your search
+16
-1
@@ -7,18 +7,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
## [Unreleased for Desktop]
|
||||
|
||||
### Added
|
||||
|
||||
- Private and Publishable Playlists ([#6157](https://github.com/lbryio/lbry-desktop/pull/6157))
|
||||
- Channel thumbnails in following side menu ([#6193](https://github.com/lbryio/lbry-desktop/pull/6193))
|
||||
- Web is now PWA app ([#6120](https://github.com/lbryio/lbry-desktop/pull/6120))
|
||||
- Send a tip with your comment ([#5920](https://github.com/lbryio/lbry-desktop/issues/5920))
|
||||
- Search for tags in search dropdown ([#5876](https://github.com/lbryio/lbry-desktop/issues/5876))
|
||||
- Japanese, Afrikaans, Filipino, Thai and Vietnamese language support ([#5684](https://github.com/lbryio/lbry-desktop/issues/5684))
|
||||
- Brazilian-Portuguese language support ([#5900](https://github.com/lbryio/lbry-desktop/issues/5900))
|
||||
- Highlight comments made by content owner _community pr!_ ([#5744](https://github.com/lbryio/lbry-desktop/pull/5744))
|
||||
- Ability to report infringing content directly from the application ([#5808](https://github.com/lbryio/lbry-desktop/pull/5808))
|
||||
- Re-added ability to export wallet transactions ([#5899](https://github.com/lbryio/lbry-desktop/pull/5899))
|
||||
- 24-hour clock setting _community pr!_ ([#5820](https://github.com/lbryio/lbry-desktop/pull/5820))
|
||||
- "Related" (recommendations) section: added option to view more from current creator _community pr!_ ([#5847](https://github.com/lbryio/lbry-desktop/pull/5847))
|
||||
- Wallet: ability to swap cryptocurrency into LBC ([#5654](https://github.com/lbryio/lbry-desktop/pull/5654))
|
||||
- Wallet: ability to send LBC directly to a user through a name or URL search _community pr!_ ([#5990](https://github.com/lbryio/lbry-desktop/pull/5990))
|
||||
- Publish: ability to edit the Release Date field ([#6049](https://github.com/lbryio/lbry-desktop/pull/6049))
|
||||
- Creator Settings: ability to mute specific words in comments ([#5934](https://github.com/lbryio/lbry-desktop/pull/5934))
|
||||
- Creator Settings: ability to disable comments + assign moderators ([#6199](https://github.com/lbryio/lbry-desktop/pull/6199))
|
||||
- Additional options in context-menu _community pr!_ ([#6106](https://github.com/lbryio/lbry-desktop/pull/6106))
|
||||
|
||||
### Changed
|
||||
|
||||
- Keyboard shortcut additions and changes _community pr!_ ([#5717](https://github.com/lbryio/lbry-desktop/pull/5717))
|
||||
- Removed the 10k character-limit when editing _Posts_ ([#5719](https://github.com/lbryio/lbry-desktop/pull/5719))
|
||||
- Improved search functionality (more filters, infinite-scroll, etc.) ([#5742](https://github.com/lbryio/lbry-desktop/pull/5742))
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -27,6 +39,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Autoplay looping to a previous video or itself ([#5711](https://github.com/lbryio/lbry-desktop/pull/5711))
|
||||
- Autoplay not working in mini-player mode ([#5716](https://github.com/lbryio/lbry-desktop/pull/5716))
|
||||
- Edited claim accidentally moved to 'Anonymous' ([#5767](https://github.com/lbryio/lbry-desktop/pull/5767))
|
||||
- Squished "Upload Date" and "View Count" on smaller screens _community pr!_ ([#5823](https://github.com/lbryio/lbry-desktop/pull/5823))
|
||||
- Home and End key not working in search bar ([#5867](https://github.com/lbryio/lbry-desktop/pull/5867))
|
||||
- Unable to buy paid-Images or Posts ([#6114](https://github.com/lbryio/lbry-desktop/pull/6114))
|
||||
|
||||
## [0.50.2] - [2021-04-2]
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ _Note: If coming from a deb install, the directory structure is different and yo
|
||||
| | Flatpak | Arch | Nixpkgs | ARM/ARM64 |
|
||||
| -------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------- |
|
||||
| Latest Release | [FlatHub Page](https://flathub.org/apps/details/io.lbry.lbry-app) | [AUR Package](https://aur.archlinux.org/packages/lbry-app-bin/) | [Nixpkgs](https://search.nixos.org/packages?channel=unstable&show=lbry&query=lbry) | [Build Guide](https://lbry.tv/@LBRYarm:5) |
|
||||
| Maintainers | [@kcSeb](https://keybase.io/kcseb) | [@kcSeb](https://keybase.io/kcseb)/[@TimurKiyivinski](https://github.com/TimurKiyivinski) | [@Enderger](https://github.com/enderger) | [@Madiator2011](https://github.com/kodxana) |
|
||||
| Maintainers | [@kcSeb](https://keybase.io/kcseb) | [@kcSeb](https://keybase.io/kcseb) | [@Enderger](https://github.com/enderger) | [@Madiator2011](https://github.com/kodxana) |
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Vendored
+42
-1
@@ -37,10 +37,19 @@ declare type CommentsState = {
|
||||
myReactsByCommentId: any,
|
||||
othersReactsByCommentId: any,
|
||||
pendingCommentReactions: Array<string>,
|
||||
moderationBlockList: ?Array<string>,
|
||||
moderationBlockList: ?Array<string>, // @KP rename to "personalBlockList"?
|
||||
adminBlockList: ?Array<string>,
|
||||
moderatorBlockList: ?Array<string>,
|
||||
moderatorBlockListDelegatorsMap: {[string]: Array<string>}, // {"blockedUri": ["delegatorUri1", ""delegatorUri2", ...]}
|
||||
fetchingModerationBlockList: boolean,
|
||||
moderationDelegatesById: { [string]: Array<{ channelId: string, channelName: string }> },
|
||||
fetchingModerationDelegates: boolean,
|
||||
moderationDelegatorsById: { [string]: { global: boolean, delegators: { name: string, claimId: string } }},
|
||||
fetchingModerationDelegators: boolean,
|
||||
blockingByUri: {},
|
||||
unBlockingByUri: {},
|
||||
togglingForDelegatorMap: {[string]: Array<string>}, // {"blockedUri": ["delegatorUri1", ""delegatorUri2", ...]}
|
||||
commentsDisabledChannelIds: Array<string>,
|
||||
settingsByChannelId: { [string]: PerChannelSettings }, // ChannelID -> settings
|
||||
fetchingSettings: boolean,
|
||||
fetchingBlockedWords: boolean,
|
||||
@@ -87,6 +96,38 @@ declare type SuperListParams = {};
|
||||
|
||||
declare type ModerationBlockParams = {};
|
||||
|
||||
declare type ModerationAddDelegateParams = {
|
||||
mod_channel_id: string,
|
||||
mod_channel_name: string,
|
||||
creator_channel_id: string,
|
||||
creator_channel_name: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationRemoveDelegateParams = {
|
||||
mod_channel_id: string,
|
||||
mod_channel_name: string,
|
||||
creator_channel_id: string,
|
||||
creator_channel_name: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationListDelegatesParams = {
|
||||
creator_channel_id: string,
|
||||
creator_channel_name: string,
|
||||
signature: string,
|
||||
signing_ts: string,
|
||||
};
|
||||
|
||||
declare type ModerationAmIParams = {
|
||||
channel_name: string,
|
||||
channel_id: string,
|
||||
signature: string,
|
||||
signing_ts: string
|
||||
};
|
||||
|
||||
declare type SettingsParams = {
|
||||
channel_name: string,
|
||||
channel_id: string,
|
||||
|
||||
Vendored
+2
-3
@@ -4,12 +4,12 @@ declare type HomepageObject = {
|
||||
options: any,
|
||||
route: string,
|
||||
title: string,
|
||||
};
|
||||
}
|
||||
|
||||
declare type HomepageData = {
|
||||
[string]: HomepageObject,
|
||||
default: any => any,
|
||||
};
|
||||
}
|
||||
|
||||
declare type RowDataItem = {
|
||||
title: any,
|
||||
@@ -19,7 +19,6 @@ declare type RowDataItem = {
|
||||
extra?: any,
|
||||
options?: {
|
||||
channelIds?: Array<string>,
|
||||
limitClaimsPerChannel?: number,
|
||||
pageSize: number,
|
||||
},
|
||||
route?: string,
|
||||
|
||||
Vendored
+1
@@ -23,4 +23,5 @@ declare type LivestreamReplayData = Array<LivestreamReplayItem>;
|
||||
|
||||
declare type LivestreamState = {
|
||||
fetchingById: {},
|
||||
viewersById: {},
|
||||
}
|
||||
+186
-1245
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lbry",
|
||||
"version": "0.50.3-rc.1",
|
||||
"version": "0.51.0-rc.1",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -154,6 +154,7 @@
|
||||
"node-fetch": "^2.6.1",
|
||||
"node-libs-browser": "^2.1.0",
|
||||
"node-loader": "^0.6.0",
|
||||
"node-wget": "^0.4.3",
|
||||
"nodemon": "^1.19.1",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
|
||||
+70
-19
@@ -386,7 +386,7 @@
|
||||
"All time": "All time",
|
||||
"Share on Reddit": "Share on Reddit",
|
||||
"Share on Facebook": "Share on Facebook",
|
||||
"Share On Twitter": "Share On Twitter",
|
||||
"Share on Twitter": "Share on Twitter",
|
||||
"Share on Telegram": "Share on Telegram",
|
||||
"Share via...": "Share via...",
|
||||
"View on lbry.tv": "View on lbry.tv",
|
||||
@@ -852,6 +852,7 @@
|
||||
"Last Updated": "Last Updated",
|
||||
"Are you sure? Type %name% to confirm that you wish to delete the channel.": "Are you sure? Type %name% to confirm that you wish to delete the channel.",
|
||||
"You're about to permanently delete a channel. Content published under this channel will be orphaned and their signing channel invalid. Content sync programs using this channel will fail.": "You're about to permanently delete a channel. Content published under this channel will be orphaned and their signing channel invalid. Content sync programs using this channel will fail.",
|
||||
"Are you sure you'd like to remove \"%title%\"?": "Are you sure you'd like to remove \"%title%\"?",
|
||||
"You are signed into lbry.tv which automatically shares data with LBRY inc. %signout_button%.": "You are signed into lbry.tv which automatically shares data with LBRY inc. %signout_button%.",
|
||||
"LBRY works better if you find and follow a couple creators you like. You can also block channels you never want to see.": "LBRY works better if you find and follow a couple creators you like. You can also block channels you never want to see.",
|
||||
"Nice! You are currently following %followingCount% creator": "Nice! You are currently following %followingCount% creator",
|
||||
@@ -879,6 +880,7 @@
|
||||
"Tag selection": "Tag selection",
|
||||
"Select some tags to help us show you interesting things.": "Select some tags to help us show you interesting things.",
|
||||
"You are currently following %followingCount% tags": "You are currently following %followingCount% tags",
|
||||
"You are currently following %followingCount% tag": "You are currently following %followingCount% tag",
|
||||
"Back": "Back",
|
||||
"Experimental Transcoding": "Experimental Transcoding",
|
||||
"A Folder containing FFmpeg": "A Folder containing FFmpeg",
|
||||
@@ -1200,6 +1202,7 @@
|
||||
"Channel to show support as": "Channel to show support as",
|
||||
"Buy more LBRY Credits": "Buy more LBRY Credits",
|
||||
"Buy or swap more LBRY Credits": "Buy or swap more LBRY Credits",
|
||||
"Buy or Swap": "Buy or Swap",
|
||||
"Support this content": "Support this content",
|
||||
"Custom support amount": "Custom support amount",
|
||||
"(%lbc_balance% Credits available)": "(%lbc_balance% Credits available)",
|
||||
@@ -1266,6 +1269,8 @@
|
||||
"(6.25:1)": "(6.25:1)",
|
||||
"(1:1)": "(1:1)",
|
||||
"You Followed Your First Channel!": "You Followed Your First Channel!",
|
||||
"You followed %CHANNEL_NAME%!": "You followed %CHANNEL_NAME%!",
|
||||
"Unfollowed %CHANNEL_NAME%.": "Unfollowed %CHANNEL_NAME%.",
|
||||
"Awesome! You just followed your first channel.": "Awesome! You just followed your first channel.",
|
||||
"You will receive notifications related to new content.": "You will receive notifications related to new content.",
|
||||
"Log in with %SITE_NAME% to receive notifications about new content.": "Log in with %SITE_NAME% to receive notifications about new content.",
|
||||
@@ -1289,6 +1294,7 @@
|
||||
"Check the status of various LBRY services.": "Check the status of various LBRY services.",
|
||||
"Check Status": "Check Status",
|
||||
"Upload your thumbnail to %domain%. Recommended size is 16:9.": "Upload your thumbnail to %domain%. Recommended size is 16:9.",
|
||||
"(16:9)": "(16:9)",
|
||||
"Are you sure you want to upload this thumbnail to %domain%": "Are you sure you want to upload this thumbnail to %domain%",
|
||||
"View thumbnail": "View thumbnail",
|
||||
"These changes will appear shortly.": "These changes will appear shortly.",
|
||||
@@ -1298,12 +1304,13 @@
|
||||
"Blocked": "Blocked",
|
||||
"Unblock": "Unblock",
|
||||
"Unblocking...": "Unblocking...",
|
||||
"Channel blocked. You will not see them again.": "Channel blocked. You will not see them again.",
|
||||
"Channel \"%channel%\" blocked.": "Channel \"%channel%\" blocked.",
|
||||
"Mute Channel": "Mute Channel",
|
||||
"Unmute Channel": "Unmute Channel",
|
||||
"Muted": "Muted",
|
||||
"Mute": "Mute",
|
||||
"Unmute": "Unmute",
|
||||
"Channel muted. You will not see them again.": "Channel muted. You will not see them again.",
|
||||
"Manage notifications": "Manage notifications",
|
||||
"Uploads": "Uploads",
|
||||
"All uploads": "All uploads",
|
||||
@@ -1451,7 +1458,6 @@
|
||||
"Never fear though, there are tons of ways to earn %lbc%. You can earn or purchase %lbc%, or you can have your friends send you some.": "Never fear though, there are tons of ways to earn %lbc%. You can earn or purchase %lbc%, or you can have your friends send you some.",
|
||||
"gaming, comedy, educational": "gaming, comedy, educational",
|
||||
"A channel is required to comment on %SITE_NAME%": "A channel is required to comment on %SITE_NAME%",
|
||||
"A channel is required to comment on lbry.tv": "A channel is required to comment on lbry.tv",
|
||||
"A welcome bonus and thank you for your contribution to content freedom.": "A welcome bonus and thank you for your contribution to content freedom.",
|
||||
"You earned %lbc% new user reward.": "You earned %lbc% new user reward.",
|
||||
"Just press play on something. Anything at all. Yep, even that one. Everybody's doing it.": "Just press play on something. Anything at all. Yep, even that one. Everybody's doing it.",
|
||||
@@ -1584,6 +1590,9 @@
|
||||
"This link leads to an external website.": "This link leads to an external website.",
|
||||
"No Content Found": "No Content Found",
|
||||
"No Lists Found": "No Lists Found",
|
||||
"You have no lists! Create one from any playable content.": "You have no lists! Create one from any playable content.",
|
||||
"Pick": "Pick",
|
||||
"You have unpublished lists! %pick% one and publish it!": "You have unpublished lists! %pick% one and publish it!",
|
||||
"No Reposts Found": "No Reposts Found",
|
||||
"Publish Something": "Publish Something",
|
||||
"Repost Something": "Repost Something",
|
||||
@@ -1671,7 +1680,8 @@
|
||||
"%balance% available.": "%balance% available.",
|
||||
"Unlock all tips": "Unlock all tips",
|
||||
"Unlock All": "Unlock All",
|
||||
"just like the simulations": "just like the simulations",
|
||||
"Working...": "Working...",
|
||||
"this cave is not a natural formation": "this cave is not a natural formation",
|
||||
"Moon cheese is an acquired taste": "Moon cheese is an acquired taste",
|
||||
"Nothing found here. Like big tech ethics.": "Nothing found here. Like big tech ethics.",
|
||||
"Level %current_level%": "Level %current_level%",
|
||||
@@ -1683,13 +1693,32 @@
|
||||
"Transaction limit reached. Try reducing the Description length.": "Transaction limit reached. Try reducing the Description length.",
|
||||
"You do not have any muted channels": "You do not have any muted channels",
|
||||
"You do not have any blocked channels": "You do not have any blocked channels",
|
||||
"Blocked channels will be invisible to you in the app. They will not be able to comment on your content, or reply to you comments left on other channels' content.": "Blocked channels will be invisible to you in the app. They will not be able to comment on your content, or reply to you comments left on other channels' content.",
|
||||
"You do not have any globally-blocked channels": "You do not have any globally-blocked channels",
|
||||
"You do not have any blocked channels as a moderator": "You do not have any blocked channels as a moderator",
|
||||
"Blocked channels will be invisible to you in the app. They will not be able to comment on your content, nor reply to your comments left on other channels' content.": "Blocked channels will be invisible to you in the app. They will not be able to comment on your content, nor reply to your comments left on other channels' content.",
|
||||
"Muted channels will be invisible to you in the app. They will not know they are muted and can still interact with you and your content.": "Muted channels will be invisible to you in the app. They will not know they are muted and can still interact with you and your content.",
|
||||
"List of channels that you have blocked as a moderator, along with the list of delegators.": "List of channels that you have blocked as a moderator, along with the list of delegators.",
|
||||
"This is the global block list.": "This is the global block list.",
|
||||
"This channel is blocked": "This channel is blocked",
|
||||
"This channel is muted": "This channel is muted",
|
||||
"Are you sure you want to view this content? Viewing will not unblock @%channel%": "Are you sure you want to view this content? Viewing will not unblock @%channel%",
|
||||
"Are you sure you want to view this content? Viewing will not unmute @%channel%": "Are you sure you want to view this content? Viewing will not unmute @%channel%",
|
||||
"View Content": "View Content",
|
||||
"Global": "Global",
|
||||
"Moderator": "Moderator",
|
||||
"Global Unblock Channel": "Global Unblock Channel",
|
||||
"Global Block Channel": "Global Block Channel",
|
||||
"Moderator tools": "Moderator tools",
|
||||
"Global Block": "Global Block",
|
||||
"Block this channel as global admin": "Block this channel as global admin",
|
||||
"Moderator Block": "Moderator Block",
|
||||
"Block this channel on behalf of %creator%": "Block this channel on behalf of %creator%",
|
||||
"creator": "creator",
|
||||
"Invalid channel URL \"%url%\"": "Invalid channel URL \"%url%\"",
|
||||
"Delegation": "Delegation",
|
||||
"Add moderator": "Add moderator",
|
||||
"Add moderators": "Add moderators",
|
||||
"Add moderator channel URL (e.g. \"@lbry#3f\")": "Add moderator channel URL (e.g. \"@lbry#3f\")",
|
||||
"Mute (m)": "Mute (m)",
|
||||
"Playback Rate (<, >)": "Playback Rate (<, >)",
|
||||
"Fullscreen (f)": "Fullscreen (f)",
|
||||
@@ -1713,6 +1742,7 @@
|
||||
"Stay up to date on the latest content from your favorite creators.": "Stay up to date on the latest content from your favorite creators.",
|
||||
"Receive tutorial emails related to LBRY ": "Receive tutorial emails related to LBRY ",
|
||||
"Create A LiveStream": "Create A LiveStream",
|
||||
"This channel": "This channel",
|
||||
"%channel% has disabled chat for this stream. Enjoy the stream!": "%channel% has disabled chat for this stream. Enjoy the stream!",
|
||||
"%channel% isn't live right now, but the chat is! Check back later to watch the stream.": "%channel% isn't live right now, but the chat is! Check back later to watch the stream.",
|
||||
"Right now": "Right now",
|
||||
@@ -1732,8 +1762,8 @@
|
||||
"Check again...": "Check again...",
|
||||
"You need to upload your livestream details before you can go live. If you already created one in this channel, it should appear soon.": "You need to upload your livestream details before you can go live. If you already created one in this channel, it should appear soon.",
|
||||
"Create A Livestream": "Create A Livestream",
|
||||
"Create a Livestream by first submitting your Livestream details and waiting for approval confirmation.": "Create a Livestream by first submitting your Livestream details and waiting for approval confirmation.",
|
||||
"The livestream will not be visible on your channel until you are live, but you can share the URL in advance.": "The livestream will not be visible on your channel until you are live, but you can share the URL in advance.",
|
||||
"Create a Livestream by first submitting your livestream details and waiting for approval confirmation. This can be done well in advance and will take a few minutes.": "Create a Livestream by first submitting your livestream details and waiting for approval confirmation. This can be done well in advance and will take a few minutes.",
|
||||
"The livestream will not be visible on your channel page until you are live, but you can share the URL in advance.": "The livestream will not be visible on your channel page until you are live, but you can share the URL in advance.",
|
||||
"Once the your livestream is confirmed, configure your streaming software (OBS, Restream, etc) and input the server URL along with the stream key in it.": "Once the your livestream is confirmed, configure your streaming software (OBS, Restream, etc) and input the server URL along with the stream key in it.",
|
||||
"To ensure the best streaming experience with OBS, open settings -> output": "To ensure the best streaming experience with OBS, open settings -> output",
|
||||
"Select advanced mode from the dropdown at the top.": "Select advanced mode from the dropdown at the top.",
|
||||
@@ -1742,12 +1772,13 @@
|
||||
"Keyframes: 1": "Keyframes: 1",
|
||||
"Profile: High": "Profile: High",
|
||||
"Tune: Zerolatency": "Tune: Zerolatency",
|
||||
"If using other livestreaming software, make sure the bitrate is below 5000 kbps or the stream will not work.": "If using other livestreaming software, make sure the bitrate is below 5000 kbps or the stream will not work.",
|
||||
"Please note: You'll need to record your own stream through your software if you plan to share it afterward. You can also delete it if you prefer not to upload the copy.": "Please note: You'll need to record your own stream through your software if you plan to share it afterward. You can also delete it if you prefer not to upload the copy.",
|
||||
"In the near future, this manual step will be removed and you will be able to share the stream right after its finished without needing to record it yourself.": "In the near future, this manual step will be removed and you will be able to share the stream right after its finished without needing to record it yourself.",
|
||||
"After your livestream:\nClick the Publish Replay button. This will allow you to edit details before sharing on Odysee. Be sure to select the saved mp4 file you recorded.": "After your livestream:\nClick the Publish Replay button. This will allow you to edit details before sharing on Odysee. Be sure to select the saved mp4 file you recorded.",
|
||||
"Click Save and you are done!": "Click Save and you are done!",
|
||||
"If using other streaming software, make sure the bitrate is below 4500 kbps or the stream will not work.": "If using other streaming software, make sure the bitrate is below 4500 kbps or the stream will not work.",
|
||||
"After your stream:\nClick the Update button on the content page. This will allow you to select a replay or upload your own edited MP4. Replays are limited to 4 hours and may take a few minutes to show (use the Check For Replays button).": "After your stream:\nClick the Update button on the content page. This will allow you to select a replay or upload your own edited MP4. Replays are limited to 4 hours and may take a few minutes to show (use the Check For Replays button).",
|
||||
"Click Save, then confirm, and you are done!": "Click Save, then confirm, and you are done!",
|
||||
"Note: If you don't plan on publishing your replay, you'll want to delete your livestream and then start with a fresh one next time.": "Note: If you don't plan on publishing your replay, you'll want to delete your livestream and then start with a fresh one next time.",
|
||||
"How does this work?": "How does this work?",
|
||||
"Introducing Lists": "Introducing Lists",
|
||||
"You have no lists yet. Better start hoarding!": "You have no lists yet. Better start hoarding!",
|
||||
"Update your livestream": "Update your livestream",
|
||||
"Prepare an upcoming livestream": "Prepare an upcoming livestream",
|
||||
"Edit your post": "Edit your post",
|
||||
@@ -1883,13 +1914,13 @@
|
||||
"Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.": "Enabling a minimum amount to hyperchat will force all TIPPED comments to have this value in order to be shown. This still allows regular comments to be posted.",
|
||||
"Settings unavailable for this channel": "Settings unavailable for this channel",
|
||||
"This channel isn't staking enough LBRY Credits to enable Creator Settings.": "This channel isn't staking enough LBRY Credits to enable Creator Settings.",
|
||||
"Not a channel (prefix with \"@\", or enter the channel URL)": "Not a channel (prefix with \"@\", or enter the channel URL)",
|
||||
"We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not eligible for Rewards.": "We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not eligible for Rewards.",
|
||||
"Help LBRY Save Crypto": "Help LBRY Save Crypto",
|
||||
"The US government is attempting to destroy the cryptocurrency industry. Can you help?": "The US government is attempting to destroy the cryptocurrency industry. Can you help?",
|
||||
"Learn more and sign petition": "Learn more and sign petition",
|
||||
"View claim details": "View claim details",
|
||||
"Publishing...": "Publishing...",
|
||||
"Collection": "Collection",
|
||||
"Enter a name, @username or URL": "Enter a name, @username or URL:",
|
||||
"Recipient search": "Recipient search",
|
||||
"Fetch transaction data for export": "Fetch transaction data for export",
|
||||
@@ -1924,14 +1955,16 @@
|
||||
"%SITE_NAME% login": "%SITE_NAME% login",
|
||||
"Lists": "Lists",
|
||||
"Watch Later": "Watch Later",
|
||||
"Favorites": "Favorites",
|
||||
"New List": "New List",
|
||||
"New List Title": "New List Title",
|
||||
"Add to Lists": "Add to Lists",
|
||||
"Nothing in %collection_name%": "Nothing in %collection_name%",
|
||||
"Playlists": "Playlists",
|
||||
"Edit List": "Edit List",
|
||||
"Delete List": "Delete List",
|
||||
"Private": "Private",
|
||||
"View List": "View List",
|
||||
"Delete Collection": "Delete Collection",
|
||||
"Publish List": "Publish List",
|
||||
"Info": "Info",
|
||||
"Publishes": "Publishes",
|
||||
"Add To...": "Add To...",
|
||||
@@ -1940,9 +1973,10 @@
|
||||
"List": "List",
|
||||
"Items": "Items",
|
||||
"Credits": "Credits",
|
||||
"MyAwesomeCollection": "MyAwesomeCollection",
|
||||
"My Awesome Collection": "My Awesome Collection",
|
||||
"This collection has no items.": "This collection has no items.",
|
||||
"Cannot publish empty list": "Cannot publish empty list",
|
||||
"MyAwesomeList": "MyAwesomeList",
|
||||
"My Awesome List": "My Awesome List",
|
||||
"This list has no items.": "This list has no items.",
|
||||
"Select File": "Select File",
|
||||
"File Selected": "File Selected",
|
||||
"Url": "Url",
|
||||
@@ -1950,7 +1984,24 @@
|
||||
"Keep": "Keep",
|
||||
"Add this claim to a list": "Add this claim to a list",
|
||||
"List is Empty": "List is Empty",
|
||||
"Confirm Collection Unpublish": "Confirm Collection Unpublish",
|
||||
"Confirm List Unpublish": "Confirm List Unpublish",
|
||||
"This will permanently delete the list.": "This will permanently delete the list.",
|
||||
"Everyone starts with 2 private lists - Watch Later and Favorites.": "Everyone starts with 2 private lists - Watch Later and Favorites.",
|
||||
"Add content to existing lists or new lists from content pages or content previews.": "Add content to existing lists or new lists from content pages or content previews.",
|
||||
"By default, lists are private. You can edit them and later publish them from the Lists page or the Publish context menu on this page. Similar to uploads, small blockchain fees apply.": "By default, lists are private. You can edit them and later publish them from the Lists page or the Publish context menu on this page. Similar to uploads, small blockchain fees apply.",
|
||||
"Chat": "Chat",
|
||||
"Tipped": "Tipped",
|
||||
"Fromage": "Fromage",
|
||||
"Item %action% Watch Later": "Item %action% Watch Later",
|
||||
"added to --[substring for \"Item %action% Watch Later\"]--": "added to",
|
||||
"removed from --[substring for \"Item %action% Watch Later\"]--": "removed from",
|
||||
"In Watch Later": "In Watch Later",
|
||||
"Item added to Watch Later": "Item added to Watch Later",
|
||||
"Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon",
|
||||
"Clear Edits": "Clear Edits",
|
||||
"Something not quite right..": "Something not quite right..",
|
||||
"See All": "See All",
|
||||
"Supporting content requires %lbc%": "Supporting content requires %lbc%",
|
||||
"With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to see.": "With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to see.",
|
||||
"--end--": "--end--"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
+3
-3
@@ -38,9 +38,6 @@ type Analytics = {
|
||||
playerLoadedEvent: (?boolean) => void,
|
||||
playerStartedEvent: (?boolean) => void,
|
||||
videoStartEvent: (string, number) => void,
|
||||
adsFetchedEvent: () => void,
|
||||
adsReceivedEvent: (any) => void,
|
||||
adsErrorEvent: (any) => void,
|
||||
videoBufferEvent: (
|
||||
StreamClaim,
|
||||
{
|
||||
@@ -53,6 +50,9 @@ type Analytics = {
|
||||
readyState: number,
|
||||
}
|
||||
) => void,
|
||||
adsFetchedEvent: () => void,
|
||||
adsReceivedEvent: (any) => void,
|
||||
adsErrorEvent: (any) => void,
|
||||
emailProvidedEvent: () => void,
|
||||
emailVerifiedEvent: () => void,
|
||||
rewardEligibleEvent: () => void,
|
||||
|
||||
@@ -8,6 +8,12 @@ const Comments = {
|
||||
moderation_block: (params: ModerationBlockParams) => fetchCommentsApi('moderation.Block', params),
|
||||
moderation_unblock: (params: ModerationBlockParams) => fetchCommentsApi('moderation.UnBlock', params),
|
||||
moderation_block_list: (params: ModerationBlockParams) => fetchCommentsApi('moderation.BlockedList', params),
|
||||
moderation_add_delegate: (params: ModerationAddDelegateParams) => fetchCommentsApi('moderation.AddDelegate', params),
|
||||
moderation_remove_delegate: (params: ModerationRemoveDelegateParams) =>
|
||||
fetchCommentsApi('moderation.RemoveDelegate', params),
|
||||
moderation_list_delegates: (params: ModerationListDelegatesParams) =>
|
||||
fetchCommentsApi('moderation.ListDelegates', params),
|
||||
moderation_am_i: (params: ModerationAmIParams) => fetchCommentsApi('moderation.AmI', params),
|
||||
comment_list: (params: CommentListParams) => fetchCommentsApi('comment.List', params),
|
||||
comment_abandon: (params: CommentAbandonParams) => fetchCommentsApi('comment.Abandon', params),
|
||||
comment_create: (params: CommentCreateParams) => fetchCommentsApi('comment.Create', params),
|
||||
|
||||
@@ -5,7 +5,14 @@ import { selectGetSyncErrorMessage, selectSyncFatalError } from 'redux/selectors
|
||||
import { doFetchAccessToken, doUserSetReferrer } from 'redux/actions/user';
|
||||
import { selectUser, selectAccessToken, selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectUnclaimedRewards } from 'redux/selectors/rewards';
|
||||
import { doFetchChannelListMine, doFetchCollectionListMine, SETTINGS, selectMyChannelUrls } from 'lbry-redux';
|
||||
import {
|
||||
doFetchChannelListMine,
|
||||
doFetchCollectionListMine,
|
||||
SETTINGS,
|
||||
selectMyChannelUrls,
|
||||
doResolveUris,
|
||||
} from 'lbry-redux';
|
||||
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
||||
import {
|
||||
makeSelectClientSetting,
|
||||
selectLanguage,
|
||||
@@ -27,7 +34,7 @@ import {
|
||||
doSetActiveChannel,
|
||||
doSetIncognito,
|
||||
} from 'redux/actions/app';
|
||||
import { doFetchModBlockedList } from 'redux/actions/comments';
|
||||
import { doFetchModBlockedList, doFetchCommentModAmIList } from 'redux/actions/comments';
|
||||
import App from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
@@ -47,6 +54,7 @@ const select = (state) => ({
|
||||
syncFatalError: selectSyncFatalError(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
myChannelUrls: selectMyChannelUrls(state),
|
||||
subscriptions: selectSubscriptions(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
@@ -63,6 +71,8 @@ const perform = (dispatch) => ({
|
||||
setActiveChannelIfNotSet: () => dispatch(doSetActiveChannel()),
|
||||
setIncognito: () => dispatch(doSetIncognito()),
|
||||
fetchModBlockedList: () => dispatch(doFetchModBlockedList()),
|
||||
resolveUris: (uris) => dispatch(doResolveUris(uris)),
|
||||
fetchModAmIList: () => dispatch(doFetchCommentModAmIList()),
|
||||
});
|
||||
|
||||
export default hot(connect(select, perform)(App));
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import React, { useEffect, useRef, useState, useLayoutEffect } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import analytics from 'analytics';
|
||||
import { buildURI, parseURI } from 'lbry-redux';
|
||||
@@ -30,6 +30,7 @@ import OpenInAppLink from 'web/component/openInAppLink';
|
||||
import YoutubeWelcome from 'web/component/youtubeReferralWelcome';
|
||||
import NagDegradedPerformance from 'web/component/nag-degraded-performance';
|
||||
import NagDataCollection from 'web/component/nag-data-collection';
|
||||
import NagNoUser from 'web/component/nag-no-user';
|
||||
import {
|
||||
useDegradedPerformance,
|
||||
STATUS_OK,
|
||||
@@ -79,14 +80,16 @@ type Props = {
|
||||
isAuthenticated: boolean,
|
||||
socketConnect: () => void,
|
||||
syncLoop: (?boolean) => void,
|
||||
syncEnabled: boolean,
|
||||
currentModal: any,
|
||||
syncFatalError: boolean,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
myChannelUrls: ?Array<string>,
|
||||
subscriptions: Array<Subscription>,
|
||||
setActiveChannelIfNotSet: () => void,
|
||||
setIncognito: (boolean) => void,
|
||||
fetchModBlockedList: () => void,
|
||||
resolveUris: (Array<string>) => void,
|
||||
fetchModAmIList: () => void,
|
||||
};
|
||||
|
||||
function App(props: Props) {
|
||||
@@ -119,6 +122,9 @@ function App(props: Props) {
|
||||
setActiveChannelIfNotSet,
|
||||
setIncognito,
|
||||
fetchModBlockedList,
|
||||
resolveUris,
|
||||
subscriptions,
|
||||
fetchModAmIList,
|
||||
} = props;
|
||||
|
||||
const appRef = useRef();
|
||||
@@ -136,6 +142,8 @@ function App(props: Props) {
|
||||
// @endif
|
||||
const { pathname, hash, search } = props.location;
|
||||
const [upgradeNagClosed, setUpgradeNagClosed] = useState(false);
|
||||
const [resolvedSubscriptions, setResolvedSubscriptions] = useState(false);
|
||||
const [sidebarOpen] = usePersistedState('sidebar', true);
|
||||
const showUpgradeButton =
|
||||
(autoUpdateDownloaded || (process.platform === 'linux' && isUpgradeAvailable)) && !upgradeNagClosed;
|
||||
// referral claiming
|
||||
@@ -150,6 +158,7 @@ function App(props: Props) {
|
||||
const hasNoChannels = myChannelUrls && myChannelUrls.length === 0;
|
||||
const shouldMigrateLanguage = LANGUAGE_MIGRATIONS[language];
|
||||
const hasActiveChannelClaim = activeChannelClaim !== undefined;
|
||||
const isPersonalized = !IS_WEB || hasVerifiedEmail;
|
||||
|
||||
let uri;
|
||||
try {
|
||||
@@ -253,6 +262,7 @@ function App(props: Props) {
|
||||
|
||||
if (hasMyChannels) {
|
||||
fetchModBlockedList();
|
||||
fetchModAmIList();
|
||||
}
|
||||
}, [hasMyChannels, hasNoChannels, hasActiveChannelClaim, setActiveChannelIfNotSet, setIncognito]);
|
||||
|
||||
@@ -338,6 +348,16 @@ function App(props: Props) {
|
||||
}
|
||||
}, [hasVerifiedEmail, signIn, hasSignedIn]);
|
||||
|
||||
// batch resolve subscriptions to be used by the sideNavigation component.
|
||||
// add it here so that it only resolves the first time, despite route changes.
|
||||
// useLayoutEffect because it has to be executed before the sideNavigation component requests them
|
||||
useLayoutEffect(() => {
|
||||
if (sidebarOpen && isPersonalized && subscriptions && !resolvedSubscriptions) {
|
||||
setResolvedSubscriptions(true);
|
||||
resolveUris(subscriptions.map((sub) => sub.uri));
|
||||
}
|
||||
}, [sidebarOpen, isPersonalized, resolvedSubscriptions, subscriptions, resolveUris, setResolvedSubscriptions]);
|
||||
|
||||
// @if TARGET='web'
|
||||
useDegradedPerformance(setLbryTvApiStatus, user);
|
||||
// @endif
|
||||
@@ -346,7 +366,7 @@ function App(props: Props) {
|
||||
// Require an internal-api user on lbry.tv
|
||||
// This also prevents the site from loading in the un-authed state while we wait for internal-apis to return for the first time
|
||||
// It's not needed on desktop since there is no un-authed state
|
||||
if (!user) {
|
||||
if (user === undefined) {
|
||||
return (
|
||||
<div className="main--empty">
|
||||
<Spinner delayed />
|
||||
@@ -411,6 +431,7 @@ function App(props: Props) {
|
||||
{!SIMPLE_SITE && lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (
|
||||
<NagDataCollection onClose={handleAnalyticsDismiss} />
|
||||
)}
|
||||
{user === null && <NagNoUser />}
|
||||
{/* @endif */}
|
||||
</React.Fragment>
|
||||
)}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import Button from './view';
|
||||
import React, { forwardRef } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
pathname: state.router.location.pathname,
|
||||
emailVerified: selectUserVerifiedEmail(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
const ConnectedButton = connect(mapStateToProps)(Button);
|
||||
|
||||
@@ -38,6 +38,7 @@ type Props = {
|
||||
myref: any,
|
||||
dispatch: any,
|
||||
'aria-label'?: string,
|
||||
user: ?User,
|
||||
};
|
||||
|
||||
// use forwardRef to allow consumers to pass refs to the button content if they want to
|
||||
@@ -69,10 +70,13 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
myref,
|
||||
dispatch, // <button> doesn't know what to do with dispatch
|
||||
pathname,
|
||||
user,
|
||||
authSrc,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
const disable = disabled || (user === null && requiresAuth);
|
||||
|
||||
const combinedClassName = classnames(
|
||||
'button',
|
||||
button
|
||||
@@ -82,7 +86,7 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
'button--alt': button === 'alt',
|
||||
'button--inverse': button === 'inverse',
|
||||
'button--close': button === 'close',
|
||||
'button--disabled': disabled,
|
||||
'button--disabled': disable,
|
||||
'button--link': button === 'link',
|
||||
}
|
||||
: 'button--no-style',
|
||||
@@ -184,12 +188,12 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
return (
|
||||
<NavLink
|
||||
exact
|
||||
onClick={e => {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
to={redirectUrl}
|
||||
title={title || defaultTooltip}
|
||||
disabled={disabled}
|
||||
disabled={disable}
|
||||
className={combinedClassName}
|
||||
activeClassName={activeClass}
|
||||
>
|
||||
@@ -203,8 +207,8 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
exact
|
||||
to={path}
|
||||
title={title || defaultTooltip}
|
||||
disabled={disabled}
|
||||
onClick={e => {
|
||||
disabled={disable}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
if (onClick) {
|
||||
onClick();
|
||||
@@ -222,13 +226,13 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
title={title || defaultTooltip}
|
||||
aria-label={description || label || title}
|
||||
className={combinedClassName}
|
||||
onClick={e => {
|
||||
onClick={(e) => {
|
||||
if (onClick) {
|
||||
e.stopPropagation();
|
||||
onClick(e);
|
||||
}
|
||||
}}
|
||||
disabled={disabled}
|
||||
disabled={disable}
|
||||
type={type}
|
||||
{...otherProps}
|
||||
>
|
||||
|
||||
@@ -1,14 +1,57 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doCommentModUnBlock, doCommentModBlock } from 'redux/actions/comments';
|
||||
import { makeSelectChannelIsBlocked, makeSelectUriIsBlockingOrUnBlocking } from 'redux/selectors/comments';
|
||||
import { makeSelectClaimIdForUri } from 'lbry-redux';
|
||||
import {
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlock,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCommentModUnBlockAsModerator,
|
||||
doCommentModBlockAsModerator,
|
||||
} from 'redux/actions/comments';
|
||||
import {
|
||||
makeSelectChannelIsBlocked,
|
||||
makeSelectChannelIsAdminBlocked,
|
||||
makeSelectChannelIsModeratorBlockedForCreator,
|
||||
makeSelectUriIsBlockingOrUnBlocking,
|
||||
makeSelectIsTogglingForDelegator,
|
||||
} from 'redux/selectors/comments';
|
||||
|
||||
import { BLOCK_LEVEL } from 'constants/comment';
|
||||
import ChannelBlockButton from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
isBlocked: makeSelectChannelIsBlocked(props.uri)(state),
|
||||
isBlockingOrUnBlocking: makeSelectUriIsBlockingOrUnBlocking(props.uri)(state),
|
||||
});
|
||||
const select = (state, props) => {
|
||||
let isBlocked;
|
||||
let isToggling;
|
||||
|
||||
switch (props.blockLevel) {
|
||||
default:
|
||||
case BLOCK_LEVEL.SELF:
|
||||
isBlocked = makeSelectChannelIsBlocked(props.uri)(state);
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.MODERATOR:
|
||||
isBlocked = makeSelectChannelIsModeratorBlockedForCreator(props.uri, props.creatorUri)(state);
|
||||
isToggling = makeSelectIsTogglingForDelegator(props.uri, props.creatorUri)(state);
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.ADMIN:
|
||||
isBlocked = makeSelectChannelIsAdminBlocked(props.uri)(state);
|
||||
break;
|
||||
}
|
||||
|
||||
return {
|
||||
isBlocked,
|
||||
isToggling,
|
||||
isBlockingOrUnBlocking: makeSelectUriIsBlockingOrUnBlocking(props.uri)(state),
|
||||
creatorId: makeSelectClaimIdForUri(props.creatorUri)(state),
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(select, {
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlock,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsModerator,
|
||||
doCommentModBlockAsModerator,
|
||||
})(ChannelBlockButton);
|
||||
@@ -1,41 +1,95 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import Button from 'component/button';
|
||||
import { BLOCK_LEVEL } from 'constants/comment';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
blockLevel?: string,
|
||||
creatorUri?: string,
|
||||
isBlocked: boolean,
|
||||
isBlockingOrUnBlocking: boolean,
|
||||
isToggling: boolean,
|
||||
doCommentModUnBlock: (string, boolean) => void,
|
||||
doCommentModBlock: (string, boolean) => void,
|
||||
doCommentModUnBlockAsAdmin: (string, string) => void,
|
||||
doCommentModBlockAsAdmin: (string, string) => void,
|
||||
doCommentModUnBlockAsModerator: (string, string, string) => void,
|
||||
doCommentModBlockAsModerator: (string, string, string) => void,
|
||||
};
|
||||
|
||||
function ChannelBlockButton(props: Props) {
|
||||
const { uri, doCommentModUnBlock, doCommentModBlock, isBlocked, isBlockingOrUnBlocking } = props;
|
||||
const {
|
||||
uri,
|
||||
blockLevel,
|
||||
creatorUri,
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlock,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsModerator,
|
||||
doCommentModBlockAsModerator,
|
||||
isBlocked,
|
||||
isBlockingOrUnBlocking,
|
||||
isToggling,
|
||||
} = props;
|
||||
|
||||
function handleClick() {
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlock(uri, false);
|
||||
} else {
|
||||
doCommentModBlock(uri, false);
|
||||
switch (blockLevel) {
|
||||
default:
|
||||
case BLOCK_LEVEL.SELF:
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlock(uri, false);
|
||||
} else {
|
||||
doCommentModBlock(uri, false);
|
||||
}
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.MODERATOR:
|
||||
if (creatorUri) {
|
||||
const { channelClaimId } = parseURI(creatorUri);
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlockAsModerator(uri, channelClaimId, '');
|
||||
} else {
|
||||
doCommentModBlockAsModerator(uri, channelClaimId, '');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BLOCK_LEVEL.ADMIN:
|
||||
if (isBlocked) {
|
||||
doCommentModUnBlockAsAdmin(uri, '');
|
||||
} else {
|
||||
doCommentModBlockAsAdmin(uri, '');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
button={isBlocked ? 'alt' : 'secondary'}
|
||||
label={
|
||||
isBlocked
|
||||
function getButtonText(blockLevel) {
|
||||
switch (blockLevel) {
|
||||
default:
|
||||
case BLOCK_LEVEL.SELF:
|
||||
case BLOCK_LEVEL.ADMIN:
|
||||
return isBlocked
|
||||
? isBlockingOrUnBlocking
|
||||
? __('Unblocking...')
|
||||
: __('Unblock')
|
||||
: isBlockingOrUnBlocking
|
||||
? __('Blocking...')
|
||||
: __('Block')
|
||||
}
|
||||
onClick={handleClick}
|
||||
/>
|
||||
);
|
||||
? __('Blocking...')
|
||||
: __('Block');
|
||||
|
||||
case BLOCK_LEVEL.MODERATOR:
|
||||
if (isToggling) {
|
||||
return isBlocked ? __('Unblocking...') : __('Blocking...');
|
||||
} else {
|
||||
return isBlocked ? __('Unblock') : __('Block');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return <Button button={isBlocked ? 'alt' : 'secondary'} label={getButtonText(blockLevel)} onClick={handleClick} />;
|
||||
}
|
||||
|
||||
export default ChannelBlockButton;
|
||||
@@ -136,14 +136,13 @@ function ChannelContent(props: Props) {
|
||||
{!channelIsMine && claimsInChannel > 0 && <HiddenNsfwClaims uri={uri} />}
|
||||
|
||||
<ClaimListDiscover
|
||||
hideLivestreamClaims
|
||||
defaultFreshness={CS.FRESH_ALL}
|
||||
showHiddenByUser={viewHiddenChannels}
|
||||
forceShowReposts
|
||||
hideFilters={!showFilters}
|
||||
hideAdvancedFilter={!showFilters}
|
||||
tileLayout={tileLayout}
|
||||
uris={searchResults}
|
||||
streamType={CS.CONTENT_ALL}
|
||||
channelIds={[claim.claim_id]}
|
||||
claimType={claimType}
|
||||
feeAmount={CS.FEE_AMOUNT_ANY}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.1 KiB |
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
import classnames from 'classnames';
|
||||
import Spaceman from './spaceman.png';
|
||||
import Gerbil from './gerbil.png';
|
||||
import Transparent from './transparent_1x1.png';
|
||||
import FreezeframeWrapper from 'component/fileThumbnail/FreezeframeWrapper';
|
||||
import ChannelStakedIndicator from 'component/channelStakedIndicator';
|
||||
@@ -100,7 +100,7 @@ function ChannelThumbnail(props: Props) {
|
||||
ref={thumbnailRef}
|
||||
alt={__('Channel profile picture')}
|
||||
className="channel-thumbnail__default"
|
||||
data-src={!thumbError && url ? url : Spaceman}
|
||||
data-src={!thumbError && url ? url : Gerbil}
|
||||
src={Transparent}
|
||||
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
|
||||
/>
|
||||
@@ -114,7 +114,7 @@ function ChannelThumbnail(props: Props) {
|
||||
ref={thumbnailRef}
|
||||
alt={__('Channel profile picture')}
|
||||
className="channel-thumbnail__custom"
|
||||
data-src={!thumbError && url ? url : Spaceman}
|
||||
data-src={!thumbError && url ? url : Gerbil}
|
||||
src={Transparent}
|
||||
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
|
||||
/>
|
||||
|
||||
@@ -79,7 +79,15 @@ const ClaimCollectionAdd = (props: Props) => {
|
||||
.filter((list) => (isChannel ? list.type === 'collection' : list.type === 'playlist'))
|
||||
.map((l) => {
|
||||
const { id } = l;
|
||||
return <CollectionSelectItem claim={claim} collectionId={id} uri={permanentUrl} key={id} category={'builtin'} />;
|
||||
return (
|
||||
<CollectionSelectItem
|
||||
claim={claim}
|
||||
collectionId={id}
|
||||
uri={permanentUrl}
|
||||
key={id}
|
||||
category={'builtin'}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{unpublished &&
|
||||
(Object.values(unpublished): any)
|
||||
@@ -88,7 +96,13 @@ const ClaimCollectionAdd = (props: Props) => {
|
||||
.map((l) => {
|
||||
const { id } = l;
|
||||
return (
|
||||
<CollectionSelectItem claim={claim} collectionId={id} uri={permanentUrl} key={id} category={'unpublished'} />
|
||||
<CollectionSelectItem
|
||||
claim={claim}
|
||||
collectionId={id}
|
||||
uri={permanentUrl}
|
||||
key={id}
|
||||
category={'unpublished'}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{published &&
|
||||
@@ -96,7 +110,13 @@ const ClaimCollectionAdd = (props: Props) => {
|
||||
// $FlowFixMe
|
||||
const { id } = l;
|
||||
return (
|
||||
<CollectionSelectItem claim={claim} collectionId={id} uri={permanentUrl} key={id} category={'published'} />
|
||||
<CollectionSelectItem
|
||||
claim={claim}
|
||||
collectionId={id}
|
||||
uri={permanentUrl}
|
||||
key={id}
|
||||
category={'published'}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
@@ -109,7 +129,7 @@ const ClaimCollectionAdd = (props: Props) => {
|
||||
type="text"
|
||||
name="new_collection"
|
||||
value={newCollectionName}
|
||||
label={'New List Title'}
|
||||
label={__('New List Title')}
|
||||
onFocus={onTextareaFocus}
|
||||
onBlur={onTextareaBlur}
|
||||
inputButton={
|
||||
@@ -134,7 +154,7 @@ const ClaimCollectionAdd = (props: Props) => {
|
||||
/>
|
||||
)}
|
||||
{!addNewCollection && (
|
||||
<Button button={'link'} label={'New List'} onClick={() => setAddNewCollection(true)} />
|
||||
<Button button={'link'} label={__('New List')} onClick={() => setAddNewCollection(true)} />
|
||||
)}
|
||||
</fieldset-section>
|
||||
<div className="card__actions">
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function CollectionAddButton(props: Props) {
|
||||
className={classnames({ 'button--file-action': fileAction })}
|
||||
icon={fileAction ? ICONS.ADD : ICONS.LIBRARY}
|
||||
iconSize={fileAction ? 22 : undefined}
|
||||
label={uri ? __('Save') : 'New List'}
|
||||
label={uri ? __('Save') : __('New List')}
|
||||
requiresAuth={IS_WEB}
|
||||
title={__('Add this claim to a list')}
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -45,7 +45,6 @@ type Props = {
|
||||
livestreamMap?: { [string]: any },
|
||||
searchOptions?: any,
|
||||
collectionId?: string,
|
||||
hideLivestreamClaims?: boolean,
|
||||
};
|
||||
|
||||
export default function ClaimList(props: Props) {
|
||||
@@ -77,7 +76,6 @@ export default function ClaimList(props: Props) {
|
||||
livestreamMap,
|
||||
searchOptions,
|
||||
collectionId,
|
||||
hideLivestreamClaims,
|
||||
} = props;
|
||||
|
||||
const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW);
|
||||
@@ -137,7 +135,6 @@ export default function ClaimList(props: Props) {
|
||||
properties={renderProperties}
|
||||
live={resolveLive(index)}
|
||||
collectionId={collectionId}
|
||||
hideLivestreamClaims={hideLivestreamClaims}
|
||||
/>
|
||||
))}
|
||||
{!timedOut && urisLength === 0 && !loading && <div className="empty main--empty">{empty || noResultMsg}</div>}
|
||||
@@ -198,7 +195,6 @@ export default function ClaimList(props: Props) {
|
||||
showUserBlocked={showHiddenByUser}
|
||||
showHiddenByUser={showHiddenByUser}
|
||||
collectionId={collectionId}
|
||||
hideLivestreamClaims={hideLivestreamClaims}
|
||||
customShouldHide={(claim: StreamClaim) => {
|
||||
// Hack to hide spee.ch thumbnail publishes
|
||||
// If it meets these requirements, it was probably uploaded here:
|
||||
|
||||
@@ -72,9 +72,6 @@ type Props = {
|
||||
liveLivestreamsFirst?: boolean,
|
||||
livestreamMap?: { [string]: any },
|
||||
hasSource?: boolean,
|
||||
limitClaimsPerChannel?: number,
|
||||
releaseTime?: string,
|
||||
hideLivestreamClaims?: boolean,
|
||||
isChannel?: boolean,
|
||||
empty?: string,
|
||||
};
|
||||
@@ -106,8 +103,8 @@ function ClaimListDiscover(props: Props) {
|
||||
claimType,
|
||||
pageSize,
|
||||
defaultClaimType,
|
||||
streamType = CS.FILE_VIDEO,
|
||||
defaultStreamType = CS.FILE_VIDEO,
|
||||
streamType,
|
||||
defaultStreamType,
|
||||
freshness,
|
||||
defaultFreshness = CS.FRESH_WEEK,
|
||||
renderProperties,
|
||||
@@ -126,15 +123,12 @@ function ClaimListDiscover(props: Props) {
|
||||
forceShowReposts = false,
|
||||
languageSetting,
|
||||
searchInLanguage,
|
||||
limitClaimsPerChannel,
|
||||
releaseTime,
|
||||
scrollAnchor,
|
||||
showHiddenByUser = false,
|
||||
liveLivestreamsFirst,
|
||||
livestreamMap,
|
||||
hasSource,
|
||||
isChannel = false,
|
||||
hideLivestreamClaims,
|
||||
empty,
|
||||
} = props;
|
||||
const didNavigateForward = history.action === 'PUSH';
|
||||
@@ -174,12 +168,12 @@ function ClaimListDiscover(props: Props) {
|
||||
const durationParam = urlParams.get(CS.DURATION_KEY) || null;
|
||||
const channelIdsInUrl = urlParams.get(CS.CHANNEL_IDS_KEY);
|
||||
const channelIdsParam = channelIdsInUrl ? channelIdsInUrl.split(',') : channelIds;
|
||||
const feeAmountParam = urlParams.get('fee_amount') || feeAmount || CS.FEE_AMOUNT_ONLY_FREE;
|
||||
const feeAmountParam = urlParams.get('fee_amount') || feeAmount;
|
||||
const originalPageSize = pageSize || CS.PAGE_SIZE;
|
||||
const dynamicPageSize = isLargeScreen ? Math.ceil(originalPageSize * (3 / 2)) : originalPageSize;
|
||||
const historyAction = history.action;
|
||||
|
||||
let orderParam = orderBy || urlParams.get(CS.ORDER_BY_KEY) || defaultOrderBy || orderParamEntry;
|
||||
let orderParam = orderBy || urlParams.get(CS.ORDER_BY_KEY) || defaultOrderBy;
|
||||
|
||||
if (!orderParam) {
|
||||
if (historyAction === 'POP') {
|
||||
@@ -223,7 +217,6 @@ function ClaimListDiscover(props: Props) {
|
||||
fee_amount?: string,
|
||||
has_source?: boolean,
|
||||
has_no_source?: boolean,
|
||||
limit_claims_per_channel?: number,
|
||||
} = {
|
||||
page_size: dynamicPageSize,
|
||||
page,
|
||||
@@ -246,10 +239,6 @@ function ClaimListDiscover(props: Props) {
|
||||
options.has_source = true;
|
||||
}
|
||||
|
||||
if (limitClaimsPerChannel) {
|
||||
options.limit_claims_per_channel = limitClaimsPerChannel;
|
||||
}
|
||||
|
||||
if (feeAmountParam && claimType !== CS.CLAIM_CHANNEL) {
|
||||
options.fee_amount = feeAmountParam;
|
||||
}
|
||||
@@ -279,10 +268,7 @@ function ClaimListDiscover(props: Props) {
|
||||
options.reposted_claim_id = repostedClaimId;
|
||||
}
|
||||
|
||||
// IF release time, set it, else set fallback release times using the hack below.
|
||||
if (releaseTime) {
|
||||
options.release_time = releaseTime;
|
||||
} else if (claimType !== CS.CLAIM_CHANNEL) {
|
||||
if (claimType !== CS.CLAIM_CHANNEL) {
|
||||
if (orderParam === CS.ORDER_BY_TOP && freshnessParam !== CS.FRESH_ALL) {
|
||||
options.release_time = `>${Math.floor(moment().subtract(1, freshnessParam).startOf('hour').unix())}`;
|
||||
} else if (orderParam === CS.ORDER_BY_NEW || orderParam === CS.ORDER_BY_TRENDING) {
|
||||
@@ -360,25 +346,9 @@ function ClaimListDiscover(props: Props) {
|
||||
|
||||
const hasMatureTags = tagsParam && tagsParam.split(',').some((t) => MATURE_TAGS.includes(t));
|
||||
const claimSearchCacheQuery = createNormalizedClaimSearchKey(options);
|
||||
let claimSearchResult = claimSearchByQuery[claimSearchCacheQuery];
|
||||
const claimSearchResult = claimSearchByQuery[claimSearchCacheQuery];
|
||||
const claimSearchResultLastPageReached = claimSearchByQueryLastPageReached[claimSearchCacheQuery];
|
||||
|
||||
// uncomment to fix an item on a page
|
||||
// const fixUri = 'lbry://@corbettreport#0/lbryodysee#5';
|
||||
// if (
|
||||
// orderParam === CS.ORDER_BY_NEW &&
|
||||
// claimSearchResult &&
|
||||
// claimSearchResult.length > 2 &&
|
||||
// window.location.pathname === '/$/rabbithole'
|
||||
// ) {
|
||||
// if (claimSearchResult.indexOf(fixUri) !== -1) {
|
||||
// claimSearchResult.splice(claimSearchResult.indexOf(fixUri), 1);
|
||||
// } else {
|
||||
// claimSearchResult.pop();
|
||||
// }
|
||||
// claimSearchResult.splice(2, 0, fixUri);
|
||||
// }
|
||||
|
||||
const [prevOptions, setPrevOptions] = React.useState(null);
|
||||
|
||||
if (!isJustScrollingToNewPage(prevOptions, options)) {
|
||||
@@ -502,7 +472,7 @@ function ClaimListDiscover(props: Props) {
|
||||
claimType={claimType}
|
||||
streamType={streamType}
|
||||
defaultStreamType={defaultStreamType}
|
||||
// feeAmount={feeAmount}
|
||||
feeAmount={feeAmount}
|
||||
orderBy={orderBy}
|
||||
defaultOrderBy={defaultOrderBy}
|
||||
hideAdvancedFilter={hideAdvancedFilter}
|
||||
@@ -542,7 +512,6 @@ function ClaimListDiscover(props: Props) {
|
||||
liveLivestreamsFirst={liveLivestreamsFirst}
|
||||
livestreamMap={livestreamMap}
|
||||
searchOptions={options}
|
||||
hideLivestreamClaims={hideLivestreamClaims}
|
||||
empty={empty}
|
||||
/>
|
||||
{loading && (
|
||||
@@ -577,7 +546,6 @@ function ClaimListDiscover(props: Props) {
|
||||
liveLivestreamsFirst={liveLivestreamsFirst}
|
||||
livestreamMap={livestreamMap}
|
||||
searchOptions={options}
|
||||
hideLivestreamClaims={hideLivestreamClaims}
|
||||
empty={empty}
|
||||
/>
|
||||
{loading &&
|
||||
|
||||
@@ -13,8 +13,17 @@ import {
|
||||
import { makeSelectChannelIsMuted } from 'redux/selectors/blocked';
|
||||
import { doChannelMute, doChannelUnmute } from 'redux/actions/blocked';
|
||||
import { doSetActiveChannel, doSetIncognito, doOpenModal } from 'redux/actions/app';
|
||||
import { doCommentModBlock, doCommentModUnBlock } from 'redux/actions/comments';
|
||||
import { makeSelectChannelIsBlocked } from 'redux/selectors/comments';
|
||||
import {
|
||||
doCommentModBlock,
|
||||
doCommentModUnBlock,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
} from 'redux/actions/comments';
|
||||
import {
|
||||
selectHasAdminChannel,
|
||||
makeSelectChannelIsBlocked,
|
||||
makeSelectChannelIsAdminBlocked,
|
||||
} from 'redux/selectors/comments';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { makeSelectSigningIsMine } from 'redux/selectors/content';
|
||||
import { doChannelSubscribe, doChannelUnsubscribe } from 'redux/actions/subscriptions';
|
||||
@@ -33,6 +42,8 @@ const select = (state, props) => {
|
||||
channelIsBlocked: makeSelectChannelIsBlocked(props.uri)(state),
|
||||
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
||||
isSubscribed: makeSelectIsSubscribed(props.channelUri, true)(state),
|
||||
channelIsAdminBlocked: makeSelectChannelIsAdminBlocked(props.uri)(state),
|
||||
isAdmin: selectHasAdminChannel(state),
|
||||
claimInCollection: makeSelectCollectionForIdHasClaimUrl(props.collectionId, permanentUri)(state),
|
||||
collectionName: makeSelectNameForCollectionId(props.collectionId)(state),
|
||||
isMyCollection: makeSelectCollectionIsMine(props.collectionId)(state),
|
||||
@@ -57,6 +68,9 @@ const perform = (dispatch) => ({
|
||||
doChannelUnmute: (channelUri) => dispatch(doChannelUnmute(channelUri)),
|
||||
doCommentModBlock: (channelUri) => dispatch(doCommentModBlock(channelUri)),
|
||||
doCommentModUnBlock: (channelUri) => dispatch(doCommentModUnBlock(channelUri)),
|
||||
doCommentModBlockAsAdmin: (commenterUri, blockerId) => dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)),
|
||||
doCommentModUnBlockAsAdmin: (commenterUri, blockerId) =>
|
||||
dispatch(doCommentModUnBlockAsAdmin(commenterUri, blockerId)),
|
||||
doChannelSubscribe: (subscription) => dispatch(doChannelSubscribe(subscription)),
|
||||
doChannelUnsubscribe: (subscription) => dispatch(doChannelUnsubscribe(subscription)),
|
||||
doCollectionEdit: (collection, props) => dispatch(doCollectionEdit(collection, props)),
|
||||
|
||||
@@ -29,10 +29,14 @@ type Props = {
|
||||
inline?: boolean,
|
||||
channelIsMuted: boolean,
|
||||
channelIsBlocked: boolean,
|
||||
channelIsAdminBlocked: boolean,
|
||||
isAdmin: boolean,
|
||||
doChannelMute: (string) => void,
|
||||
doChannelUnmute: (string) => void,
|
||||
doCommentModBlock: (string) => void,
|
||||
doCommentModUnBlock: (string) => void,
|
||||
doCommentModBlockAsAdmin: (string, string) => void,
|
||||
doCommentModUnBlockAsAdmin: (string, string) => void,
|
||||
isRepost: boolean,
|
||||
doCollectionEdit: (string, any) => void,
|
||||
hasClaimInWatchLater: boolean,
|
||||
@@ -62,9 +66,13 @@ function ClaimMenuList(props: Props) {
|
||||
doChannelUnmute,
|
||||
channelIsMuted,
|
||||
channelIsBlocked,
|
||||
channelIsAdminBlocked,
|
||||
isAdmin,
|
||||
doCommentModBlock,
|
||||
doCommentModUnBlock,
|
||||
isRepost,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModUnBlockAsAdmin,
|
||||
doCollectionEdit,
|
||||
hasClaimInWatchLater,
|
||||
collectionId,
|
||||
@@ -166,6 +174,14 @@ function ClaimMenuList(props: Props) {
|
||||
openModal(MODALS.SEND_TIP, { uri, isSupport: true });
|
||||
}
|
||||
|
||||
function handleToggleAdminBlock() {
|
||||
if (channelIsAdminBlocked) {
|
||||
doCommentModUnBlockAsAdmin(channelUri, '');
|
||||
} else {
|
||||
doCommentModBlockAsAdmin(channelUri, '');
|
||||
}
|
||||
}
|
||||
|
||||
function handleCopyLink() {
|
||||
navigator.clipboard.writeText(shareUrl);
|
||||
}
|
||||
@@ -188,14 +204,16 @@ function ClaimMenuList(props: Props) {
|
||||
</MenuButton>
|
||||
<MenuList className="menu__list">
|
||||
{/* WATCH LATER */}
|
||||
<>
|
||||
<>
|
||||
{isPlayable && !collectionId && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => {
|
||||
doToast({
|
||||
message: __('Item %action% Watch Later', {
|
||||
action: hasClaimInWatchLater ? __('removed from') : __('added to'),
|
||||
action: hasClaimInWatchLater
|
||||
? __('removed from --[substring for "Item %action% Watch Later"]--')
|
||||
: __('added to --[substring for "Item %action% Watch Later"]--'),
|
||||
}),
|
||||
});
|
||||
doCollectionEdit(COLLECTIONS_CONSTS.WATCH_LATER_ID, {
|
||||
@@ -211,50 +229,50 @@ function ClaimMenuList(props: Props) {
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
{/* COLLECTION OPERATIONS */}
|
||||
{collectionId && collectionName && isCollectionClaim && (
|
||||
<>
|
||||
{Boolean(editedCollection) && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => push(`/$/${PAGES.LIST}/${collectionId}?view=edit`)}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden iconColor={'red'} icon={ICONS.PUBLISH} />
|
||||
{__('Publish')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem className="comment__menu-option" onSelect={() => push(`/$/${PAGES.LIST}/${collectionId}`)}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.VIEW} />
|
||||
{__('View List')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
{/* COLLECTION OPERATIONS */}
|
||||
{collectionId && collectionName && isCollectionClaim && (
|
||||
<>
|
||||
{Boolean(editedCollection) && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => openModal(MODALS.COLLECTION_DELETE, { collectionId })}
|
||||
onSelect={() => push(`/$/${PAGES.LIST}/${collectionId}?view=edit`)}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DELETE} />
|
||||
{__('Delete List')}
|
||||
<Icon aria-hidden iconColor={'red'} icon={ICONS.PUBLISH} />
|
||||
{__('Publish')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
</>
|
||||
)}
|
||||
{/* CURRENTLY ONLY SUPPORT PLAYLISTS FOR PLAYABLE; LATER DIFFERENT TYPES */}
|
||||
{isPlayable && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => openModal(MODALS.COLLECTION_ADD, { uri, type: 'playlist' })}
|
||||
>
|
||||
)}
|
||||
<MenuItem className="comment__menu-option" onSelect={() => push(`/$/${PAGES.LIST}/${collectionId}`)}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.STACK} />
|
||||
{__('Add to Lists')}
|
||||
<Icon aria-hidden icon={ICONS.VIEW} />
|
||||
{__('View List')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
</>
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => openModal(MODALS.COLLECTION_DELETE, { collectionId })}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DELETE} />
|
||||
{__('Delete List')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
</>
|
||||
)}
|
||||
{/* CURRENTLY ONLY SUPPORT PLAYLISTS FOR PLAYABLE; LATER DIFFERENT TYPES */}
|
||||
{isPlayable && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => openModal(MODALS.COLLECTION_ADD, { uri, type: 'playlist' })}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.STACK} />
|
||||
{__('Add to Lists')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
</>
|
||||
{!isChannelPage && (
|
||||
<>
|
||||
<hr className="menu__separator" />
|
||||
@@ -292,6 +310,15 @@ function ClaimMenuList(props: Props) {
|
||||
</div>
|
||||
</MenuItem>
|
||||
|
||||
{isAdmin && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleToggleAdminBlock}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.GLOBE} />
|
||||
{channelIsAdminBlocked ? __('Global Unblock Channel') : __('Global Block Channel')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
<MenuItem className="comment__menu-option" onSelect={handleToggleMute}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.MUTE} />
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
doCollectionEdit,
|
||||
makeSelectUrlsForCollectionId,
|
||||
makeSelectIndexForUrlInCollection,
|
||||
makeSelectClaimIdIsPending,
|
||||
} from 'lbry-redux';
|
||||
import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked';
|
||||
import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc';
|
||||
@@ -47,6 +48,7 @@ const select = (state, props) => ({
|
||||
isCollectionMine: makeSelectCollectionIsMine(props.collectionId)(state),
|
||||
collectionUris: makeSelectUrlsForCollectionId(props.collectionId)(state),
|
||||
collectionIndex: makeSelectIndexForUrlInCollection(props.uri, props.collectionId)(state),
|
||||
collectionIsPending: makeSelectClaimIdIsPending(props.collectionId)(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
|
||||
@@ -30,7 +30,7 @@ import * as ICONS from 'constants/icons';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: ?Claim,
|
||||
claim: ?Claim, // maybe?
|
||||
obscureNsfw: boolean,
|
||||
showUserBlocked: boolean,
|
||||
claimIsMine: boolean,
|
||||
@@ -78,6 +78,8 @@ type Props = {
|
||||
isCollectionMine: boolean,
|
||||
collectionUris: Array<Collection>,
|
||||
collectionIndex?: number,
|
||||
disableNavigation?: boolean,
|
||||
collectionIsPending?: boolean,
|
||||
};
|
||||
|
||||
const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
@@ -134,6 +136,8 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
editCollection,
|
||||
isCollectionMine,
|
||||
collectionUris,
|
||||
collectionIsPending,
|
||||
disableNavigation,
|
||||
} = props;
|
||||
const isRepost = claim && claim.repost_channel_url;
|
||||
const WrapperElement = wrapperElement || 'li';
|
||||
@@ -214,7 +218,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
onClick(e);
|
||||
}
|
||||
|
||||
if (claim && !pending) {
|
||||
if (claim && !pending && !disableNavigation) {
|
||||
history.push(navigateUrl);
|
||||
}
|
||||
}
|
||||
@@ -344,7 +348,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
<Button
|
||||
button="alt"
|
||||
className={'button-collection-order'}
|
||||
disabled={collectionIndex === 0}
|
||||
disabled={collectionIndex === 0 || collectionIsPending}
|
||||
icon={ICONS.UP}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -361,7 +365,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
button="alt"
|
||||
className={'button-collection-order'}
|
||||
icon={ICONS.DOWN}
|
||||
disabled={collectionIndex === lastCollectionIndex}
|
||||
disabled={collectionIndex === lastCollectionIndex || collectionIsPending}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
@@ -377,6 +381,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
<div className="collection-preview__edit-group">
|
||||
<Button
|
||||
button="alt"
|
||||
disabled={collectionIsPending}
|
||||
icon={ICONS.DELETE}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -423,7 +428,9 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{!hideMenu && <ClaimMenuList uri={uri} collectionId={collectionId} channelUri={channelUri} isRepost={isRepost} />}
|
||||
{!hideMenu && (
|
||||
<ClaimMenuList uri={uri} collectionId={collectionId} channelUri={channelUri} isRepost={isRepost} />
|
||||
)}
|
||||
</>
|
||||
</WrapperElement>
|
||||
);
|
||||
|
||||
@@ -44,8 +44,6 @@ type Props = {
|
||||
properties?: (Claim) => void,
|
||||
live?: boolean,
|
||||
collectionId?: string,
|
||||
hideLivestreamClaims?: boolean,
|
||||
isLivestream: boolean,
|
||||
};
|
||||
|
||||
function ClaimPreviewTile(props: Props) {
|
||||
@@ -68,8 +66,6 @@ function ClaimPreviewTile(props: Props) {
|
||||
showHiddenByUser,
|
||||
properties,
|
||||
live,
|
||||
hideLivestreamClaims,
|
||||
isLivestream,
|
||||
collectionId,
|
||||
} = props;
|
||||
const isRepost = claim && claim.repost_channel_url;
|
||||
@@ -153,7 +149,7 @@ function ClaimPreviewTile(props: Props) {
|
||||
shouldHide = blockedChannelUris.some((blockedUri) => blockedUri === claim.permanent_url);
|
||||
}
|
||||
|
||||
if (shouldHide || (isLivestream && hideLivestreamClaims)) {
|
||||
if (shouldHide) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -217,6 +213,7 @@ function ClaimPreviewTile(props: Props) {
|
||||
<UriIndicator uri={uri} />
|
||||
</div>
|
||||
)}
|
||||
{/* CHECK CLAIM MENU LIST PARAMS (IS REPOST?) */}
|
||||
<ClaimMenuList uri={uri} collectionId={listId} channelUri={channelUri} isRepost={isRepost} />
|
||||
</h2>
|
||||
</NavLink>
|
||||
|
||||
@@ -37,7 +37,7 @@ export function prioritizeActiveLivestreams(
|
||||
// for that channel actually point to the same source).
|
||||
// 2. 'liveChannelIds' needs to be pruned after being accounted for,
|
||||
// otherwise all livestream-claims will be "live" (we'll only take the
|
||||
// latest one as "live" ).
|
||||
// latest one as "live").
|
||||
return (
|
||||
claim &&
|
||||
claim.value_type === 'stream' &&
|
||||
@@ -145,14 +145,14 @@ function ClaimTilesDiscover(props: Props) {
|
||||
mutedUris,
|
||||
liveLivestreamsFirst,
|
||||
livestreamMap,
|
||||
pin,
|
||||
// pin,
|
||||
prefixUris,
|
||||
} = props;
|
||||
|
||||
const { location } = useHistory();
|
||||
const urlParams = new URLSearchParams(location.search);
|
||||
const feeAmountInUrl = urlParams.get('fee_amount');
|
||||
const feeAmountParam = feeAmountInUrl || feeAmount || CS.FEE_AMOUNT_ONLY_FREE;
|
||||
const feeAmountParam = feeAmountInUrl || feeAmount;
|
||||
const mutedAndBlockedChannelIds = Array.from(new Set(mutedUris.concat(blockedUris).map((uri) => uri.split('#')[1])));
|
||||
const liveUris = [];
|
||||
|
||||
@@ -239,8 +239,8 @@ function ClaimTilesDiscover(props: Props) {
|
||||
let uris = (prefixUris || []).concat(claimSearchByQuery[mainSearchKey] || []);
|
||||
|
||||
const isLoading = fetchingClaimSearchByQuery[mainSearchKey];
|
||||
// && !isLoading isn't on master, doesn't seem to affect the functionality, don't recall why it was added.
|
||||
if (liveLivestreamsFirst && livestreamMap && !isLoading) {
|
||||
|
||||
if (liveLivestreamsFirst && livestreamMap) {
|
||||
prioritizeActiveLivestreams(uris, liveUris, livestreamMap, claimsByUri, claimSearchByQuery, options);
|
||||
}
|
||||
|
||||
@@ -284,26 +284,10 @@ function ClaimTilesDiscover(props: Props) {
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const modifiedUris = uris ? uris.slice() : [];
|
||||
const fixUris = [
|
||||
'lbry://@AdrianLogan#5/why-i-talk-to-myself#3',
|
||||
];
|
||||
|
||||
if (pin && modifiedUris && modifiedUris.length > 2 && window.location.pathname === '/') {
|
||||
fixUris.forEach((fixUri) => {
|
||||
if (modifiedUris.indexOf(fixUri) !== -1) {
|
||||
modifiedUris.splice(modifiedUris.indexOf(fixUri), 1);
|
||||
} else {
|
||||
modifiedUris.pop();
|
||||
}
|
||||
});
|
||||
modifiedUris.splice(2, 0, ...fixUris);
|
||||
}
|
||||
|
||||
return (
|
||||
<ul className="claim-grid">
|
||||
{modifiedUris && modifiedUris.length
|
||||
? modifiedUris.map((uri, index) => (
|
||||
{uris && uris.length
|
||||
? uris.map((uri, index) => (
|
||||
<ClaimPreviewTile key={uri} uri={uri} properties={renderProperties} live={resolveLive(index)} />
|
||||
))
|
||||
: new Array(pageSize).fill(1).map((x, i) => <ClaimPreviewTile key={i} placeholder />)}
|
||||
|
||||
@@ -11,11 +11,11 @@ import {
|
||||
selectUpdatingCollection,
|
||||
selectCreateCollectionError,
|
||||
selectBalance,
|
||||
doClearCollectionErrors,
|
||||
selectCreatingCollection,
|
||||
makeSelectCollectionForId,
|
||||
makeSelectUrlsForCollectionId,
|
||||
makeSelectClaimIdsForCollectionId,
|
||||
ACTIONS as LBRY_REDUX_ACTIONS,
|
||||
} from 'lbry-redux';
|
||||
import { doOpenModal } from 'redux/actions/app';
|
||||
|
||||
@@ -47,7 +47,7 @@ const perform = (dispatch) => ({
|
||||
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
||||
publishCollectionUpdate: (params) => dispatch(doCollectionPublishUpdate(params)),
|
||||
publishCollection: (params, collectionId) => dispatch(doCollectionPublish(params, collectionId)),
|
||||
clearCollectionErrors: () => dispatch(doClearCollectionErrors()),
|
||||
clearCollectionErrors: () => dispatch({ type: LBRY_REDUX_ACTIONS.CLEAR_COLLECTION_ERRORS }),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(CollectionPage);
|
||||
@@ -21,6 +21,7 @@ import { INVALID_NAME_ERROR } from 'constants/claim';
|
||||
import SUPPORTED_LANGUAGES from 'constants/supported_languages';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import analytics from 'analytics';
|
||||
import * as ICONS from '../../constants/icons';
|
||||
const LANG_NONE = 'none';
|
||||
const MAX_TAG_SELECT = 5;
|
||||
|
||||
@@ -86,6 +87,7 @@ function CollectionForm(props: Props) {
|
||||
collection,
|
||||
collectionUrls,
|
||||
collectionClaimIds,
|
||||
clearCollectionErrors,
|
||||
} = props;
|
||||
const activeChannelName = activeChannelClaim && activeChannelClaim.name;
|
||||
let prefix = IS_WEB ? `${DOMAIN}/` : 'lbry://';
|
||||
@@ -163,6 +165,7 @@ function CollectionForm(props: Props) {
|
||||
React.useEffect(() => {
|
||||
const collectionClaimIds = JSON.parse(collectionClaimIdsString);
|
||||
setParams({ ...params, claims: collectionClaimIds });
|
||||
clearCollectionErrors();
|
||||
}, [collectionClaimIdsString, setParams]);
|
||||
|
||||
function handleLanguageChange(index, code) {
|
||||
@@ -228,12 +231,16 @@ function CollectionForm(props: Props) {
|
||||
setParams({ ...params, channel_id: activeChannelId });
|
||||
}
|
||||
}, [activeChannelId, incognito, setParams]);
|
||||
const itemError = !params.claims.length ? __('Cannot publish empty collection') : '';
|
||||
|
||||
const itemError = !params.claims.length ? __('Cannot publish empty list') : '';
|
||||
const submitError = nameError || bidError || itemError || updateError || createError;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={classnames('main--contained', { 'card--disabled': disabled })}>
|
||||
<div>
|
||||
<Button button="close" label={__('New')} icon={ICONS.REFRESH} onClick={() => alert()} />
|
||||
</div>
|
||||
<Tabs>
|
||||
<TabList className="tabs__list--collection-edit-page">
|
||||
<Tab>{__('General')}</Tab>
|
||||
@@ -264,7 +271,7 @@ function CollectionForm(props: Props) {
|
||||
autoFocus={isNewCollection}
|
||||
type="text"
|
||||
name="channel_name"
|
||||
placeholder={__('MyAwesomeCollection')}
|
||||
placeholder={__('MyAwesomeList')}
|
||||
value={params.name}
|
||||
error={nameError}
|
||||
disabled={!isNewCollection}
|
||||
@@ -279,7 +286,7 @@ function CollectionForm(props: Props) {
|
||||
type="text"
|
||||
name="channel_title2"
|
||||
label={__('Title')}
|
||||
placeholder={__('My Awesome Collection')}
|
||||
placeholder={__('My Awesome List')}
|
||||
value={params.title}
|
||||
onChange={(e) => setParams({ ...params, title: e.target.value })}
|
||||
/>
|
||||
@@ -303,11 +310,7 @@ function CollectionForm(props: Props) {
|
||||
</div>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<ClaimList
|
||||
uris={collectionUrls}
|
||||
collectionId={collectionId}
|
||||
empty={__('This collection has no items.')}
|
||||
/>
|
||||
<ClaimList uris={collectionUrls} collectionId={collectionId} empty={__('This list has no items.')} />
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<Card
|
||||
|
||||
@@ -66,7 +66,7 @@ export default function CollectionsListMine(props: Props) {
|
||||
navigate={`/$/${PAGES.LIST}/${list.id}`}
|
||||
label={
|
||||
<span className="claim-grid__title-span">
|
||||
{list.name}
|
||||
{__(`${list.name}`)}
|
||||
<div className="claim-grid__title--empty">
|
||||
<Icon className="icon--margin-right" icon={ICONS.STACK} />
|
||||
{itemUrls.length}
|
||||
@@ -80,7 +80,7 @@ export default function CollectionsListMine(props: Props) {
|
||||
)}
|
||||
{!(itemUrls && itemUrls.length) && (
|
||||
<h1 className="claim-grid__header claim-grid__title">
|
||||
{__('%collection_name%', { collection_name: list.name })}{' '}
|
||||
{__(`${list.name}`)}
|
||||
<div className="claim-grid__title--empty">(Empty)</div>
|
||||
</h1>
|
||||
)}
|
||||
|
||||
@@ -10,11 +10,13 @@ import { doOpenModal, doSetActiveChannel } from 'redux/actions/app';
|
||||
import { doCommentCreate } from 'redux/actions/comments';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import { makeSelectCommentsDisabledForUri } from 'redux/selectors/comments';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { CommentCreate } from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
||||
commentsDisabledBySettings: makeSelectCommentsDisabledForUri(props.uri)(state),
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
channels: selectMyChannelClaims(state),
|
||||
isFetchingChannels: selectFetchingMyChannels(state),
|
||||
|
||||
@@ -15,6 +15,7 @@ import WalletTipAmountSelector from 'component/walletTipAmountSelector';
|
||||
import CreditAmount from 'component/common/credit-amount';
|
||||
import ChannelThumbnail from 'component/channelThumbnail';
|
||||
import UriIndicator from 'component/uriIndicator';
|
||||
import Empty from 'component/common/empty';
|
||||
|
||||
const COMMENT_SLOW_MODE_SECONDS = 5;
|
||||
|
||||
@@ -22,6 +23,7 @@ type Props = {
|
||||
uri: string,
|
||||
claim: StreamClaim,
|
||||
createComment: (string, string, string, ?string) => Promise<any>,
|
||||
commentsDisabledBySettings: boolean,
|
||||
channels: ?Array<ChannelClaim>,
|
||||
onDoneReplying?: () => void,
|
||||
onCancelReplying?: () => void,
|
||||
@@ -31,20 +33,17 @@ type Props = {
|
||||
isReply: boolean,
|
||||
activeChannel: string,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
bottom: boolean,
|
||||
onSubmit: (string, string) => void,
|
||||
livestream: boolean,
|
||||
embed?: boolean,
|
||||
livestream?: boolean,
|
||||
toast: (string) => void,
|
||||
claimIsMine: boolean,
|
||||
sendTip: ({}, (any) => void, (any) => void) => void,
|
||||
justCommented: Array<string>,
|
||||
commentingEnabled: boolean,
|
||||
};
|
||||
|
||||
export function CommentCreate(props: Props) {
|
||||
const {
|
||||
createComment,
|
||||
commentsDisabledBySettings,
|
||||
claim,
|
||||
channels,
|
||||
onDoneReplying,
|
||||
@@ -54,14 +53,10 @@ export function CommentCreate(props: Props) {
|
||||
isReply,
|
||||
parentId,
|
||||
activeChannelClaim,
|
||||
onSubmit,
|
||||
bottom,
|
||||
livestream,
|
||||
embed,
|
||||
toast,
|
||||
claimIsMine,
|
||||
sendTip,
|
||||
commentingEnabled,
|
||||
justCommented,
|
||||
} = props;
|
||||
const buttonref: ElementRef<any> = React.useRef();
|
||||
@@ -96,7 +91,7 @@ export function CommentCreate(props: Props) {
|
||||
|
||||
function altEnterListener(e: SyntheticKeyboardEvent<*>) {
|
||||
const KEYCODE_ENTER = 13;
|
||||
if ((livestream || e.ctrlKey || e.metaKey) && e.keyCode === KEYCODE_ENTER) {
|
||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === KEYCODE_ENTER) {
|
||||
e.preventDefault();
|
||||
buttonref.current.click();
|
||||
}
|
||||
@@ -174,10 +169,6 @@ export function CommentCreate(props: Props) {
|
||||
setCommentFailure(false);
|
||||
justCommented.push(res.comment_id);
|
||||
|
||||
if (onSubmit) {
|
||||
onSubmit(commentValue, activeChannelClaim.name);
|
||||
}
|
||||
|
||||
if (onDoneReplying) {
|
||||
onDoneReplying();
|
||||
}
|
||||
@@ -193,16 +184,15 @@ export function CommentCreate(props: Props) {
|
||||
setAdvancedEditor(!advancedEditor);
|
||||
}
|
||||
|
||||
if (!commentingEnabled || !hasChannels) {
|
||||
if (commentsDisabledBySettings) {
|
||||
return <Empty padded text={__('This channel has disabled comments on their page.')} />;
|
||||
}
|
||||
|
||||
if (!hasChannels) {
|
||||
return (
|
||||
<div
|
||||
role="button"
|
||||
onClick={() => {
|
||||
if (embed) {
|
||||
window.open(`https://odysee.com/$/${PAGES.AUTH}?redirect=/$/${PAGES.LIVESTREAM}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const pathPlusRedirect = `/$/${PAGES.CHANNEL_NEW}?redirect=${pathname}`;
|
||||
if (livestream) {
|
||||
window.open(pathPlusRedirect);
|
||||
@@ -256,7 +246,6 @@ export function CommentCreate(props: Props) {
|
||||
className={classnames('comment__create', {
|
||||
'comment__create--reply': isReply,
|
||||
'comment__create--nested-reply': isNested,
|
||||
'comment__create--bottom': bottom,
|
||||
})}
|
||||
>
|
||||
<FormField
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectChannelPermUrlForClaimUri, makeSelectClaimIsMine, makeSelectClaimForUri } from 'lbry-redux';
|
||||
import { doCommentAbandon, doCommentPin, doCommentList, doCommentModBlock } from 'redux/actions/comments';
|
||||
import {
|
||||
doCommentAbandon,
|
||||
doCommentPin,
|
||||
doCommentList,
|
||||
doCommentModBlock,
|
||||
doCommentModBlockAsAdmin,
|
||||
doCommentModBlockAsModerator,
|
||||
doCommentModAddDelegate,
|
||||
} from 'redux/actions/comments';
|
||||
import { doChannelMute } from 'redux/actions/blocked';
|
||||
// import { doSetActiveChannel } from 'redux/actions/app';
|
||||
import { doSetPlayingUri } from 'redux/actions/content';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import { selectPlayingUri } from 'redux/selectors/content';
|
||||
import { selectModerationDelegatorsById } from 'redux/selectors/comments';
|
||||
import CommentMenuList from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
@@ -14,6 +23,7 @@ const select = (state, props) => ({
|
||||
contentChannelPermanentUrl: makeSelectChannelPermUrlForClaimUri(props.uri)(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
playingUri: selectPlayingUri(state),
|
||||
moderationDelegatorsById: selectModerationDelegatorsById(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
@@ -23,7 +33,12 @@ const perform = (dispatch) => ({
|
||||
pinComment: (commentId, remove) => dispatch(doCommentPin(commentId, remove)),
|
||||
fetchComments: (uri) => dispatch(doCommentList(uri)),
|
||||
// setActiveChannel: channelId => dispatch(doSetActiveChannel(channelId)),
|
||||
commentModBlock: (commentAuthor) => dispatch(doCommentModBlock(commentAuthor)),
|
||||
commentModBlock: (commenterUri) => dispatch(doCommentModBlock(commenterUri)),
|
||||
commentModBlockAsAdmin: (commenterUri, blockerId) => dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)),
|
||||
commentModBlockAsModerator: (commenterUri, creatorId, blockerId) =>
|
||||
dispatch(doCommentModBlockAsModerator(commenterUri, creatorId, blockerId)),
|
||||
commentModAddDelegate: (modChanId, modChanName, creatorChannelClaim) =>
|
||||
dispatch(doCommentModAddDelegate(modChanId, modChanName, creatorChannelClaim, true)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(CommentMenuList);
|
||||
@@ -4,9 +4,11 @@ import React from 'react';
|
||||
import { MenuList, MenuItem } from '@reach/menu-button';
|
||||
import ChannelThumbnail from 'component/channelThumbnail';
|
||||
import Icon from 'component/common/icon';
|
||||
import { parseURI } from 'lbry-redux';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: ?Claim,
|
||||
clearPlayingUri: () => void,
|
||||
authorUri: string, // full LBRY Channel URI: lbry://@channel#123...
|
||||
commentId: string, // sha256 digest identifying the comment
|
||||
@@ -22,14 +24,19 @@ type Props = {
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
isTopLevel: boolean,
|
||||
commentModBlock: (string) => void,
|
||||
commentModBlockAsAdmin: (string, string) => void,
|
||||
commentModBlockAsModerator: (string, string, string) => void,
|
||||
commentModAddDelegate: (string, string, ChannelClaim) => void,
|
||||
playingUri: ?PlayingUri,
|
||||
disableEdit?: boolean,
|
||||
disableRemove?: boolean,
|
||||
moderationDelegatorsById: { [string]: { global: boolean, delegators: { name: string, claimId: string } } },
|
||||
};
|
||||
|
||||
function CommentMenuList(props: Props) {
|
||||
const {
|
||||
uri,
|
||||
claim,
|
||||
authorUri,
|
||||
commentIsMine,
|
||||
commentId,
|
||||
@@ -44,11 +51,31 @@ function CommentMenuList(props: Props) {
|
||||
handleEditComment,
|
||||
fetchComments,
|
||||
commentModBlock,
|
||||
commentModBlockAsAdmin,
|
||||
commentModBlockAsModerator,
|
||||
commentModAddDelegate,
|
||||
playingUri,
|
||||
disableEdit,
|
||||
disableRemove,
|
||||
moderationDelegatorsById,
|
||||
} = props;
|
||||
|
||||
const contentChannelClaim = !claim
|
||||
? null
|
||||
: claim.value_type === 'channel'
|
||||
? claim
|
||||
: claim.signing_channel && claim.is_channel_signature_valid
|
||||
? claim.signing_channel
|
||||
: null;
|
||||
|
||||
const activeModeratorInfo = activeChannelClaim && moderationDelegatorsById[activeChannelClaim.claim_id];
|
||||
const activeChannelIsCreator = activeChannelClaim && activeChannelClaim.permanent_url === contentChannelPermanentUrl;
|
||||
const activeChannelIsAdmin = activeChannelClaim && activeModeratorInfo && activeModeratorInfo.global;
|
||||
const activeChannelIsModerator =
|
||||
activeChannelClaim &&
|
||||
contentChannelClaim &&
|
||||
activeModeratorInfo &&
|
||||
Object.values(activeModeratorInfo.delegators).includes(contentChannelClaim.claim_id);
|
||||
|
||||
function handlePinComment(commentId, remove) {
|
||||
pinComment(commentId, remove).then(() => fetchComments(uri));
|
||||
@@ -69,6 +96,25 @@ function CommentMenuList(props: Props) {
|
||||
muteChannel(authorUri);
|
||||
}
|
||||
|
||||
function assignAsModerator() {
|
||||
if (activeChannelClaim && authorUri) {
|
||||
const { channelName, channelClaimId } = parseURI(authorUri);
|
||||
commentModAddDelegate(channelClaimId, channelName, activeChannelClaim);
|
||||
}
|
||||
}
|
||||
|
||||
function blockCommentAsModerator() {
|
||||
if (activeChannelClaim && contentChannelClaim) {
|
||||
commentModBlockAsModerator(authorUri, contentChannelClaim.claim_id, activeChannelClaim.claim_id);
|
||||
}
|
||||
}
|
||||
|
||||
function blockCommentAsAdmin() {
|
||||
if (activeChannelClaim) {
|
||||
commentModBlockAsAdmin(authorUri, activeChannelClaim.claim_id);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<MenuList className="menu__list">
|
||||
{activeChannelIsCreator && <div className="comment__menu-title">{__('Creator tools')}</div>}
|
||||
@@ -85,6 +131,20 @@ function CommentMenuList(props: Props) {
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{activeChannelIsCreator && (
|
||||
<MenuItem className="comment__menu-option" onSelect={assignAsModerator}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.ADD} />
|
||||
{__('Add as moderator')}
|
||||
</div>
|
||||
<span className="comment__menu-help">
|
||||
{__('Assign this user to moderate %channel%', {
|
||||
channel: activeChannelClaim ? activeChannelClaim.name : __('your channel'),
|
||||
})}
|
||||
</span>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{!disableRemove &&
|
||||
activeChannelClaim &&
|
||||
(activeChannelClaim.permanent_url === authorUri ||
|
||||
@@ -128,6 +188,34 @@ function CommentMenuList(props: Props) {
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{(activeChannelIsAdmin || activeChannelIsModerator) && (
|
||||
<div className="comment__menu-title">{__('Moderator tools')}</div>
|
||||
)}
|
||||
|
||||
{!commentIsMine && activeChannelIsAdmin && (
|
||||
<MenuItem className="comment__menu-option" onSelect={blockCommentAsAdmin}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.GLOBE} />
|
||||
{__('Global Block')}
|
||||
</div>
|
||||
<span className="comment__menu-help">{__('Block this channel as global admin')}</span>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{!commentIsMine && activeChannelIsModerator && (
|
||||
<MenuItem className="comment__menu-option" onSelect={blockCommentAsModerator}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.BLOCK} />
|
||||
{__('Moderator Block')}
|
||||
</div>
|
||||
<span className="comment__menu-help">
|
||||
{__('Block this channel on behalf of %creator%', {
|
||||
creator: contentChannelClaim ? contentChannelClaim.name : __('creator'),
|
||||
})}
|
||||
</span>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{activeChannelClaim && (
|
||||
<div className="comment__menu-active">
|
||||
<ChannelThumbnail uri={activeChannelClaim.permanent_url} />
|
||||
|
||||
@@ -77,7 +77,7 @@ export default function CommentReactions(props: Props) {
|
||||
<Button
|
||||
requiresAuth={IS_WEB}
|
||||
title={__('Upvote')}
|
||||
icon={myReacts.includes(REACTION_TYPES.LIKE) ? ICONS.FIRE_ACTIVE : ICONS.FIRE}
|
||||
icon={ICONS.UPVOTE}
|
||||
className={classnames('comment__action', {
|
||||
'comment__action--active': myReacts && myReacts.includes(REACTION_TYPES.LIKE),
|
||||
})}
|
||||
@@ -87,7 +87,7 @@ export default function CommentReactions(props: Props) {
|
||||
<Button
|
||||
requiresAuth={IS_WEB}
|
||||
title={__('Downvote')}
|
||||
icon={myReacts.includes(REACTION_TYPES.DISLIKE) ? ICONS.SLIME_ACTIVE : ICONS.SLIME}
|
||||
icon={ICONS.DOWNVOTE}
|
||||
className={classnames('comment__action', {
|
||||
'comment__action--active': myReacts && myReacts.includes(REACTION_TYPES.DISLIKE),
|
||||
})}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
selectIsFetchingComments,
|
||||
makeSelectTotalCommentsCountForUri,
|
||||
selectOthersReactsById,
|
||||
makeSelectCommentsDisabledForUri,
|
||||
} from 'redux/selectors/comments';
|
||||
import { doCommentList, doCommentReactList } from 'redux/actions/comments';
|
||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||
@@ -18,14 +19,15 @@ const select = (state, props) => ({
|
||||
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
||||
isFetchingComments: selectIsFetchingComments(state),
|
||||
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
||||
commentsDisabledBySettings: makeSelectCommentsDisabledForUri(props.uri)(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
reactionsById: selectOthersReactsById(state),
|
||||
activeChannelId: selectActiveChannelId(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchComments: uri => dispatch(doCommentList(uri)),
|
||||
fetchReacts: uri => dispatch(doCommentReactList(uri)),
|
||||
const perform = (dispatch) => ({
|
||||
fetchComments: (uri) => dispatch(doCommentList(uri)),
|
||||
fetchReacts: (uri) => dispatch(doCommentReactList(uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(CommentsList);
|
||||
@@ -16,6 +16,7 @@ import Empty from 'component/common/empty';
|
||||
|
||||
type Props = {
|
||||
comments: Array<Comment>,
|
||||
commentsDisabledBySettings: boolean,
|
||||
fetchComments: (string) => void,
|
||||
fetchReacts: (string) => Promise<any>,
|
||||
uri: string,
|
||||
@@ -35,6 +36,7 @@ function CommentList(props: Props) {
|
||||
fetchReacts,
|
||||
uri,
|
||||
comments,
|
||||
commentsDisabledBySettings,
|
||||
claimIsMine,
|
||||
myChannels,
|
||||
isFetchingComments,
|
||||
@@ -147,7 +149,9 @@ function CommentList(props: Props) {
|
||||
}
|
||||
|
||||
// Default to newest first for apps that don't have comment reactions
|
||||
const sortedComments = reactionsById ? sortComments({ comments, reactionsById, sort, isMyComment, justCommented }) : [];
|
||||
const sortedComments = reactionsById
|
||||
? sortComments({ comments, reactionsById, sort, isMyComment, justCommented })
|
||||
: [];
|
||||
const displayedComments = readyToDisplayComments
|
||||
? prepareComments(sortedComments, linkedComment).slice(start, end)
|
||||
: [];
|
||||
@@ -212,7 +216,7 @@ function CommentList(props: Props) {
|
||||
<>
|
||||
<CommentCreate uri={uri} justCommented={justCommented} />
|
||||
|
||||
{!isFetchingComments && hasNoComments && (
|
||||
{!commentsDisabledBySettings && !isFetchingComments && hasNoComments && (
|
||||
<Empty padded text={__('That was pretty deep. What do you think?')} />
|
||||
)}
|
||||
|
||||
|
||||
@@ -392,6 +392,13 @@ export const icons = {
|
||||
<line x1="12" y1="12" x2="12" y2="16" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.GLOBE]: buildIcon(
|
||||
<g>
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
<line x1="2" y1="12" x2="22" y2="12" />
|
||||
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" />
|
||||
</g>
|
||||
),
|
||||
[ICONS.UNLOCK]: buildIcon(
|
||||
<g>
|
||||
<rect x="3" y="11" width="18" height="11" rx="2" ry="2" />
|
||||
|
||||
@@ -7,12 +7,13 @@ import {
|
||||
selectMyChannelClaims,
|
||||
makeSelectClaimIsStreamPlaceholder,
|
||||
makeSelectTagInClaimOrChannelForUri,
|
||||
makeSelectStreamingUrlForUri,
|
||||
} from 'lbry-redux';
|
||||
import { DISABLE_COMMENTS_TAG } from 'constants/tags';
|
||||
import { makeSelectCostInfoForUri } from 'lbryinc';
|
||||
import { doSetPlayingUri } from 'redux/actions/content';
|
||||
import { doSetPlayingUri, doPlayUri } from 'redux/actions/content';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { doOpenModal, doSetActiveChannel, doSetIncognito } from 'redux/actions/app';
|
||||
import { doOpenModal, doSetActiveChannel, doSetIncognito, doAnalyticsView } from 'redux/actions/app';
|
||||
import fs from 'fs';
|
||||
import FileActions from './view';
|
||||
import { makeSelectFileRenderModeForUri } from 'redux/selectors/content';
|
||||
@@ -26,6 +27,7 @@ const select = (state, props) => ({
|
||||
myChannels: selectMyChannelClaims(state),
|
||||
isLivestreamClaim: makeSelectClaimIsStreamPlaceholder(props.uri)(state),
|
||||
reactionsDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
|
||||
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
@@ -42,6 +44,7 @@ const perform = (dispatch) => ({
|
||||
},
|
||||
clearPlayingUri: () => dispatch(doSetPlayingUri({ uri: null })),
|
||||
doToast: (options) => dispatch(doToast(options)),
|
||||
download: (uri) => dispatch(doPlayUri(uri, false, true, () => dispatch(doAnalyticsView(uri)))),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(FileActions);
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import { SIMPLE_SITE, SITE_NAME, ENABLE_FILE_REACTIONS } from 'config';
|
||||
import { SITE_NAME, ENABLE_FILE_REACTIONS } from 'config';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import * as MODALS from 'constants/modal_types';
|
||||
import * as ICONS from 'constants/icons';
|
||||
@@ -13,6 +13,9 @@ import ClaimSupportButton from 'component/claimSupportButton';
|
||||
import ClaimCollectionAddButton from 'component/claimCollectionAddButton';
|
||||
import { useHistory } from 'react-router';
|
||||
import FileReactions from 'component/fileReactions';
|
||||
import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button';
|
||||
import Icon from 'component/common/icon';
|
||||
import { webDownloadClaim } from 'util/downloadClaim';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
@@ -26,9 +29,10 @@ type Props = {
|
||||
myChannels: ?Array<ChannelClaim>,
|
||||
doToast: ({ message: string }) => void,
|
||||
clearPlayingUri: () => void,
|
||||
hideRepost?: boolean,
|
||||
isLivestreamClaim: boolean,
|
||||
reactionsDisabled: boolean,
|
||||
download: (string) => void,
|
||||
streamingUrl: ?string,
|
||||
};
|
||||
|
||||
function FileActions(props: Props) {
|
||||
@@ -44,9 +48,10 @@ function FileActions(props: Props) {
|
||||
myChannels,
|
||||
clearPlayingUri,
|
||||
doToast,
|
||||
hideRepost,
|
||||
isLivestreamClaim,
|
||||
reactionsDisabled,
|
||||
download,
|
||||
streamingUrl,
|
||||
} = props;
|
||||
const {
|
||||
push,
|
||||
@@ -59,6 +64,8 @@ function FileActions(props: Props) {
|
||||
const claimId = claim && claim.claim_id;
|
||||
const { signing_channel: signingChannel } = claim;
|
||||
const channelName = signingChannel && signingChannel.name;
|
||||
const fileName = claim && claim.value && claim.value.source && claim.value.source.name;
|
||||
|
||||
// We want to use the short form uri for editing
|
||||
// This is what the user is used to seeing, they don't care about the claim id
|
||||
// We will select the claim id before they publish
|
||||
@@ -78,6 +85,22 @@ function FileActions(props: Props) {
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const collectionId = urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID);
|
||||
|
||||
// @if TARGET='web'
|
||||
const [downloadClicked, setDownloadClicked] = React.useState(false);
|
||||
|
||||
function handleWebDownload() {
|
||||
// download() causes 'streamingUrl' to be populated.
|
||||
download(uri);
|
||||
setDownloadClicked(true);
|
||||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (downloadClicked && streamingUrl) {
|
||||
webDownloadClaim(streamingUrl, fileName);
|
||||
}
|
||||
}, [downloadClicked, streamingUrl, fileName]);
|
||||
// @endif
|
||||
|
||||
function handleRepostClick() {
|
||||
if (!hasChannels) {
|
||||
clearPlayingUri();
|
||||
@@ -90,26 +113,24 @@ function FileActions(props: Props) {
|
||||
|
||||
const lhsSection = (
|
||||
<>
|
||||
{ENABLE_FILE_REACTIONS && !reactionsDisabled && <FileReactions uri={uri} livestream={isLivestreamClaim} />}
|
||||
{ENABLE_FILE_REACTIONS && !reactionsDisabled && <FileReactions uri={uri} />}
|
||||
<ClaimSupportButton uri={uri} fileAction />
|
||||
<ClaimCollectionAddButton uri={uri} fileAction />
|
||||
{!hideRepost && (
|
||||
<Button
|
||||
button="alt"
|
||||
className="button--file-action"
|
||||
icon={ICONS.REPOST}
|
||||
label={
|
||||
claim.meta.reposted > 1 ? __(`%repost_total% Reposts`, { repost_total: claim.meta.reposted }) : __('Repost')
|
||||
}
|
||||
description={__('Repost')}
|
||||
requiresAuth={IS_WEB}
|
||||
onClick={handleRepostClick}
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
button="alt"
|
||||
className="button--file-action"
|
||||
icon={ICONS.REPOST}
|
||||
label={
|
||||
claim.meta.reposted > 1 ? __(`%repost_total% Reposts`, { repost_total: claim.meta.reposted }) : __('Repost')
|
||||
}
|
||||
description={__('Repost')}
|
||||
requiresAuth={IS_WEB}
|
||||
onClick={handleRepostClick}
|
||||
/>
|
||||
<Button
|
||||
className="button--file-action"
|
||||
icon={ICONS.SHARE}
|
||||
label={isMobile ? undefined : __('Share')}
|
||||
label={__('Share')}
|
||||
title={__('Share')}
|
||||
onClick={() => openModal(MODALS.SOCIAL_SHARE, { uri, webShareable, collectionId })}
|
||||
/>
|
||||
@@ -118,8 +139,9 @@ function FileActions(props: Props) {
|
||||
|
||||
const rhsSection = (
|
||||
<>
|
||||
{!SIMPLE_SITE && <FileDownloadLink uri={uri} />}
|
||||
|
||||
{/* @if TARGET='app' */}
|
||||
<FileDownloadLink uri={uri} />
|
||||
{/* @endif */}
|
||||
{claimIsMine && (
|
||||
<Button
|
||||
className="button--file-action"
|
||||
@@ -140,14 +162,38 @@ function FileActions(props: Props) {
|
||||
onClick={() => openModal(MODALS.CONFIRM_FILE_REMOVE, { uri })}
|
||||
/>
|
||||
)}
|
||||
{!claimIsMine && (
|
||||
<Button
|
||||
title={__('Report content')}
|
||||
<Menu>
|
||||
<MenuButton
|
||||
className="button--file-action"
|
||||
icon={ICONS.REPORT}
|
||||
navigate={`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`}
|
||||
/>
|
||||
)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
>
|
||||
<Icon size={20} icon={ICONS.MORE} />
|
||||
</MenuButton>
|
||||
<MenuList className="menu__list">
|
||||
{/* @if TARGET='web' */}
|
||||
<MenuItem className="comment__menu-option" onSelect={handleWebDownload}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.DOWNLOAD} />
|
||||
{__('Download')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
{/* @endif */}
|
||||
{!claimIsMine && (
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => push(`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`)}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.REPORT} />
|
||||
{__('Report content')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
</MenuList>
|
||||
</Menu>
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as ICONS from 'constants/icons';
|
||||
import * as MODALS from 'constants/modal_types';
|
||||
import React, { useState } from 'react';
|
||||
import Button from 'component/button';
|
||||
import { webDownloadClaim } from 'util/downloadClaim';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
@@ -46,16 +47,7 @@ function FileDownloadLink(props: Props) {
|
||||
// @if TARGET='web'
|
||||
React.useEffect(() => {
|
||||
if (didClickDownloadButton && streamingUrl) {
|
||||
let element = document.createElement('a');
|
||||
element.setAttribute('href', `${streamingUrl}?download=true`);
|
||||
element.setAttribute('download', fileName);
|
||||
element.style.display = 'none';
|
||||
// $FlowFixMe
|
||||
document.body.appendChild(element);
|
||||
element.click();
|
||||
// $FlowFixMe
|
||||
document.body.removeChild(element);
|
||||
|
||||
webDownloadClaim(streamingUrl, fileName);
|
||||
setDidClickDownloadButton(false);
|
||||
}
|
||||
}, [streamingUrl, didClickDownloadButton, fileName]);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
import * as REACTION_TYPES from 'constants/reactions';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
@@ -16,44 +15,18 @@ type Props = {
|
||||
likeCount: number,
|
||||
dislikeCount: number,
|
||||
myReaction: ?string,
|
||||
livestream?: boolean,
|
||||
};
|
||||
|
||||
function FileReactions(props: Props) {
|
||||
const {
|
||||
claim,
|
||||
uri,
|
||||
doFetchReactions,
|
||||
doReactionLike,
|
||||
doReactionDislike,
|
||||
myReaction,
|
||||
likeCount,
|
||||
dislikeCount,
|
||||
livestream,
|
||||
} = props;
|
||||
const { claim, uri, doFetchReactions, doReactionLike, doReactionDislike, likeCount, dislikeCount } = props;
|
||||
const claimId = claim && claim.claim_id;
|
||||
const channel = claim && claim.signing_channel && claim.signing_channel.name;
|
||||
const isCollection = claim && claim.value_type === 'collection'; // hack because nudge gets cut off by card on cols.
|
||||
React.useEffect(() => {
|
||||
function fetchReactions() {
|
||||
if (claimId) {
|
||||
doFetchReactions(claimId);
|
||||
}
|
||||
|
||||
let fetchInterval;
|
||||
if (claimId) {
|
||||
fetchReactions();
|
||||
|
||||
if (livestream) {
|
||||
fetchInterval = setInterval(fetchReactions, 45000);
|
||||
}
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (fetchInterval) {
|
||||
clearInterval(fetchInterval);
|
||||
}
|
||||
};
|
||||
}, [claimId, doFetchReactions, livestream]);
|
||||
}, [claimId, doFetchReactions]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -68,46 +41,20 @@ function FileReactions(props: Props) {
|
||||
title={__('I like this')}
|
||||
requiresAuth={IS_WEB}
|
||||
authSrc="filereaction_like"
|
||||
className={classnames('button--file-action', { 'button--fire': myReaction === REACTION_TYPES.LIKE })}
|
||||
label={
|
||||
<>
|
||||
{myReaction === REACTION_TYPES.LIKE && (
|
||||
<>
|
||||
<div className="button__fire-glow" />
|
||||
<div className="button__fire-particle1" />
|
||||
<div className="button__fire-particle2" />
|
||||
<div className="button__fire-particle3" />
|
||||
<div className="button__fire-particle4" />
|
||||
<div className="button__fire-particle5" />
|
||||
<div className="button__fire-particle6" />
|
||||
</>
|
||||
)}
|
||||
{formatNumberWithCommas(likeCount, 0)}
|
||||
</>
|
||||
}
|
||||
className={classnames('button--file-action')}
|
||||
label={formatNumberWithCommas(likeCount, 0)}
|
||||
iconSize={18}
|
||||
icon={myReaction === REACTION_TYPES.LIKE ? ICONS.FIRE_ACTIVE : ICONS.FIRE}
|
||||
icon={ICONS.UPVOTE}
|
||||
onClick={() => doReactionLike(uri)}
|
||||
/>
|
||||
<Button
|
||||
requiresAuth={IS_WEB}
|
||||
authSrc={'filereaction_dislike'}
|
||||
title={__('I dislike this')}
|
||||
className={classnames('button--file-action', { 'button--slime': myReaction === REACTION_TYPES.DISLIKE })}
|
||||
label={
|
||||
<>
|
||||
{myReaction === REACTION_TYPES.DISLIKE && (
|
||||
<>
|
||||
<div className="button__slime-stain" />
|
||||
<div className="button__slime-drop1" />
|
||||
<div className="button__slime-drop2" />
|
||||
</>
|
||||
)}
|
||||
{formatNumberWithCommas(dislikeCount, 0)}
|
||||
</>
|
||||
}
|
||||
className={classnames('button--file-action')}
|
||||
label={formatNumberWithCommas(dislikeCount, 0)}
|
||||
iconSize={18}
|
||||
icon={myReaction === REACTION_TYPES.DISLIKE ? ICONS.SLIME_ACTIVE : ICONS.SLIME}
|
||||
icon={ICONS.DOWNVOTE}
|
||||
onClick={() => doReactionDislike(uri)}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -21,8 +21,8 @@ function FileSubtitle(props: Props) {
|
||||
|
||||
<FileViewCount uri={uri} livestream={livestream} activeViewers={activeViewers} isLive={isLive} />
|
||||
</div>
|
||||
{/* did I need these params? */}
|
||||
<FileActions uri={uri} hideRepost={livestream} livestream={livestream} />
|
||||
|
||||
<FileActions uri={uri} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectTitleForUri } from 'lbry-redux';
|
||||
import { makeSelectTitleForUri, makeSelectClaimForUri } from 'lbry-redux';
|
||||
import { makeSelectInsufficientCreditsForUri } from 'redux/selectors/content';
|
||||
import { makeSelectViewersForId } from 'redux/selectors/livestream';
|
||||
import FileTitleSection from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
isInsufficientCredits: makeSelectInsufficientCreditsForUri(props.uri)(state),
|
||||
title: makeSelectTitleForUri(props.uri)(state),
|
||||
});
|
||||
const select = (state, props) => {
|
||||
const claim = makeSelectClaimForUri(props.uri)(state);
|
||||
const viewers = claim && makeSelectViewersForId(claim.claim_id)(state);
|
||||
return {
|
||||
viewers,
|
||||
isInsufficientCredits: makeSelectInsufficientCreditsForUri(props.uri)(state),
|
||||
title: makeSelectTitleForUri(props.uri)(state),
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(select)(FileTitleSection);
|
||||
@@ -10,6 +10,7 @@ import * as ICONS from 'constants/icons';
|
||||
import Icon from 'component/common/icon';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
import Button from 'component/button';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import FileDescription from 'component/fileDescription';
|
||||
import usePersistedState from 'effects/use-persisted-state';
|
||||
|
||||
@@ -20,11 +21,11 @@ type Props = {
|
||||
isNsfwBlocked: boolean,
|
||||
livestream?: boolean,
|
||||
isLive?: boolean,
|
||||
activeViewers?: number,
|
||||
viewers?: number,
|
||||
};
|
||||
|
||||
function FileTitleSection(props: Props) {
|
||||
const { title, uri, nsfw, isNsfwBlocked, livestream = false, isLive = false, activeViewers } = props;
|
||||
const { title, uri, nsfw, isNsfwBlocked, livestream = false, isLive = false, viewers } = props;
|
||||
const [hasAcknowledgedSec, setHasAcknowledgedSec] = usePersistedState('sec-nag', false);
|
||||
|
||||
return (
|
||||
@@ -56,7 +57,7 @@ function FileTitleSection(props: Props) {
|
||||
body={
|
||||
<React.Fragment>
|
||||
<ClaimInsufficientCredits uri={uri} />
|
||||
<FileSubtitle uri={uri} isLive={isLive} livestream={livestream} activeViewers={activeViewers} />
|
||||
<FileSubtitle uri={uri} isLive={isLive} livestream={livestream} activeViewers={viewers} />
|
||||
</React.Fragment>
|
||||
}
|
||||
actions={
|
||||
@@ -64,16 +65,17 @@ function FileTitleSection(props: Props) {
|
||||
<div className="main--empty">
|
||||
<h2>
|
||||
<Icon className="icon--hidden" icon={ICONS.EYE_OFF} />
|
||||
{__('Mature content is not supported on Odysee.')}
|
||||
{__('Mature content blocked.')}
|
||||
</h2>
|
||||
<div>
|
||||
<I18nMessage
|
||||
tokens={{
|
||||
download_url: <Button label={__('lbry.com')} button="link" href="https://lbry.com/get" />,
|
||||
content_settings: (
|
||||
<Button button="link" label={__('content settings')} navigate={`/$/${PAGES.SETTINGS}`} />
|
||||
),
|
||||
}}
|
||||
>
|
||||
You can download the LBRY Desktop or Android app on %download_url% and enable mature content in
|
||||
Settings.
|
||||
Change this in your %content_settings%.
|
||||
</I18nMessage>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import HelpLink from 'component/common/help-link';
|
||||
type Props = {
|
||||
claim: ?StreamClaim,
|
||||
fetchViewCount: (string) => void,
|
||||
fetchingViewCount: boolean,
|
||||
uri: string,
|
||||
viewCount: string,
|
||||
livestream?: boolean,
|
||||
@@ -36,14 +37,14 @@ function FileViewCount(props: Props) {
|
||||
|
||||
return (
|
||||
<span className="media__subtitle--centered">
|
||||
{activeViewers !== undefined
|
||||
? __('%viewer_count% currently %viewer_state%', {
|
||||
viewer_count: activeViewers,
|
||||
viewer_state: isLive ? __('watching') : __('waiting'),
|
||||
})
|
||||
: viewCount !== 1
|
||||
? __('%view_count% views', { view_count: formattedViewCount })
|
||||
: __('1 view')}
|
||||
{isLive &&
|
||||
__('%viewer_count% currently %viewer_state%', {
|
||||
viewer_count: activeViewers === undefined ? '...' : activeViewers,
|
||||
viewer_state: isLive ? __('watching') : __('waiting'),
|
||||
})}
|
||||
{!isLive &&
|
||||
activeViewers === undefined &&
|
||||
(viewCount !== 1 ? __('%view_count% views', { view_count: formattedViewCount }) : __('1 view'))}
|
||||
{!SIMPLE_SITE && <HelpLink href="https://lbry.com/faq/views" />}
|
||||
</span>
|
||||
);
|
||||
|
||||
@@ -5,8 +5,7 @@ import FilePrice from 'component/filePrice';
|
||||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import { withRouter } from 'react-router';
|
||||
import { URL } from 'config';
|
||||
import OdyseeLogo from 'component/header/odysee_logo.png';
|
||||
import OdyseeLogoWithText from 'component/header/odysee_white.png';
|
||||
import * as ICONS from 'constants/icons';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
@@ -37,10 +36,7 @@ function FileViewerEmbeddedTitle(props: Props) {
|
||||
{...contentLinkProps}
|
||||
/>
|
||||
<div className="file-viewer__embedded-info">
|
||||
<Button className="file-viewer__overlay-logo" aria-label={__('Home')} {...lbryLinkProps}>
|
||||
<img src={OdyseeLogo} className=" mobile-only" />
|
||||
<img src={OdyseeLogoWithText} className=" mobile-hidden" />
|
||||
</Button>
|
||||
<Button className="file-viewer__overlay-logo" icon={ICONS.LBRY} aria-label={__('Home')} {...lbryLinkProps} />
|
||||
{isInApp && <FilePrice uri={uri} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import { ENABLE_NO_SOURCE_CLAIMS, CHANNEL_STAKED_LEVEL_LIVESTREAM } from 'config';
|
||||
import { LOGO_TITLE, ENABLE_NO_SOURCE_CLAIMS, CHANNEL_STAKED_LEVEL_LIVESTREAM } from 'config';
|
||||
import * as ICONS from 'constants/icons';
|
||||
import { SETTINGS } from 'lbry-redux';
|
||||
import * as PAGES from 'constants/pages';
|
||||
@@ -19,8 +19,6 @@ import ChannelThumbnail from 'component/channelThumbnail';
|
||||
import { remote } from 'electron';
|
||||
import { IS_MAC } from 'component/app/view';
|
||||
// @endif
|
||||
import OdyseeLogoWithWhiteText from './odysee_white.png';
|
||||
import OdyseeLogoWithText from './odysee.png';
|
||||
|
||||
type Props = {
|
||||
user: ?User,
|
||||
@@ -89,8 +87,8 @@ const Header = (props: Props) => {
|
||||
sidebarOpen,
|
||||
setSidebarOpen,
|
||||
isAbsoluteSideNavHidden,
|
||||
hideCancel,
|
||||
user,
|
||||
hideCancel,
|
||||
activeChannelClaim,
|
||||
activeChannelStakedLevel,
|
||||
} = props;
|
||||
@@ -102,7 +100,7 @@ const Header = (props: Props) => {
|
||||
const isPwdResetPage = history.location.pathname.includes(PAGES.AUTH_PASSWORD_RESET);
|
||||
const hasBackout = Boolean(backout);
|
||||
const { backLabel, backNavDefault, title: backTitle, simpleTitle: simpleBackTitle } = backout || {};
|
||||
// const notificationsEnabled = (user && user.experimental_ui) || false;
|
||||
const notificationsEnabled = (user && user.experimental_ui) || false;
|
||||
const livestreamEnabled = Boolean(
|
||||
ENABLE_NO_SOURCE_CLAIMS &&
|
||||
user &&
|
||||
@@ -172,8 +170,14 @@ const Header = (props: Props) => {
|
||||
|
||||
const loginButtons = (
|
||||
<div className="header__auth-buttons">
|
||||
<Button navigate={`/$/${PAGES.AUTH_SIGNIN}`} button="link" label={__('Log In')} className="mobile-hidden" />
|
||||
<Button navigate={`/$/${PAGES.AUTH}`} button="primary" label={__('Sign Up')} />
|
||||
<Button
|
||||
navigate={`/$/${PAGES.AUTH_SIGNIN}`}
|
||||
button="link"
|
||||
label={__('Log In')}
|
||||
className="mobile-hidden"
|
||||
disabled={user === null}
|
||||
/>
|
||||
<Button navigate={`/$/${PAGES.AUTH}`} button="primary" label={__('Sign Up')} disabled={user === null} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -242,12 +246,19 @@ const Header = (props: Props) => {
|
||||
icon={ICONS.MENU}
|
||||
onClick={() => setSidebarOpen(!sidebarOpen)}
|
||||
>
|
||||
{isAbsoluteSideNavHidden && isMobile && <NotificationBubble />}
|
||||
{isAbsoluteSideNavHidden && isMobile && notificationsEnabled && <NotificationBubble />}
|
||||
</Button>
|
||||
</span>
|
||||
)}
|
||||
<Button
|
||||
className="header__navigation-item header__navigation-item--lbry header__navigation-item--button-mobile"
|
||||
className="header__navigation-item header__navigation-item--lbry"
|
||||
// @if TARGET='app'
|
||||
label={'LBRY'}
|
||||
// @endif
|
||||
// @if TARGET='web'
|
||||
label={LOGO_TITLE} // eslint-disable-line
|
||||
// @endif
|
||||
icon={ICONS.LBRY}
|
||||
onClick={() => {
|
||||
if (history.location.pathname === '/') window.location.reload();
|
||||
}}
|
||||
@@ -257,12 +268,7 @@ const Header = (props: Props) => {
|
||||
}}
|
||||
// @endif
|
||||
{...homeButtonNavigationProps}
|
||||
>
|
||||
<img
|
||||
src={currentTheme === 'light' ? OdyseeLogoWithText : OdyseeLogoWithWhiteText}
|
||||
className="header__odysee"
|
||||
/>
|
||||
</Button>
|
||||
/>
|
||||
|
||||
{!authHeader && (
|
||||
<div className="header__center">
|
||||
@@ -279,7 +285,7 @@ const Header = (props: Props) => {
|
||||
|
||||
<HeaderMenuButtons
|
||||
authenticated={authenticated}
|
||||
notificationsEnabled
|
||||
notificationsEnabled={notificationsEnabled}
|
||||
history={history}
|
||||
handleThemeToggle={handleThemeToggle}
|
||||
currentTheme={currentTheme}
|
||||
@@ -432,10 +438,6 @@ function HeaderMenuButtons(props: HeaderMenuButtonProps) {
|
||||
<Icon aria-hidden icon={ICONS.CHANNEL} />
|
||||
{__('New Channel')}
|
||||
</MenuItem>
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.YOUTUBE_SYNC}`)}>
|
||||
<Icon aria-hidden icon={ICONS.YOUTUBE} />
|
||||
{__('Sync YouTube Channel')}
|
||||
</MenuItem>
|
||||
|
||||
{livestreamEnabled && (
|
||||
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.LIVESTREAM}`)}>
|
||||
|
||||
@@ -28,6 +28,8 @@ type Props = {
|
||||
|
||||
const VIEW_MODE_CHAT = 'view_chat';
|
||||
const VIEW_MODE_SUPER_CHAT = 'view_superchat';
|
||||
const COMMENT_SCROLL_OFFSET = 100;
|
||||
const COMMENT_SCROLL_TIMEOUT = 25;
|
||||
|
||||
export default function LivestreamComments(props: Props) {
|
||||
const {
|
||||
@@ -45,7 +47,7 @@ export default function LivestreamComments(props: Props) {
|
||||
myChannels,
|
||||
} = props;
|
||||
const commentsRef = React.createRef();
|
||||
const hasScrolledComments = React.useRef();
|
||||
const [scrollBottom, setScrollBottom] = React.useState(true);
|
||||
const [viewMode, setViewMode] = React.useState(VIEW_MODE_CHAT);
|
||||
const [performedInitialScroll, setPerformedInitialScroll] = React.useState(false);
|
||||
const claimId = claim && claim.claim_id;
|
||||
@@ -79,48 +81,48 @@ export default function LivestreamComments(props: Props) {
|
||||
}, [claimId, uri, doCommentList, doSuperChatList, doCommentSocketConnect, doCommentSocketDisconnect]);
|
||||
|
||||
React.useEffect(() => {
|
||||
const element = commentsRef.current;
|
||||
const discussionElement = document.querySelector('.livestream__comments');
|
||||
const commentElement = document.querySelector('.livestream-comment');
|
||||
|
||||
function handleScroll() {
|
||||
if (element) {
|
||||
const scrollHeight = element.scrollHeight - element.offsetHeight;
|
||||
const isAtBottom = scrollHeight <= element.scrollTop + 100;
|
||||
if (discussionElement) {
|
||||
const negativeCommentHeight = commentElement && -1 * commentElement.offsetHeight;
|
||||
const isAtRecent = negativeCommentHeight && discussionElement.scrollTop >= negativeCommentHeight;
|
||||
|
||||
if (!isAtBottom) {
|
||||
hasScrolledComments.current = true;
|
||||
} else {
|
||||
hasScrolledComments.current = false;
|
||||
}
|
||||
setScrollBottom(isAtRecent);
|
||||
}
|
||||
}
|
||||
|
||||
if (element) {
|
||||
element.addEventListener('scroll', handleScroll);
|
||||
if (discussionElement) {
|
||||
discussionElement.addEventListener('scroll', handleScroll);
|
||||
|
||||
if (commentsLength > 0) {
|
||||
// Only update comment scroll if the user hasn't scrolled up to view old comments
|
||||
// If they have, do nothing
|
||||
if (!hasScrolledComments.current || !performedInitialScroll) {
|
||||
setTimeout(() => (element.scrollTop = element.scrollHeight - element.offsetHeight + 100), 20);
|
||||
|
||||
if (!performedInitialScroll) {
|
||||
setPerformedInitialScroll(true);
|
||||
}
|
||||
if (!performedInitialScroll) {
|
||||
setTimeout(
|
||||
() =>
|
||||
(discussionElement.scrollTop =
|
||||
discussionElement.scrollHeight - discussionElement.offsetHeight + COMMENT_SCROLL_OFFSET),
|
||||
COMMENT_SCROLL_TIMEOUT
|
||||
);
|
||||
setPerformedInitialScroll(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (element) {
|
||||
element.removeEventListener('scroll', handleScroll);
|
||||
}
|
||||
};
|
||||
}, [commentsRef, commentsLength, performedInitialScroll]);
|
||||
return () => discussionElement.removeEventListener('scroll', handleScroll);
|
||||
}
|
||||
}, [commentsLength, performedInitialScroll, setPerformedInitialScroll, setScrollBottom]);
|
||||
|
||||
if (!claim) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function scrollBack() {
|
||||
const element = document.querySelector('.livestream__comments');
|
||||
if (element) element.scrollTop = 0;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="card livestream__discussion">
|
||||
<div className="card__header--between livestream-discussion__header">
|
||||
@@ -199,6 +201,15 @@ export default function LivestreamComments(props: Props) {
|
||||
<div className="main--empty" style={{ flex: 1 }} />
|
||||
)}
|
||||
|
||||
{!scrollBottom && (
|
||||
<Button
|
||||
button="alt"
|
||||
className="livestream__comments-scroll__down"
|
||||
label={__('Recent Comments')}
|
||||
onClick={() => scrollBack()}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="livestream__comment-create">
|
||||
<CommentCreate livestream bottom embed={embed} uri={uri} />
|
||||
</div>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
||||
import LivestreamFeed from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
export default connect(select)(LivestreamFeed);
|
||||
@@ -1,38 +0,0 @@
|
||||
// @flow
|
||||
import { BITWAVE_USERNAME, BITWAVE_EMBED_URL } from 'constants/livestream';
|
||||
import React from 'react';
|
||||
import FileTitleSection from 'component/fileTitleSection';
|
||||
import LivestreamComments from 'component/livestreamComments';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
claim: ?StreamClaim,
|
||||
activeViewers: number,
|
||||
};
|
||||
|
||||
export default function LivestreamFeed(props: Props) {
|
||||
const { claim, uri, activeViewers } = props;
|
||||
|
||||
if (!claim) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="section card-stack">
|
||||
<div className="file-render file-render--video livestream">
|
||||
<div className="file-viewer">
|
||||
<iframe
|
||||
src={`${BITWAVE_EMBED_URL}/${BITWAVE_USERNAME}?skin=odysee&autoplay=1`}
|
||||
scrolling="no"
|
||||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<FileTitleSection uri={uri} livestream activeViewers={activeViewers} />
|
||||
</div>
|
||||
<LivestreamComments uri={uri} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -9,12 +9,11 @@ type Props = {
|
||||
uri: string,
|
||||
claim: ?StreamClaim,
|
||||
isLive: boolean,
|
||||
activeViewers: number,
|
||||
chatDisabled: boolean,
|
||||
};
|
||||
|
||||
export default function LivestreamLayout(props: Props) {
|
||||
const { claim, uri, isLive, activeViewers, chatDisabled } = props;
|
||||
const { claim, uri, isLive, chatDisabled } = props;
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
if (!claim || !claim.signing_channel) {
|
||||
@@ -55,7 +54,7 @@ export default function LivestreamLayout(props: Props) {
|
||||
|
||||
{isMobile && <LivestreamComments uri={uri} />}
|
||||
|
||||
<FileTitleSection uri={uri} livestream isLive={isLive} activeViewers={activeViewers} />
|
||||
<FileTitleSection uri={uri} livestream isLive={isLive} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function LivestreamLink(props: Props) {
|
||||
const { push } = useHistory();
|
||||
const [livestreamClaim, setLivestreamClaim] = React.useState(false);
|
||||
const [isLivestreaming, setIsLivestreaming] = React.useState(false);
|
||||
const livestreamChannelId = (channelClaim && channelClaim.claim_id) || ''; // TODO: fail in a safer way, probably
|
||||
const livestreamChannelId = channelClaim.claim_id || ''; // TODO: fail in a safer way, probably
|
||||
|
||||
React.useEffect(() => {
|
||||
if (livestreamChannelId) {
|
||||
@@ -29,7 +29,7 @@ export default function LivestreamLink(props: Props) {
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.items && res.items.length > 0) {
|
||||
const claim = res.items[0];
|
||||
const claim = res.items[res.items.length - 1];
|
||||
setLivestreamClaim(claim);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,12 +5,14 @@ import classnames from 'classnames';
|
||||
type Props = {
|
||||
unseenCount: number,
|
||||
inline: boolean,
|
||||
user: ?User,
|
||||
};
|
||||
|
||||
export default function NotificationHeaderButton(props: Props) {
|
||||
const { unseenCount, inline = false } = props;
|
||||
const { unseenCount, inline = false, user } = props;
|
||||
const notificationsEnabled = user && user.experimental_ui;
|
||||
|
||||
if (unseenCount === 0) {
|
||||
if (unseenCount === 0 || !notificationsEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,9 @@ export default function NotificationHeaderButton(props: Props) {
|
||||
// notifications,
|
||||
// fetching,
|
||||
doSeeAllNotifications,
|
||||
// user,
|
||||
user,
|
||||
} = props;
|
||||
const notificationsEnabled = user && user.experimental_ui;
|
||||
const { push } = useHistory();
|
||||
|
||||
function handleMenuClick() {
|
||||
@@ -31,6 +32,10 @@ export default function NotificationHeaderButton(props: Props) {
|
||||
push(`/$/${PAGES.NOTIFICATIONS}`);
|
||||
}
|
||||
|
||||
if (!notificationsEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
onClick={handleMenuClick}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
import type { Node } from 'react';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React, { Fragment } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import SideNavigation from 'component/sideNavigation';
|
||||
@@ -22,6 +21,7 @@ type Props = {
|
||||
isUpgradeAvailable: boolean,
|
||||
authPage: boolean,
|
||||
filePage: boolean,
|
||||
homePage: boolean,
|
||||
noHeader: boolean,
|
||||
noFooter: boolean,
|
||||
noSideNavigation: boolean,
|
||||
|
||||
@@ -612,7 +612,7 @@ function PublishFile(props: Props) {
|
||||
{/* @if TARGET='app' */}
|
||||
{showFileUpload && (
|
||||
<FileSelector
|
||||
label={__('Video file')}
|
||||
label={__('File')}
|
||||
disabled={disabled}
|
||||
currentPath={currentFile}
|
||||
onFileChosen={handleFileChange}
|
||||
|
||||
@@ -182,9 +182,9 @@ function PublishForm(props: Props) {
|
||||
}
|
||||
} else {
|
||||
if (editingURI) {
|
||||
customSubtitle = __('Update your video/audio');
|
||||
customSubtitle = __('Update your video');
|
||||
} else {
|
||||
customSubtitle = __('Upload that unlabeled video or cassette you found behind the TV in 1991');
|
||||
customSubtitle = __('Upload that unlabeled video you found behind the TV in 1991');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +566,6 @@ function PublishForm(props: Props) {
|
||||
<Button
|
||||
key={String(modeName)}
|
||||
icon={modeName}
|
||||
iconSize={18}
|
||||
label={__(MODE_TO_I18N_STR[String(modeName)] || '---')}
|
||||
button="alt"
|
||||
onClick={() => {
|
||||
|
||||
@@ -13,6 +13,7 @@ type Props = {
|
||||
|
||||
function NameHelpText(props: Props) {
|
||||
const { uri, myClaimForUri, onEditMyClaim, isStillEditing } = props;
|
||||
|
||||
let nameHelpText;
|
||||
|
||||
if (isStillEditing) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import { SHOW_ADS, SIMPLE_SITE } from 'config';
|
||||
import { SHOW_ADS } from 'config';
|
||||
import React from 'react';
|
||||
import ClaimList from 'component/claimList';
|
||||
import ClaimListDiscover from 'component/claimListDiscover';
|
||||
@@ -95,17 +95,7 @@ export default function RecommendedContent(props: Props) {
|
||||
loading={isSearching}
|
||||
uris={reorderList(recommendedContent)}
|
||||
hideMenu={isMobile}
|
||||
injectedItem={
|
||||
SHOW_ADS && IS_WEB ? (
|
||||
SIMPLE_SITE ? (
|
||||
<Ads small type={'google'} uri={uri} />
|
||||
) : (
|
||||
!isAuthenticated && <Ads small type={'video'} />
|
||||
)
|
||||
) : (
|
||||
false
|
||||
)
|
||||
}
|
||||
injectedItem={SHOW_ADS && IS_WEB && !isAuthenticated && <Ads small type={'video'} />}
|
||||
empty={__('No related content found')}
|
||||
/>
|
||||
)}
|
||||
@@ -123,17 +113,7 @@ export default function RecommendedContent(props: Props) {
|
||||
channelIds={[signingChannel.claim_id]}
|
||||
loading={isSearching}
|
||||
hideMenu={isMobile}
|
||||
injectedItem={
|
||||
SHOW_ADS && IS_WEB ? (
|
||||
SIMPLE_SITE ? (
|
||||
<Ads small type={'google'} uri={uri} />
|
||||
) : (
|
||||
!isAuthenticated && <Ads small type={'video'} />
|
||||
)
|
||||
) : (
|
||||
false
|
||||
)
|
||||
}
|
||||
injectedItem={SHOW_ADS && IS_WEB && !isAuthenticated && <Ads small type={'video'} />}
|
||||
empty={__('No related content found')}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -20,20 +20,20 @@ import Spinner from 'component/spinner';
|
||||
type Props = {
|
||||
doToast: ({ message: string }) => void,
|
||||
doClearRepostError: () => void,
|
||||
doRepost: (StreamRepostOptions) => Promise<*>,
|
||||
doRepost: StreamRepostOptions => Promise<*>,
|
||||
title: string,
|
||||
claim?: StreamClaim,
|
||||
enteredContentClaim?: StreamClaim,
|
||||
balance: number,
|
||||
channels: ?Array<ChannelClaim>,
|
||||
doCheckPublishNameAvailability: (string) => Promise<*>,
|
||||
doCheckPublishNameAvailability: string => Promise<*>,
|
||||
error: ?string,
|
||||
reposting: boolean,
|
||||
uri: string,
|
||||
name: string,
|
||||
contentUri: string,
|
||||
setRepostUri: (string) => void,
|
||||
setContentUri: (string) => void,
|
||||
setRepostUri: string => void,
|
||||
setContentUri: string => void,
|
||||
doCheckPendingClaims: () => void,
|
||||
redirectUri?: string,
|
||||
passedRepostAmount: number,
|
||||
@@ -88,7 +88,7 @@ function RepostCreate(props: Props) {
|
||||
const repostUrlName = `lbry://${incognito || !activeChannelClaim ? '' : `${activeChannelClaim.name}/`}`;
|
||||
|
||||
const contentFirstRender = React.useRef(true);
|
||||
const setAutoRepostBid = (amount) => {
|
||||
const setAutoRepostBid = amount => {
|
||||
if (balance && balance > 0.02) {
|
||||
if (uri) {
|
||||
setRepostBid(0.01);
|
||||
@@ -113,7 +113,7 @@ function RepostCreate(props: Props) {
|
||||
const isLbryUrl = value.startsWith('lbry://') && value !== 'lbry://';
|
||||
const error = '';
|
||||
|
||||
const addLbryIfNot = (term) => {
|
||||
const addLbryIfNot = term => {
|
||||
return term.startsWith('lbry://') ? term : `lbry://${term}`;
|
||||
};
|
||||
if (wasCopiedFromWeb) {
|
||||
@@ -178,7 +178,7 @@ function RepostCreate(props: Props) {
|
||||
|
||||
React.useEffect(() => {
|
||||
if (enteredRepostName && isNameValid(enteredRepostName, false)) {
|
||||
doCheckPublishNameAvailability(enteredRepostName).then((r) => setAvailable(r));
|
||||
doCheckPublishNameAvailability(enteredRepostName).then(r => setAvailable(r));
|
||||
}
|
||||
}, [enteredRepostName, doCheckPublishNameAvailability]);
|
||||
|
||||
@@ -316,7 +316,7 @@ function RepostCreate(props: Props) {
|
||||
<div>
|
||||
{uri && (
|
||||
<fieldset-section>
|
||||
<ClaimPreview key={uri} uri={uri} actions={''} showNullPlaceholder />
|
||||
<ClaimPreview key={uri} uri={uri} actions={''} type={'inline'} showNullPlaceholder />
|
||||
</fieldset-section>
|
||||
)}
|
||||
{!uri && name && (
|
||||
@@ -327,7 +327,7 @@ function RepostCreate(props: Props) {
|
||||
name="content_url"
|
||||
value={enteredContent}
|
||||
error={contentError}
|
||||
onChange={(event) => setEnteredContentUri(event.target.value)}
|
||||
onChange={event => setEnteredContentUri(event.target.value)}
|
||||
placeholder={__('Enter a name or %domain% URL', { domain: SITE_URL })}
|
||||
/>
|
||||
</>
|
||||
@@ -359,7 +359,7 @@ function RepostCreate(props: Props) {
|
||||
type="text"
|
||||
name="repost_name"
|
||||
value={enteredRepostName}
|
||||
onChange={(event) => setEnteredRepostName(event.target.value)}
|
||||
onChange={event => setEnteredRepostName(event.target.value)}
|
||||
placeholder={__('MyFunName')}
|
||||
/>
|
||||
</fieldset-group>
|
||||
@@ -384,8 +384,8 @@ function RepostCreate(props: Props) {
|
||||
</>
|
||||
}
|
||||
disabled={!enteredRepostName || resolvingRepost}
|
||||
onChange={(event) => setRepostBid(event.target.value)}
|
||||
onWheel={(e) => e.stopPropagation()}
|
||||
onChange={event => setRepostBid(event.target.value)}
|
||||
onWheel={e => e.stopPropagation()}
|
||||
/>
|
||||
</React.Fragment>
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ function SelectAsset(props: Props) {
|
||||
}
|
||||
|
||||
// Note for translators: e.g. "Thumbnail (1:1)"
|
||||
const label = __('%image_type% %recommended_ratio%', { image_type: assetName, recommended_ratio: recommended });
|
||||
const label = `${__(assetName)} ${__(recommended)}`;
|
||||
const selectFileLabel = __('Select File');
|
||||
const selectedLabel = pathSelected ? __('URL Selected') : __('File Selected');
|
||||
|
||||
@@ -89,10 +89,7 @@ function SelectAsset(props: Props) {
|
||||
fileSelectorLabel = __('Uploading...');
|
||||
} else {
|
||||
// Include the same label/recommendation for both 'URL' and 'UPLOAD'.
|
||||
fileSelectorLabel = __('%label% • %status%', {
|
||||
label: label,
|
||||
status: fileSelected || pathSelected ? selectedLabel : selectFileLabel,
|
||||
});
|
||||
fileSelectorLabel = `${label} ${fileSelected || pathSelected ? __(selectedLabel) : __(selectFileLabel)}`;
|
||||
}
|
||||
const formBody = (
|
||||
<>
|
||||
@@ -103,7 +100,7 @@ function SelectAsset(props: Props) {
|
||||
className={classnames('button-toggle', {
|
||||
'button-toggle--active': useUrl, // disable on upload status
|
||||
})}
|
||||
label={__('Url')}
|
||||
label={__('URL')}
|
||||
onClick={() => {
|
||||
handleToggleMode(true);
|
||||
}}
|
||||
|
||||
@@ -123,7 +123,7 @@ class SelectThumbnail extends React.PureComponent<Props> {
|
||||
<FileSelector
|
||||
currentPath={thumbnailPath}
|
||||
label={__('Thumbnail')}
|
||||
placeholder={__('Thumbnails that entice a viewer to watch a video work best')}
|
||||
placeholder={__('Choose a thumbnail')}
|
||||
accept={accept}
|
||||
onFileChosen={(file) => openModal(MODALS.CONFIRM_THUMBNAIL_UPLOAD, { file })}
|
||||
/>
|
||||
|
||||
@@ -8,6 +8,7 @@ import classnames from 'classnames';
|
||||
import Icon from 'component/common/icon';
|
||||
import NotificationBubble from 'component/notificationBubble';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
import ChannelThumbnail from 'component/channelThumbnail';
|
||||
import { PINNED_LABEL_1, PINNED_URI_1, PINNED_URI_2, PINNED_LABEL_2, SIMPLE_SITE, DOMAIN } from 'config';
|
||||
// @if TARGET='app'
|
||||
import { IS_MAC } from 'component/app/view';
|
||||
@@ -212,7 +213,7 @@ function SideNavigation(props: Props) {
|
||||
});
|
||||
}
|
||||
|
||||
const notificationsEnabled = SIMPLE_SITE || (user && user.experimental_ui);
|
||||
const notificationsEnabled = user && user.experimental_ui;
|
||||
const isAuthenticated = Boolean(email);
|
||||
// SIDE LINKS: FOLLOWING, HOME, [FULL,] [EXTRA]
|
||||
let SIDE_LINKS: Array<SideNavLink> = [];
|
||||
@@ -294,7 +295,12 @@ function SideNavigation(props: Props) {
|
||||
Sign up to earn %lbc% for you and your favorite creators.
|
||||
</I18nMessage>
|
||||
</span>
|
||||
<Button button="secondary" label={__('Sign Up')} navigate={`/$/${PAGES.AUTH}?src=sidenav_nudge`} />
|
||||
<Button
|
||||
button="secondary"
|
||||
label={__('Sign Up')}
|
||||
navigate={`/$/${PAGES.AUTH}?src=sidenav_nudge`}
|
||||
disabled={user === null}
|
||||
/>{' '}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -306,11 +312,6 @@ function SideNavigation(props: Props) {
|
||||
<li className="navigation-link">
|
||||
<Button label={__('FAQ')} href="https://odysee.com/@OdyseeHelp:b" />
|
||||
</li>
|
||||
|
||||
<li className="navigation-link">
|
||||
<Button label={__('Community Guidelines')} href="https://odysee.com/@OdyseeHelp:b/Community-Guidelines:c" />
|
||||
</li>
|
||||
|
||||
<li className="navigation-link">
|
||||
<Button label={__('Support --[used in footer; general help/support]--')} href="https://lbry.com/support" />
|
||||
</li>
|
||||
@@ -367,15 +368,8 @@ function SideNavigation(props: Props) {
|
||||
|
||||
{sidebarOpen && isPersonalized && subscriptions && subscriptions.length > 0 && (
|
||||
<ul className="navigation__secondary navigation-links">
|
||||
{subscriptions.map(({ uri, channelName }, index) => (
|
||||
<li key={uri} className="navigation-link__wrapper">
|
||||
<Button
|
||||
navigate={uri}
|
||||
label={channelName}
|
||||
className="navigation-link"
|
||||
activeClass="navigation-link--active"
|
||||
/>
|
||||
</li>
|
||||
{subscriptions.map((subscription) => (
|
||||
<SubscriptionListItem key={subscription.uri} subscription={subscription} />
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
@@ -450,15 +444,8 @@ function SideNavigation(props: Props) {
|
||||
</ul>
|
||||
{sidebarOpen && isPersonalized && subscriptions && subscriptions.length > 0 && (
|
||||
<ul className="navigation__secondary navigation-links">
|
||||
{subscriptions.map(({ uri, channelName }, index) => (
|
||||
<li key={uri} className="navigation-link__wrapper">
|
||||
<Button
|
||||
navigate={uri}
|
||||
label={channelName}
|
||||
className="navigation-link"
|
||||
activeClass="navigation-link--active"
|
||||
/>
|
||||
</li>
|
||||
{subscriptions.map((subscription) => (
|
||||
<SubscriptionListItem key={subscription.uri} subscription={subscription} />
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
@@ -489,4 +476,22 @@ function SideNavigation(props: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
function SubscriptionListItem({ subscription }: { subscription: Subscription }) {
|
||||
const { uri, channelName } = subscription;
|
||||
return (
|
||||
<li className="navigation-link__wrapper">
|
||||
<Button
|
||||
navigate={uri}
|
||||
className="navigation-link navigation-link--with-thumbnail"
|
||||
activeClass="navigation-link--active"
|
||||
>
|
||||
<ChannelThumbnail uri={uri} hideStakedIndicator />
|
||||
<span dir="auto" className="button__label">
|
||||
{channelName}
|
||||
</span>
|
||||
</Button>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
export default SideNavigation;
|
||||
@@ -41,6 +41,7 @@ function SocialShare(props: Props) {
|
||||
|
||||
const { canonical_url: canonicalUrl, permanent_url: permanentUrl, name, claim_id: claimId } = claim;
|
||||
const isChannel = claim.value_type === 'channel';
|
||||
const isCollection = claim.value_type === 'collection';
|
||||
const isStream = claim.value_type === 'stream';
|
||||
const isVideo = isStream && claim.value.stream_type === 'video';
|
||||
const isAudio = isStream && claim.value.stream_type === 'audio';
|
||||
@@ -147,7 +148,7 @@ function SocialShare(props: Props) {
|
||||
title={__('Share on Facebook')}
|
||||
href={`https://facebook.com/sharer/sharer.php?u=${encodedLbryURL}`}
|
||||
/>
|
||||
{webShareable && !isChannel && (
|
||||
{webShareable && !isCollection && !isChannel && (
|
||||
<Button
|
||||
className="share"
|
||||
iconSize={24}
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from 'redux/selectors/subscriptions';
|
||||
import { makeSelectPermanentUrlForUri } from 'lbry-redux';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { selectUser } from 'redux/selectors/user';
|
||||
import SubscribeButton from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
@@ -14,6 +15,7 @@ const select = (state, props) => ({
|
||||
firstRunCompleted: selectFirstRunCompleted(state),
|
||||
permanentUrl: makeSelectPermanentUrlForUri(props.uri)(state),
|
||||
notificationsDisabled: makeSelectNotificationsDisabled(props.uri)(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
|
||||
@@ -43,6 +43,7 @@ export default function SubscribeButton(props: Props) {
|
||||
const isMobile = useIsMobile();
|
||||
let isHovering = useHover(buttonRef);
|
||||
isHovering = isMobile ? true : isHovering;
|
||||
const uiNotificationsEnabled = user && user.experimental_ui;
|
||||
|
||||
const { channelName: rawChannelName } = parseURI(uri);
|
||||
const { channelName } = parseURI(permanentUrl);
|
||||
@@ -108,7 +109,7 @@ export default function SubscribeButton(props: Props) {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{isSubscribed && (
|
||||
{isSubscribed && uiNotificationsEnabled && (
|
||||
<Button
|
||||
button="alt"
|
||||
icon={notificationsDisabled ? ICONS.BELL : ICONS.BELL_ON}
|
||||
|
||||
@@ -15,6 +15,7 @@ type Props = {
|
||||
doAddTag: (string) => void,
|
||||
onSelect?: (Tag) => void,
|
||||
hideSuggestions?: boolean,
|
||||
hideInputField?: boolean,
|
||||
suggestMature?: boolean,
|
||||
disableAutoFocus?: boolean,
|
||||
onRemove: (Tag) => void,
|
||||
@@ -49,6 +50,7 @@ export default function TagsSearch(props: Props) {
|
||||
onSelect,
|
||||
onRemove,
|
||||
hideSuggestions,
|
||||
hideInputField,
|
||||
suggestMature,
|
||||
disableAutoFocus,
|
||||
placeholder,
|
||||
@@ -189,16 +191,18 @@ export default function TagsSearch(props: Props) {
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
<FormField
|
||||
autoFocus={!disableAutoFocus}
|
||||
className="tag__input"
|
||||
onChange={onChange}
|
||||
placeholder={placeholder || __('gaming, crypto')}
|
||||
type="text"
|
||||
value={newTag}
|
||||
disabled={disabled}
|
||||
label={labelAddNew || __('Add Tags')}
|
||||
/>
|
||||
{!hideInputField && (
|
||||
<FormField
|
||||
autoFocus={!disableAutoFocus}
|
||||
className="tag__input"
|
||||
onChange={onChange}
|
||||
placeholder={placeholder || __('gaming, crypto')}
|
||||
type="text"
|
||||
value={newTag}
|
||||
disabled={disabled}
|
||||
label={labelAddNew || __('Add Tags')}
|
||||
/>
|
||||
)}
|
||||
{!hideSuggestions && (
|
||||
<section>
|
||||
<label>{labelSuggestions || (newTag.length ? __('Matching') : __('Known Tags'))}</label>
|
||||
|
||||
@@ -60,7 +60,7 @@ const ThumbnailPicker = (props: Props) => {
|
||||
onUpdate={updateThumb}
|
||||
currentValue={thumbnailParam}
|
||||
assetName={'Image'}
|
||||
recommended={'(16:9)'}
|
||||
recommended={__('(16:9)')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,7 +103,7 @@ const ThumbnailPicker = (props: Props) => {
|
||||
onUpdate={updateThumb}
|
||||
currentValue={thumbnailParam}
|
||||
assetName={'Thumbnail'}
|
||||
recommended={'(16:9)'}
|
||||
recommended={__('(16:9)')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { AUTO_FOLLOW_CHANNELS, SIMPLE_SITE } from 'config';
|
||||
type Props = {
|
||||
subscribedChannels: Array<Subscription>,
|
||||
onContinue: () => void,
|
||||
onBack: () => void,
|
||||
channelSubscribe: (sub: Subscription) => void,
|
||||
homepageData: any,
|
||||
prefsReady: boolean,
|
||||
@@ -44,25 +45,25 @@ function UserChannelFollowIntro(props: Props) {
|
||||
<Card
|
||||
title={__('Find channels to follow')}
|
||||
subtitle={__(
|
||||
'Odysee works better if you find and follow a couple creators you like. You can also block channels you never want to see.'
|
||||
'LBRY works better if you find and follow a couple creators you like. You can also block channels you never want to see.'
|
||||
)}
|
||||
actions={
|
||||
<React.Fragment>
|
||||
<div className="section__actions--between">
|
||||
<Button button="secondary" onClick={onBack} label={__('Back')} />
|
||||
<Button
|
||||
button={subscribedChannels.length < 1 ? 'alt' : 'primary'}
|
||||
onClick={onContinue}
|
||||
label={subscribedChannels.length < 1 ? __('Skip') : __('Continue')}
|
||||
/>
|
||||
</div>
|
||||
<div className="section__body">
|
||||
<ClaimListDiscover
|
||||
hideFilters
|
||||
meta={
|
||||
<Button
|
||||
button={subscribedChannels.length < 1 ? 'alt' : 'primary'}
|
||||
onClick={onContinue}
|
||||
label={subscribedChannels.length < 1 ? __('Skip') : __('Continue')}
|
||||
/>
|
||||
}
|
||||
defaultOrderBy={CS.ORDER_BY_TRENDING}
|
||||
defaultOrderBy={CS.ORDER_BY_TOP}
|
||||
defaultFreshness={CS.FRESH_ALL}
|
||||
claimIds={SIMPLE_SITE ? PRIMARY_CONTENT_CHANNEL_IDS : undefined}
|
||||
claimType={CS.CLAIM_CHANNEL}
|
||||
maxPages={3}
|
||||
claimType="channel"
|
||||
claimIds={SIMPLE_SITE ? undefined : PRIMARY_CONTENT_CHANNEL_IDS}
|
||||
defaultTags={followingCount > 3 ? CS.TAGS_FOLLOWED : undefined}
|
||||
/>
|
||||
{followingCount > 0 && (
|
||||
<Nag
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// @flow
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { useHistory } from 'react-router';
|
||||
@@ -6,6 +7,7 @@ import UserEmailNew from 'component/userEmailNew';
|
||||
import UserEmailVerify from 'component/userEmailVerify';
|
||||
import UserFirstChannel from 'component/userFirstChannel';
|
||||
import UserChannelFollowIntro from 'component/userChannelFollowIntro';
|
||||
import UserTagFollowIntro from 'component/userTagFollowIntro';
|
||||
import YoutubeSync from 'page/youtubeSync';
|
||||
import { DEFAULT_BID_FOR_FIRST_CHANNEL } from 'component/userFirstChannel/view';
|
||||
import { YOUTUBE_STATUSES } from 'lbryinc';
|
||||
@@ -40,6 +42,7 @@ type Props = {
|
||||
creatingChannel: boolean,
|
||||
setClientSetting: (string, boolean, ?boolean) => void,
|
||||
followingAcknowledged: boolean,
|
||||
tagsAcknowledged: boolean,
|
||||
rewardsAcknowledged: boolean,
|
||||
interestedInYoutubeSync: boolean,
|
||||
doToggleInterestedInYoutubeSync: () => void,
|
||||
@@ -64,6 +67,7 @@ function UserSignUp(props: Props) {
|
||||
fetchingChannels,
|
||||
creatingChannel,
|
||||
followingAcknowledged,
|
||||
tagsAcknowledged,
|
||||
rewardsAcknowledged,
|
||||
setClientSetting,
|
||||
interestedInYoutubeSync,
|
||||
@@ -114,7 +118,8 @@ function UserSignUp(props: Props) {
|
||||
interestedInYoutubeSync);
|
||||
const showYoutubeTransfer = hasVerifiedEmail && hasYoutubeChannels && !isYoutubeTransferComplete;
|
||||
const showFollowIntro = step === 'channels' || (hasVerifiedEmail && !followingAcknowledged);
|
||||
const canHijackSignInFlowWithSpinner = hasVerifiedEmail && !showFollowIntro && !rewardsAcknowledged;
|
||||
const showTagsIntro = step === 'tags' || (hasVerifiedEmail && !tagsAcknowledged);
|
||||
const canHijackSignInFlowWithSpinner = hasVerifiedEmail && !showFollowIntro && !showTagsIntro && !rewardsAcknowledged;
|
||||
const isCurrentlyFetchingSomething = fetchingChannels || claimingReward || syncingWallet || creatingChannel;
|
||||
const isWaitingForSomethingToFinish =
|
||||
// If the user has claimed the email award, we need to wait until the balance updates sometime in the future
|
||||
@@ -201,6 +206,22 @@ function UserSignUp(props: Props) {
|
||||
}}
|
||||
/>
|
||||
),
|
||||
showTagsIntro && (
|
||||
<UserTagFollowIntro
|
||||
onContinue={() => {
|
||||
let url = `/$/${PAGES.AUTH}?reset_scroll=1&${STEP_PARAM}=channels`;
|
||||
if (redirect) {
|
||||
url += `&${REDIRECT_PARAM}=${redirect}`;
|
||||
}
|
||||
if (shouldRedirectImmediately) {
|
||||
url += `&${REDIRECT_IMMEDIATELY_PARAM}=true`;
|
||||
}
|
||||
|
||||
replace(url);
|
||||
setSettingAndSync(SETTINGS.TAGS_ACKNOWLEDGED, true);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
showYoutubeTransfer && (
|
||||
<div>
|
||||
<YoutubeTransferStatus /> <Confetti recycle={false} style={{ position: 'fixed' }} />
|
||||
|
||||
@@ -12,7 +12,7 @@ import LbcSymbol from 'component/common/lbc-symbol';
|
||||
type Props = {
|
||||
errorMessage: ?string,
|
||||
isPending: boolean,
|
||||
verifyUserIdentity: (string) => void,
|
||||
verifyUserIdentity: string => void,
|
||||
verifyPhone: () => void,
|
||||
fetchUser: () => void,
|
||||
skipLink?: string,
|
||||
@@ -60,7 +60,7 @@ class UserVerify extends React.PureComponent<Props> {
|
||||
SITE_NAME,
|
||||
}}
|
||||
>
|
||||
Verified accounts are eligible to earn LBRY Credits for views, watching and reposting videos, sharing
|
||||
Verified accounts are eligible to earn LBRY Credits for views, watching and reposting content, sharing
|
||||
invite links etc. Verifying also helps us keep the %SITE_NAME% community safe too! %Refresh% or %Skip%.
|
||||
</I18nMessage>
|
||||
</p>
|
||||
@@ -73,7 +73,9 @@ class UserVerify extends React.PureComponent<Props> {
|
||||
<Card
|
||||
icon={ICONS.PHONE}
|
||||
title={__('Verify phone number')}
|
||||
subtitle={__('You will receive an SMS text message confirming your phone number is valid.')}
|
||||
subtitle={__(
|
||||
'You will receive an SMS text message confirming your phone number is valid. Does not work for Canada and possibly other regions.'
|
||||
)}
|
||||
actions={
|
||||
<Fragment>
|
||||
<Button
|
||||
|
||||
@@ -52,14 +52,14 @@ type Props = {
|
||||
adUrl: ?string,
|
||||
};
|
||||
|
||||
// type VideoJSOptions = {
|
||||
// controls: boolean,
|
||||
// preload: string,
|
||||
// playbackRates: Array<number>,
|
||||
// responsive: boolean,
|
||||
// poster: ?string,
|
||||
// muted: ?boolean,
|
||||
// };
|
||||
type VideoJSOptions = {
|
||||
controls: boolean,
|
||||
preload: string,
|
||||
playbackRates: Array<number>,
|
||||
responsive: boolean,
|
||||
poster?: string,
|
||||
muted?: boolean,
|
||||
};
|
||||
|
||||
const videoPlaybackRates = [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 1.75, 2];
|
||||
|
||||
@@ -68,7 +68,7 @@ const IS_IOS =
|
||||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
|
||||
!window.MSStream;
|
||||
|
||||
const VIDEO_JS_OPTIONS = {
|
||||
const VIDEO_JS_OPTIONS: VideoJSOptions = {
|
||||
preload: 'auto',
|
||||
playbackRates: videoPlaybackRates,
|
||||
responsive: true,
|
||||
@@ -564,6 +564,12 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||
// note: the poster prop seems to return null usually.
|
||||
if (poster) player.poster(poster);
|
||||
|
||||
// Update player source
|
||||
player.src({
|
||||
src: finalSource,
|
||||
type: type,
|
||||
});
|
||||
|
||||
// set playsinline for mobile
|
||||
player.children_[0].setAttribute('playsinline', '');
|
||||
|
||||
|
||||
@@ -114,12 +114,12 @@ function VideoViewer(props: Props) {
|
||||
const {
|
||||
location: { pathname },
|
||||
} = useHistory();
|
||||
const previousUri = usePrevious(uri);
|
||||
const embedded = useContext(EmbedContext);
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const [showAutoplayCountdown, setShowAutoplayCountdown] = useState(false);
|
||||
const [isEndededEmbed, setIsEndededEmbed] = useState(false);
|
||||
const vjsCallbackDataRef: any = React.useRef();
|
||||
const previousUri = usePrevious(uri);
|
||||
const embedded = useContext(EmbedContext);
|
||||
const approvedVideo = Boolean(channelClaimId) && adApprovedChannelIds.includes(channelClaimId);
|
||||
const adsEnabled = ENABLE_PREROLL_ADS && !authenticated && !embedded && approvedVideo;
|
||||
const [adUrl, setAdUrl, isFetchingAd] = useGetAds(approvedVideo, adsEnabled);
|
||||
|
||||
@@ -21,9 +21,7 @@ export default function WebUploadList(props: Props) {
|
||||
!!uploadCount && (
|
||||
<Card
|
||||
title={__('Currently uploading')}
|
||||
subtitle={
|
||||
uploadCount > 1 ? __('You videos are currently uploading.') : __('Your video is currently uploading.')
|
||||
}
|
||||
subtitle={uploadCount > 1 ? __('You files are currently uploading.') : __('Your file is currently uploading.')}
|
||||
body={
|
||||
<section>
|
||||
{/* $FlowFixMe */}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { doOpenModal } from 'redux/actions/app';
|
||||
import Wunderbar from './view';
|
||||
|
||||
const perform = (dispatch, ownProps) => ({
|
||||
doOpenMobileSearch: () => dispatch(doOpenModal(MODALS.MOBILE_SEARCH)),
|
||||
doOpenMobileSearch: (props) => dispatch(doOpenModal(MODALS.MOBILE_SEARCH, props)),
|
||||
});
|
||||
|
||||
export default connect(null, perform)(Wunderbar);
|
||||
@@ -6,16 +6,25 @@ import { useIsMobile } from 'effects/use-screensize';
|
||||
import WunderbarSuggestions from 'component/wunderbarSuggestions';
|
||||
|
||||
type Props = {
|
||||
doOpenMobileSearch: () => void,
|
||||
doOpenMobileSearch: (any) => void,
|
||||
channelsOnly?: boolean,
|
||||
noTopSuggestion?: boolean,
|
||||
noBottomLinks?: boolean,
|
||||
customSelectAction?: (string) => void,
|
||||
};
|
||||
|
||||
export default function WunderBar(props: Props) {
|
||||
const { doOpenMobileSearch } = props;
|
||||
const { doOpenMobileSearch, channelsOnly, noTopSuggestion, noBottomLinks, customSelectAction } = props;
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
return isMobile ? (
|
||||
<Button icon={ICONS.SEARCH} className="wunderbar__mobile-search" onClick={() => doOpenMobileSearch()} />
|
||||
<Button icon={ICONS.SEARCH} className="wunderbar__mobile-search" onClick={() => doOpenMobileSearch({ ...props })} />
|
||||
) : (
|
||||
<WunderbarSuggestions />
|
||||
<WunderbarSuggestions
|
||||
channelsOnly={channelsOnly}
|
||||
noTopSuggestion={noTopSuggestion}
|
||||
noBottomLinks={noBottomLinks}
|
||||
customSelectAction={customSelectAction}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import { useHistory } from 'react-router';
|
||||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import useThrottle from 'effects/use-throttle';
|
||||
import Yrbl from 'component/yrbl';
|
||||
import { SEARCH_OPTIONS } from 'constants/search';
|
||||
|
||||
const LBRY_PROTOCOL = 'lbry://';
|
||||
const WEB_DEV_PREFIX = `${URL_DEV}/`;
|
||||
@@ -39,14 +40,28 @@ type Props = {
|
||||
showMature: boolean,
|
||||
isMobile: boolean,
|
||||
doCloseMobileSearch: () => void,
|
||||
channelsOnly?: boolean,
|
||||
noTopSuggestion?: boolean,
|
||||
noBottomLinks?: boolean,
|
||||
customSelectAction?: (string) => void,
|
||||
};
|
||||
|
||||
export default function WunderBarSuggestions(props: Props) {
|
||||
const { navigateToSearchPage, doShowSnackBar, doResolveUris, showMature, isMobile, doCloseMobileSearch } = props;
|
||||
const {
|
||||
navigateToSearchPage,
|
||||
doShowSnackBar,
|
||||
doResolveUris,
|
||||
showMature,
|
||||
isMobile,
|
||||
doCloseMobileSearch,
|
||||
channelsOnly,
|
||||
noTopSuggestion,
|
||||
noBottomLinks,
|
||||
customSelectAction,
|
||||
} = props;
|
||||
const inputRef: ElementRef<any> = React.useRef();
|
||||
const isFocused = inputRef && inputRef.current && inputRef.current === document.activeElement;
|
||||
|
||||
const THROTTLE_MS = 1000;
|
||||
const {
|
||||
push,
|
||||
location: { search },
|
||||
@@ -54,9 +69,12 @@ export default function WunderBarSuggestions(props: Props) {
|
||||
const urlParams = new URLSearchParams(search);
|
||||
const queryFromUrl = urlParams.get('q') || '';
|
||||
const [term, setTerm] = React.useState(queryFromUrl);
|
||||
const throttledTerm = useThrottle(term, THROTTLE_MS) || '';
|
||||
const throttledTerm = useThrottle(term, 500) || '';
|
||||
const searchSize = isMobile ? 20 : 5;
|
||||
const { results, loading } = useLighthouse(throttledTerm, showMature, searchSize);
|
||||
const additionalOptions = channelsOnly
|
||||
? { isBackgroundSearch: false, [SEARCH_OPTIONS.CLAIM_TYPE]: SEARCH_OPTIONS.INCLUDE_CHANNELS }
|
||||
: {};
|
||||
const { results, loading } = useLighthouse(throttledTerm, showMature, searchSize, additionalOptions);
|
||||
const noResults = throttledTerm && !loading && results && results.length === 0;
|
||||
const nameFromQuery = throttledTerm.trim().replace(/\s+/g, '').replace(/:/g, '#');
|
||||
const uriFromQuery = `lbry://${nameFromQuery}`;
|
||||
@@ -92,6 +110,12 @@ export default function WunderBarSuggestions(props: Props) {
|
||||
inputRef.current.blur();
|
||||
}
|
||||
|
||||
if (customSelectAction) {
|
||||
// Give them full results, as our resolved one might truncate the claimId.
|
||||
customSelectAction(results ? results.find((r) => r.startsWith(value)) : '');
|
||||
return;
|
||||
}
|
||||
|
||||
if (wasCopiedFromWeb) {
|
||||
const prefix = webDomainList[webDomainIndex];
|
||||
let query = value.slice(prefix.length).replace(/:/g, '#');
|
||||
@@ -267,24 +291,26 @@ export default function WunderBarSuggestions(props: Props) {
|
||||
className={classnames('wunderbar__suggestions', { 'wunderbar__suggestions--mobile': isMobile })}
|
||||
>
|
||||
<ComboboxList>
|
||||
{uriFromQueryIsValid ? <WunderbarTopSuggestion query={nameFromQuery} /> : null}
|
||||
{uriFromQueryIsValid && !noTopSuggestion ? <WunderbarTopSuggestion query={nameFromQuery} /> : null}
|
||||
|
||||
<div className="wunderbar__label">{__('Search Results')}</div>
|
||||
{results.slice(0, isMobile ? 20 : 5).map((uri) => (
|
||||
<WunderbarSuggestion key={uri} uri={uri} />
|
||||
))}
|
||||
|
||||
<div className="wunderbar__bottom-links">
|
||||
<ComboboxOption value={term} className="wunderbar__more-results">
|
||||
<Button button="link" label={__('View All Results')} />
|
||||
</ComboboxOption>
|
||||
<ComboboxOption value={`${TAG_SEARCH_PREFIX}${term}`} className="wunderbar__more-results">
|
||||
<Button className="wunderbar__tag-search" button="link">
|
||||
Explore
|
||||
<div className="tag">{term.split(' ').join('')}</div>
|
||||
</Button>
|
||||
</ComboboxOption>
|
||||
</div>
|
||||
{!noBottomLinks && (
|
||||
<div className="wunderbar__bottom-links">
|
||||
<ComboboxOption value={term} className="wunderbar__more-results">
|
||||
<Button button="link" label={__('View All Results')} />
|
||||
</ComboboxOption>
|
||||
<ComboboxOption value={`${TAG_SEARCH_PREFIX}${term}`} className="wunderbar__more-results">
|
||||
<Button className="wunderbar__tag-search" button="link">
|
||||
{__('Explore')}
|
||||
<div className="tag">{term.split(' ').join('')}</div>
|
||||
</Button>
|
||||
</ComboboxOption>
|
||||
</div>
|
||||
)}
|
||||
</ComboboxList>
|
||||
</ComboboxPopover>
|
||||
)}
|
||||
|
||||
@@ -118,7 +118,9 @@ export default function YoutubeTransferStatus(props: Props) {
|
||||
{isNotElligible && (
|
||||
<I18nMessage
|
||||
tokens={{
|
||||
here: <Button button="link" href="https://lbry.com/faq/youtube" label={__('here')} />,
|
||||
here: (
|
||||
<Button button="link" href="https://lbry.com/faq/youtube" label={__('here')} />
|
||||
),
|
||||
email: SITE_HELP_EMAIL,
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -278,6 +278,12 @@ export const COMMENT_MODERATION_BLOCK_FAILED = 'COMMENT_MODERATION_BLOCK_FAILED'
|
||||
export const COMMENT_MODERATION_UN_BLOCK_STARTED = 'COMMENT_MODERATION_UN_BLOCK_STARTED';
|
||||
export const COMMENT_MODERATION_UN_BLOCK_COMPLETE = 'COMMENT_MODERATION_UN_BLOCK_COMPLETE';
|
||||
export const COMMENT_MODERATION_UN_BLOCK_FAILED = 'COMMENT_MODERATION_UN_BLOCK_FAILED';
|
||||
export const COMMENT_FETCH_MODERATION_DELEGATES_STARTED = 'COMMENT_FETCH_MODERATION_DELEGATES_STARTED';
|
||||
export const COMMENT_FETCH_MODERATION_DELEGATES_FAILED = 'COMMENT_FETCH_MODERATION_DELEGATES_FAILED';
|
||||
export const COMMENT_FETCH_MODERATION_DELEGATES_COMPLETED = 'COMMENT_FETCH_MODERATION_DELEGATES_COMPLETED';
|
||||
export const COMMENT_MODERATION_AM_I_LIST_STARTED = 'COMMENT_MODERATION_AM_I_LIST_STARTED';
|
||||
export const COMMENT_MODERATION_AM_I_LIST_FAILED = 'COMMENT_MODERATION_AM_I_LIST_FAILED';
|
||||
export const COMMENT_MODERATION_AM_I_LIST_COMPLETED = 'COMMENT_MODERATION_AM_I_LIST_COMPLETED';
|
||||
export const COMMENT_FETCH_SETTINGS_STARTED = 'COMMENT_FETCH_SETTINGS_STARTED';
|
||||
export const COMMENT_FETCH_SETTINGS_FAILED = 'COMMENT_FETCH_SETTINGS_FAILED';
|
||||
export const COMMENT_FETCH_SETTINGS_COMPLETED = 'COMMENT_FETCH_SETTINGS_COMPLETED';
|
||||
@@ -339,3 +345,4 @@ export const REPORT_CONTENT_FAILED = 'REPORT_CONTENT_FAILED';
|
||||
export const FETCH_NO_SOURCE_CLAIMS_STARTED = 'FETCH_NO_SOURCE_CLAIMS_STARTED';
|
||||
export const FETCH_NO_SOURCE_CLAIMS_COMPLETED = 'FETCH_NO_SOURCE_CLAIMS_COMPLETED';
|
||||
export const FETCH_NO_SOURCE_CLAIMS_FAILED = 'FETCH_NO_SOURCE_CLAIMS_FAILED';
|
||||
export const VIEWERS_RECEIVED = 'VIEWERS_RECEIVED';
|
||||
+5
-18
@@ -4,21 +4,8 @@ export const SORT_COMMENTS_NEW = 'new';
|
||||
export const SORT_COMMENTS_BEST = 'best';
|
||||
export const SORT_COMMENTS_CONTROVERSIAL = 'controversial';
|
||||
|
||||
export const BANNED_LIVESTREAM_WORDS = [
|
||||
'n1gga',
|
||||
'f4ggot',
|
||||
'faggot',
|
||||
'nigga',
|
||||
'nigger',
|
||||
'F4G',
|
||||
'fag',
|
||||
'n1gger',
|
||||
'faget',
|
||||
'niggah',
|
||||
'n1ggah',
|
||||
'jew',
|
||||
'j3w',
|
||||
'goy',
|
||||
'goyim',
|
||||
'fagot',
|
||||
];
|
||||
export const BLOCK_LEVEL = {
|
||||
SELF: 'self',
|
||||
MODERATOR: 'moderator',
|
||||
ADMIN: 'admin',
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
export const FF_MAX_CHARS_DEFAULT = 2000;
|
||||
export const FF_MAX_CHARS_IN_COMMENT = 2000;
|
||||
export const FF_MAX_CHARS_IN_LIVESTREAM_COMMENT = 300;
|
||||
export const FF_MAX_CHARS_IN_LIVESTREAM_COMMENT = 500;
|
||||
export const FF_MAX_CHARS_IN_DESCRIPTION = 5000;
|
||||
export const FF_MAX_CHARS_REPORT_CONTENT_DETAILS = 500;
|
||||
export const FF_MAX_CHARS_REPORT_CONTENT_ADDRESS = 255;
|
||||
|
||||
@@ -160,3 +160,4 @@ export const LIVESTREAM_SOLID = 'LivestreamSolid';
|
||||
export const LIVESTREAM_MONOCHROME = 'LivestreamMono';
|
||||
export const STACK = 'stack';
|
||||
export const TIME = 'time';
|
||||
export const GLOBE = 'globe';
|
||||
@@ -1,3 +1,3 @@
|
||||
export const BITWAVE_EMBED_URL = 'https://bitwave.tv/odysee';
|
||||
export const BITWAVE_LIVE_API = 'https://api.live.odysee.com/v1/odysee/live';
|
||||
export const BITWAVE_LIVE_API = 'https://api.bitwave.tv/v1/odysee/live';
|
||||
export const BITWAVE_REPLAY_API = 'https://api.bitwave.tv/v1/replays/odysee';
|
||||
@@ -5,12 +5,16 @@ import { getSearchQueryString } from 'util/query-params';
|
||||
import { isURIValid } from 'lbry-redux';
|
||||
import useThrottle from './use-throttle';
|
||||
|
||||
export default function useLighthouse(query: string, showMature?: boolean, size?: number = 5) {
|
||||
const THROTTLE_MS = 1000;
|
||||
export default function useLighthouse(
|
||||
query: string,
|
||||
showMature?: boolean,
|
||||
size?: number = 5,
|
||||
additionalOptions: any = {}
|
||||
) {
|
||||
const [results, setResults] = React.useState();
|
||||
const [loading, setLoading] = React.useState();
|
||||
const queryString = query ? getSearchQueryString(query, { nsfw: showMature, size }) : '';
|
||||
const throttledQuery = useThrottle(queryString, THROTTLE_MS);
|
||||
const queryString = query ? getSearchQueryString(query, { nsfw: showMature, size, ...additionalOptions }) : '';
|
||||
const throttledQuery = useThrottle(queryString, 500);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (throttledQuery) {
|
||||
|
||||
@@ -5,14 +5,24 @@ import WunderbarSuggestions from 'component/wunderbarSuggestions';
|
||||
|
||||
type Props = {
|
||||
closeModal: () => void,
|
||||
channelsOnly?: boolean,
|
||||
noTopSuggestion?: boolean,
|
||||
noBottomLinks?: boolean,
|
||||
customSelectAction?: (string) => void,
|
||||
};
|
||||
|
||||
export default function ModalMobileSearch(props: Props) {
|
||||
const { closeModal } = props;
|
||||
const { closeModal, channelsOnly, noTopSuggestion, noBottomLinks, customSelectAction } = props;
|
||||
|
||||
return (
|
||||
<Modal onAborted={closeModal} isOpen type="card">
|
||||
<WunderbarSuggestions isMobile />
|
||||
<WunderbarSuggestions
|
||||
isMobile
|
||||
channelsOnly={channelsOnly}
|
||||
noTopSuggestion={noTopSuggestion}
|
||||
noBottomLinks={noBottomLinks}
|
||||
customSelectAction={customSelectAction}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
@@ -44,9 +44,8 @@ class ModalPublishSuccess extends React.PureComponent<Props> {
|
||||
'Your livestream is now pending. You will be able to start shortly at the streaming dashboard.'
|
||||
);
|
||||
} else {
|
||||
publishMessage = __('Your video will appear on Odysee shortly.');
|
||||
publishMessage = __('Your file is now pending on LBRY. It will take a few minutes to appear for other users.');
|
||||
}
|
||||
clearPublish();
|
||||
|
||||
function handleClose() {
|
||||
closeModal();
|
||||
@@ -55,7 +54,7 @@ class ModalPublishSuccess extends React.PureComponent<Props> {
|
||||
return (
|
||||
<Modal isOpen type="card" contentLabel={__(contentLabel)} onAborted={handleClose}>
|
||||
<Card
|
||||
title={livestream ? __('Livestream Created') : __('Upload Complete')}
|
||||
title={__('Success')}
|
||||
subtitle={publishMessage}
|
||||
body={
|
||||
<React.Fragment>
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
selectMyChannelClaims,
|
||||
makeSelectClaimIsStreamPlaceholder,
|
||||
SETTINGS,
|
||||
doClearPublish,
|
||||
} from 'lbry-redux';
|
||||
import { selectFfmpegStatus, makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import { doPublishDesktop } from 'redux/actions/publish';
|
||||
@@ -33,7 +32,6 @@ const select = (state, props) => {
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
publish: (filePath, preview) => dispatch(doPublishDesktop(filePath, preview)),
|
||||
clearPublish: () => dispatch(doClearPublish()),
|
||||
closeModal: () => dispatch(doHideModal()),
|
||||
setEnablePublishPreview: (value) => dispatch(doSetClientSetting(SETTINGS.ENABLE_PUBLISH_PREVIEW, value)),
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@ function ModalRemoveCollection(props: Props) {
|
||||
const [confirmName, setConfirmName] = useState('');
|
||||
|
||||
return (
|
||||
<Modal isOpen contentLabel={__('Confirm Collection Unpublish')} type="card" onAborted={closeModal}>
|
||||
<Modal isOpen contentLabel={__('Confirm List Unpublish')} type="card" onAborted={closeModal}>
|
||||
<Card
|
||||
title={__('Delete List')}
|
||||
body={
|
||||
@@ -36,7 +36,7 @@ function ModalRemoveCollection(props: Props) {
|
||||
</React.Fragment>
|
||||
) : (
|
||||
<I18nMessage tokens={{ title: <cite>{uri && title ? `"${title}"` : `"${collectionName}"`}</cite> }}>
|
||||
Are you sure you'd like to remove collection %title%?
|
||||
Are you sure you'd like to remove "%title%"?
|
||||
</I18nMessage>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -52,8 +52,10 @@ function ModalRemoveFile(props: Props) {
|
||||
<FormField
|
||||
name="claim_abandon"
|
||||
label={
|
||||
<I18nMessage tokens={{ lbc: <LbcSymbol postfix={claim.amount} /> }}>
|
||||
Abandon on blockchain (reclaim %lbc%)
|
||||
<I18nMessage
|
||||
tokens={{ lbc: <LbcSymbol prefix={__('reclaim %amount%', { amount: claim.amount })} /> }}
|
||||
>
|
||||
Abandon on blockchain (%lbc%)
|
||||
</I18nMessage>
|
||||
}
|
||||
type="checkbox"
|
||||
|
||||
@@ -12,7 +12,7 @@ class ModalTransactionFailed extends React.PureComponent<Props> {
|
||||
|
||||
return (
|
||||
<Modal isOpen contentLabel={__('Transaction failed')} title={__('Transaction failed')} onConfirmed={closeModal}>
|
||||
<p>{__('Sorry about that. Contact help@odysee.com if you continue to have issues.')}</p>
|
||||
<p>{__('Sorry about that. Contact help@lbry.com if you continue to have issues.')}</p>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
import { SIMPLE_SITE } from 'config';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import React from 'react';
|
||||
import { Modal } from 'modal/modal';
|
||||
@@ -16,27 +15,18 @@ const YoutubeWelcome = (props: Props) => {
|
||||
<Modal isOpen type="card" onAborted={doHideModal}>
|
||||
<Confetti recycle={false} style={{ position: 'fixed' }} numberOfPieces={100} />
|
||||
<Card
|
||||
title={!SIMPLE_SITE ? __("You're free!") : __('Welcome to Odysee')}
|
||||
title={__("You're free!")}
|
||||
subtitle={
|
||||
!SIMPLE_SITE ? (
|
||||
<React.Fragment>
|
||||
<p>
|
||||
{__("You've escaped the land of spying, censorship, and exploitation.")}
|
||||
<span className="emoji"> 💩</span>
|
||||
</p>
|
||||
<p>
|
||||
{__('Welcome to the land of content freedom.')}
|
||||
<span className="emoji"> 🌈</span>
|
||||
</p>
|
||||
</React.Fragment>
|
||||
) : (
|
||||
<React.Fragment>
|
||||
<p>
|
||||
{__('You make the party extra special!')}
|
||||
<span className="emoji"> 💖</span>
|
||||
</p>
|
||||
</React.Fragment>
|
||||
)
|
||||
<React.Fragment>
|
||||
<p>
|
||||
{__("You've escaped the land of spying, censorship, and exploitation.")}
|
||||
<span className="emoji"> 💩</span>
|
||||
</p>
|
||||
<p>
|
||||
{__('Welcome to the land of content freedom.')}
|
||||
<span className="emoji"> 🌈</span>
|
||||
</p>
|
||||
</React.Fragment>
|
||||
}
|
||||
actions={
|
||||
<div className="card__actions">
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri, doResolveUri } from 'lbry-redux';
|
||||
import AdsTestPage from './view';
|
||||
|
||||
export default connect(
|
||||
(state) => ({
|
||||
claim: makeSelectClaimForUri('lbry://fullscreenrelease#7')(state),
|
||||
}),
|
||||
{
|
||||
doResolveUri,
|
||||
}
|
||||
)(AdsTestPage);
|
||||
@@ -1,20 +0,0 @@
|
||||
// @flow
|
||||
// import React from 'react';
|
||||
// import FilePage from 'page/file';
|
||||
|
||||
type Props = {
|
||||
doResolveUri: (string) => void,
|
||||
claim: ?StreamClaim,
|
||||
};
|
||||
|
||||
export default function AdsTestPage(props: Props) {
|
||||
return null;
|
||||
// const { doResolveUri, claim } = props;
|
||||
// const hasClaim = claim !== undefined;
|
||||
// React.useEffect(() => {
|
||||
// if (!hasClaim) {
|
||||
// doResolveUri('lbry://fullscreenrelease#7');
|
||||
// }
|
||||
// }, [hasClaim, doResolveUri]);
|
||||
// return <div>{hasClaim && <FilePage uri="lbry://fullscreenrelease#7" />}</div>;
|
||||
}
|
||||
@@ -22,7 +22,6 @@ const MOONPAY_KEY = process.env.MOONPAY_SECRET_KEY;
|
||||
const COUNTRIES = Array.from(
|
||||
new Set(
|
||||
countryData.all
|
||||
.filter((country) => country.status !== 'deleted')
|
||||
.map((country) => country.name)
|
||||
.sort((a, b) => {
|
||||
if (a > b) {
|
||||
|
||||
@@ -5,18 +5,20 @@ import {
|
||||
doFetchChannelListMine,
|
||||
selectFetchingMyChannels,
|
||||
} from 'lbry-redux';
|
||||
import { doSetActiveChannel } from 'redux/actions/app';
|
||||
import { selectYoutubeChannels } from 'redux/selectors/user';
|
||||
import ChannelsPage from './view';
|
||||
|
||||
const select = state => ({
|
||||
const select = (state) => ({
|
||||
channelUrls: selectMyChannelUrls(state),
|
||||
channels: selectMyChannelClaims(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
youtubeChannels: selectYoutubeChannels(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
const perform = (dispatch) => ({
|
||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||
doSetActiveChannel: (claimId) => dispatch(doSetActiveChannel(claimId)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ChannelsPage);
|
||||
Loaded 100 of 150 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user