Compare commits

..
25 changed files with 640 additions and 5136 deletions

No files matched your search

+4
View File
@@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Disk space setting under Data Hosting ([#7266](https://github.com/lbryio/lbry-desktop/pull/7266))
- Paginated 'All Playlists' page ([#7268](https://github.com/lbryio/lbry-desktop/pull/7268))
- Expanded playlist ordering tools ([#7305](https://github.com/lbryio/lbry-desktop/pull/7305))
- Support for macOS arm64
### Changed
- Changing the supported language from Filipino to Tagalog _community pr!_ ([#6951](https://github.com/lbryio/lbry-desktop/pull/6951))
@@ -33,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Upgraded Electron to v11.5.0 ([#7276](https://github.com/lbryio/lbry-desktop/pull/7276))
- Cleaner Discover page filters ([#7306](https://github.com/lbryio/lbry-desktop/pull/7306))
- Scroll bar styling ([#7314](https://github.com/lbryio/lbry-desktop/pull/7314))
- Remove pages for obsolete features like invites, rewards, swap ([#7330](https://github.com/lbryio/lbry-desktop/pull/7330))
### Fixed
- Clicking on the title of a floating player will take you back to the list ([#6921](https://github.com/lbryio/lbry-desktop/pull/6921))
@@ -43,6 +45,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fixed “Your Account” popup on mobile ([#7172](https://github.com/lbryio/lbry-desktop/pull/7172))
- Fix disable-support for comments ([#7245](https://github.com/lbryio/lbry-desktop/pull/7245))
- Fix Electron taking over .html files on linux ([#7291](https://github.com/lbryio/lbry-desktop/pull/7291))
- Fix floating player play/pause on drag _community pr!_ ([#7339](https://github.com/lbryio/lbry-desktop/pull/7339))
- Fix card dropdown menus triggering menu actions _community pr!_ ([#7335](https://github.com/lbryio/lbry-desktop/pull/7335))
## [0.51.2] - [2021-08-20]
+11 -7
View File
@@ -20,11 +20,6 @@
"to": "static/daemon/",
"filter": ["**/*"]
},
{
"from": "./static/lbry-first/",
"to": "static/lbry-first/",
"filter": ["**/*"]
},
{
"from": "./static/img",
"to": "static/img",
@@ -42,7 +37,16 @@
}
],
"mac": {
"category": "public.app-category.entertainment"
"category": "public.app-category.entertainment",
"target": [
{
"target": "default",
"arch": [
"x64",
"arm64"
]
}
],
},
"dmg": {
"iconSize": 128,
@@ -64,7 +68,7 @@
"width": 500,
"height": 300
},
"background": "./build/background.png"
"background": "./build/background.png",
},
"protocols": [
{
+6 -9
View File
@@ -1,6 +1,6 @@
{
"name": "lbry",
"version": "0.52.0-rc.7",
"version": "0.52.0-rc.8.3",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"keywords": [
"lbry"
@@ -49,7 +49,7 @@
"electron-dl": "^3.2.0",
"electron-log": "^2.2.12",
"electron-notarize": "^1.0.0",
"electron-updater": "^4.2.4",
"electron-updater": "^4.6.5",
"express": "^4.17.1",
"humanize-duration": "^3.27.0",
"if-env": "^1.0.4",
@@ -58,14 +58,11 @@
"proxy-polyfill": "0.1.6",
"re-reselect": "^4.0.0",
"react-datetime-picker": "^3.2.1",
"react-plastic": "^1.1.1",
"react-top-loading-bar": "^2.0.1",
"remove-markdown": "^0.3.0",
"rss": "^1.2.2",
"source-map-explorer": "^2.5.2",
"tempy": "^0.6.0",
"videojs-contrib-ads": "^6.9.0",
"videojs-ima": "^1.11.0",
"videojs-logo": "^2.1.4"
},
"devDependencies": {
@@ -109,7 +106,7 @@
"codemirror": "^5.39.2",
"concurrently": "^4.1.2",
"connected-react-router": "^6.8.0",
"copy-webpack-plugin": "^5.1.2",
"copy-webpack-plugin": "^6.4.1",
"copyfiles": "^2.4.1",
"country-data": "^0.0.31",
"cross-env": "^7.0.3",
@@ -125,7 +122,7 @@
"dotenv-defaults": "^2.0.1",
"dotenv-webpack": "^1.8.0",
"electron": "11.5.0",
"electron-builder": "^22.9.1",
"electron-builder": "^22.14.5",
"electron-devtools-installer": "^3.1.1",
"electron-is-dev": "^0.3.0",
"electron-webpack": "^2.8.2",
@@ -208,7 +205,7 @@
"stream-to-blob-url": "^2.1.1",
"strip-markdown": "^3.0.3",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.2.3",
"terser-webpack-plugin": "^4.2.3",
"three": "^0.125.0",
"three-full": "^17.1.0",
"tiny-relative-date": "^1.3.0",
@@ -221,7 +218,7 @@
"videojs-event-tracking": "^1.0.1",
"villain-react": "^1.0.9",
"wavesurfer.js": "^2.2.1",
"webpack": "^4.28.4",
"webpack": "^4.44.2",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-cli": "^3.3.10",
"webpack-config-utils": "^2.3.1",
+3
View File
@@ -2222,5 +2222,8 @@
"Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.": "Your wallet is not currently using a cloud sync service. You are in control of backing up your wallet.",
"Sending": "Sending",
"You sent %lbc%": "You sent %lbc%",
"Buy LBC": "Buy LBC",
"This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)": "This is information like error logging, performance tracking, and usage statistics. It includes your IP address and basic system details, but no other identifying information (unless you connect to a cloud service)",
"Use official LBRY wallet servers": "Use official LBRY wallet servers",
"--end--": "--end--"
}
File renamed without changes.
File renamed without changes.
+19
View File
@@ -265,15 +265,34 @@ function ClaimMenuList(props: Props) {
push(`/$/${PAGES.REPORT_CONTENT}?claimId=${contentClaim && contentClaim.claim_id}`);
}
// changes MenuButton behavior to show/hide MenuList not on press but on click event
let isEventSimulated = false;
const menuButtonHandler = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
e.type = 'click';
}
if (!isEventSimulated && e.type === 'mousedown') {
e.preventDefault();
} else if (e.type === 'click') {
isEventSimulated = true;
e.target.dispatchEvent(new MouseEvent('mousedown', { bubbles: true }));
isEventSimulated = false;
}
};
const shouldShow = !IS_WEB || (IS_WEB && isAuthenticated);
return (
<Menu>
<MenuButton
className={classnames('menu__button', { 'claim__menu-button': !inline, 'claim__menu-button--inline': inline })}
onMouseDown={menuButtonHandler}
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
menuButtonHandler(e);
}}
onKeyDown={menuButtonHandler}
>
<Icon size={20} icon={ICONS.MORE_VERTICAL} />
</MenuButton>
+2
View File
@@ -11,6 +11,7 @@ import { doSignOut, doOpenModal } from 'redux/actions/app';
import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings';
import { selectHasNavigated, selectActiveChannelClaim } from 'redux/selectors/app';
import Header from './view';
import { selectMyChannelClaims } from 'redux/selectors/claims';
const select = (state) => ({
language: selectLanguage(state),
@@ -27,6 +28,7 @@ const select = (state) => ({
hasNavigated: selectHasNavigated(state),
user: selectUser(state),
activeChannelClaim: selectActiveChannelClaim(state),
myChannels: selectMyChannelClaims(state),
});
const perform = (dispatch) => ({
+9 -13
View File
@@ -63,6 +63,7 @@ type Props = {
isAbsoluteSideNavHidden: boolean,
hideCancel: boolean,
activeChannelClaim: ?ChannelClaim,
myChannels: ?Array<ChannelClaim>,
};
const Header = (props: Props) => {
@@ -91,6 +92,7 @@ const Header = (props: Props) => {
hideCancel,
user,
activeChannelClaim,
myChannels,
} = props;
const isMobile = useIsMobile();
// on the verify page don't let anyone escape other than by closing the tab to keep session data consistent
@@ -102,6 +104,7 @@ const Header = (props: Props) => {
const { backLabel, backNavDefault, title: backTitle, simpleTitle: simpleBackTitle } = backout || {};
const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui);
const activeChannelUrl = activeChannelClaim && activeChannelClaim.permanent_url;
const hasChannels = myChannels && myChannels.length > 0;
// Sign out if they click the "x" when they are on the password prompt
const authHeaderAction = syncError ? { onClick: signOut } : { navigate: '/' };
@@ -323,19 +326,12 @@ const Header = (props: Props) => {
<Icon aria-hidden icon={ICONS.CHANNEL} />
{__('Channels')}
</MenuItem>
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.CREATOR_DASHBOARD}`)}>
<Icon aria-hidden icon={ICONS.ANALYTICS} />
{__('Creator Analytics')}
</MenuItem>
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.REWARDS}`)}>
<Icon aria-hidden icon={ICONS.REWARDS} />
{__('Rewards')}
</MenuItem>
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.INVITE}`)}>
<Icon aria-hidden icon={ICONS.INVITE} />
{__('Invites')}
</MenuItem>
{hasChannels && (
<MenuItem className="menu__link" onSelect={() => history.push(`/$/${PAGES.CREATOR_DASHBOARD}`)}>
<Icon aria-hidden icon={ICONS.ANALYTICS} />
{__('Creator Analytics')}
</MenuItem>
)}
{authenticated ? (
<MenuItem onSelect={IS_WEB ? signOut : openSignOutModal}>
<div className="menu__link">
+2 -2
View File
@@ -6,7 +6,7 @@ import {
selectUserInviteReferralLink,
selectUserInviteReferralCode,
} from 'redux/selectors/user';
import { doUserInviteNew } from 'redux/actions/user';
// import { doUserInviteNew } from 'redux/actions/user';
import { selectMyChannelClaims, selectFetchingMyChannels } from 'redux/selectors/claims';
import { doFetchChannelListMine } from 'redux/actions/claims';
import InviteNew from './view';
@@ -22,7 +22,7 @@ const select = (state) => ({
});
const perform = (dispatch) => ({
inviteNew: (email) => dispatch(doUserInviteNew(email)),
// inviteNew: (email) => dispatch(doUserInviteNew(email)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
});
-15
View File
@@ -1,5 +1,4 @@
// @flow
import * as PAGES from 'constants/pages';
import * as ICONS from 'constants/icons';
import { RULE } from 'constants/notifications';
import React from 'react';
@@ -49,14 +48,6 @@ export default function Notification(props: Props) {
let notificationTarget;
switch (notification_rule) {
case RULE.DAILY_WATCH_AVAILABLE:
case RULE.DAILY_WATCH_REMIND:
notificationTarget = `/$/${PAGES.CHANNELS_FOLLOWING}`;
break;
case RULE.MISSED_OUT:
case RULE.REWARDS_APPROVAL_PROMPT:
notificationTarget = `/$/${PAGES.REWARDS_VERIFY}?redirect=/$/${PAGES.REWARDS}`;
break;
default:
notificationTarget = notification_parameters.device.target;
}
@@ -87,12 +78,6 @@ export default function Notification(props: Props) {
channelUrl = notification_parameters.dynamic.channel_url;
icon = creatorIcon(channelUrl);
break;
case RULE.DAILY_WATCH_AVAILABLE:
case RULE.DAILY_WATCH_REMIND:
case RULE.MISSED_OUT:
case RULE.REWARDS_APPROVAL_PROMPT:
icon = <Icon icon={ICONS.LBC} sectionIcon />;
break;
case RULE.FIAT_TIP:
icon = <Icon icon={ICONS.FINANCE} sectionIcon />;
break;
+2 -12
View File
@@ -6,7 +6,7 @@ import * as PAGES from 'constants/pages';
import { PAGE_TITLE } from 'constants/pageTitles';
import { LINKED_COMMENT_QUERY_PARAM } from 'constants/comment';
import { parseURI, isURIValid } from 'util/lbryURI';
import { SITE_TITLE, WELCOME_VERSION } from 'config';
import { WELCOME_VERSION } from 'config';
import { GetLinksData } from 'util/buildHomepage';
import HomePage from 'page/home';
@@ -38,8 +38,6 @@ import DiscoverPage from 'page/discover';
import FileListPublished from 'page/fileListPublished';
import FourOhFourPage from 'page/fourOhFour';
import HelpPage from 'page/help';
import InvitePage from 'page/invite';
import InvitedPage from 'page/invited';
import LibraryPage from 'page/library';
import ListBlockedPage from 'page/listBlocked';
import ListsPage from 'page/lists';
@@ -51,8 +49,6 @@ import PublishPage from 'page/publish';
import ReportContentPage from 'page/reportContent';
import ReportPage from 'page/report';
import RepostNew from 'page/repost';
import RewardsPage from 'page/rewards';
import RewardsVerifyPage from 'page/rewardsVerify';
import SearchPage from 'page/search';
import SettingsCreatorPage from 'page/settingsCreator';
@@ -66,7 +62,6 @@ import TagsFollowingPage from 'page/tagsFollowing';
import TopPage from 'page/top';
import UpdatePasswordPage from 'page/passwordUpdate';
import Welcome from 'page/welcome';
import YoutubeSyncPage from 'page/youtubeSync';
// Tell the browser we are handling scroll restoration
if ('scrollRestoration' in history) {
@@ -174,7 +169,7 @@ function AppRouter(props: Props) {
if (process.env.NODE_ENV !== 'production') {
return uri || pathname || title;
}
return __(title) || (IS_WEB ? SITE_TITLE : 'LBRY');
return __(title) || 'LBRY';
};
if (uri) {
@@ -259,11 +254,9 @@ function AppRouter(props: Props) {
<Route path={`/$/${PAGES.SEARCH}`} exact component={SearchPage} />
<Route path={`/$/${PAGES.TOP}`} exact component={TopPage} />
<Route path={`/$/${PAGES.SETTINGS}`} exact component={SettingsPage} />
<Route path={`/$/${PAGES.INVITE}/:referrer`} exact component={InvitedPage} />
<Route path={`/$/${PAGES.REPORT_CONTENT}`} exact component={ReportContentPage} />
<Route {...props} path={`/$/${PAGES.LIST}/:collectionId`} component={CollectionPage} />
<PrivateRoute {...props} exact path={`/$/${PAGES.YOUTUBE_SYNC}`} component={YoutubeSyncPage} />
<PrivateRoute {...props} exact path={`/$/${PAGES.TAGS_FOLLOWING}`} component={TagsFollowingPage} />
<PrivateRoute
{...props}
@@ -279,15 +272,12 @@ function AppRouter(props: Props) {
path={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
component={ChannelsFollowingDiscoverPage}
/>
<PrivateRoute {...props} path={`/$/${PAGES.INVITE}`} component={InvitePage} />
<PrivateRoute {...props} path={`/$/${PAGES.CHANNEL_NEW}`} component={ChannelNew} />
<PrivateRoute {...props} path={`/$/${PAGES.REPOST_NEW}`} component={RepostNew} />
<PrivateRoute {...props} path={`/$/${PAGES.UPLOADS}`} component={FileListPublished} />
<PrivateRoute {...props} path={`/$/${PAGES.CREATOR_DASHBOARD}`} component={CreatorDashboard} />
<PrivateRoute {...props} path={`/$/${PAGES.UPLOAD}`} component={PublishPage} />
<PrivateRoute {...props} path={`/$/${PAGES.REPORT}`} component={ReportPage} />
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS}`} exact component={RewardsPage} />
<PrivateRoute {...props} path={`/$/${PAGES.REWARDS_VERIFY}`} component={RewardsVerifyPage} />
<PrivateRoute {...props} path={`/$/${PAGES.LIBRARY}`} component={LibraryPage} />
<PrivateRoute {...props} path={`/$/${PAGES.LISTS}`} component={ListsPage} />
<PrivateRoute {...props} path={`/$/${PAGES.PLAYLISTS}`} component={PlaylistsPage} />
-48
View File
@@ -6,18 +6,11 @@ import classnames from 'classnames';
import { useHistory } from 'react-router';
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';
import REWARDS from 'rewards';
import UserVerify from 'component/userVerify';
import Spinner from 'component/spinner';
import YoutubeTransferStatus from 'component/youtubeTransferStatus';
import useFetched from 'effects/use-fetched';
import Confetti from 'react-confetti';
import usePrevious from 'effects/use-previous';
import { SHOW_TAGS_INTRO } from 'config';
@@ -56,12 +49,10 @@ function UserSignUp(props: Props) {
user,
claimingReward,
claimedRewards,
channels,
claimConfirmEmailReward,
claimNewUserReward,
balance,
fetchUser,
youtubeChannels,
syncEnabled,
syncingWallet,
hasSynced,
@@ -85,21 +76,10 @@ function UserSignUp(props: Props) {
const shouldRedirectImmediately = urlParams.get(REDIRECT_IMMEDIATELY_PARAM);
const [initialSignInStep, setInitialSignInStep] = React.useState();
const hasVerifiedEmail = user && user.has_verified_email;
const rewardsApproved = user && user.is_reward_approved;
const isIdentityVerified = user && user.is_identity_verified;
const passwordSet = user && user.password_set;
const hasFetchedReward = useFetched(claimingReward);
const previousHasVerifiedEmail = usePrevious(hasVerifiedEmail);
const channelCount = channels ? channels.length : 0;
const hasClaimedEmailAward = claimedRewards.some((reward) => reward.reward_type === REWARDS.TYPE_CONFIRM_EMAIL);
const hasYoutubeChannels = youtubeChannels && Boolean(youtubeChannels.length);
const isYoutubeTransferComplete =
hasYoutubeChannels &&
youtubeChannels.every(
(channel) =>
channel.transfer_state === YOUTUBE_STATUSES.COMPLETED_TRANSFER ||
channel.sync_status === YOUTUBE_STATUSES.YOUTUBE_SYNC_ABANDONDED
);
// Complexity warning
// We can't just check if we are currently fetching something
// We may want to keep a component rendered while something is being fetched, instead of replacing it with the large spinner
@@ -108,16 +88,6 @@ function UserSignUp(props: Props) {
// The possible screens for the sign in flow
const showEmail = !hasVerifiedEmail;
const showEmailVerification = (emailToVerify && !hasVerifiedEmail) || (!hasVerifiedEmail && passwordSet);
const showUserVerification = hasVerifiedEmail && !rewardsApproved && !isIdentityVerified && !rewardsAcknowledged;
const showChannelCreation =
hasVerifiedEmail &&
((balance !== undefined &&
balance !== null &&
balance > DEFAULT_BID_FOR_FIRST_CHANNEL &&
channelCount === 0 &&
!hasYoutubeChannels) ||
interestedInYoutubeSync);
const showYoutubeTransfer = hasVerifiedEmail && hasYoutubeChannels && !isYoutubeTransferComplete;
const showFollowIntro = step === 'channels' || (hasVerifiedEmail && !followingAcknowledged);
const showTagsIntro = SHOW_TAGS_INTRO && (step === 'tags' || (hasVerifiedEmail && !tagsAcknowledged));
const canHijackSignInFlowWithSpinner = hasVerifiedEmail && !showFollowIntro && !showTagsIntro && !rewardsAcknowledged;
@@ -170,19 +140,6 @@ function UserSignUp(props: Props) {
/>
),
showEmailVerification && <UserEmailVerify />,
showUserVerification && (
<UserVerify
onSkip={() => {
setSettingAndSync(SETTINGS.REWARDS_ACKNOWLEDGED, true);
}}
/>
),
showChannelCreation &&
(interestedInYoutubeSync ? (
<YoutubeSync inSignUpFlow doToggleInterestedInYoutubeSync={doToggleInterestedInYoutubeSync} />
) : (
<UserFirstChannel doToggleInterestedInYoutubeSync={doToggleInterestedInYoutubeSync} />
)),
showFollowIntro && (
<UserChannelFollowIntro
onContinue={() => {
@@ -223,11 +180,6 @@ function UserSignUp(props: Props) {
}}
/>
),
showYoutubeTransfer && (
<div>
<YoutubeTransferStatus /> <Confetti recycle={false} style={{ position: 'fixed' }} />
</div>
),
showLoadingSpinner && (
<div className="main--empty">
<Spinner />
@@ -1,130 +0,0 @@
// Created by xander on 6/21/2021
import videojs from 'video.js';
import 'videojs-contrib-ads';
import 'videojs-ima';
const VERSION = '0.0.1';
/* Macro provided by aniview
* const macroUrl =
`https://vast.aniview.com/api/adserver61/vast/` +
`?AV_PUBLISHERID=60afcbc58cfdb065440d2426` +
`&AV_CHANNELID=60b354389c7adb506d0bd9a4` +
`&AV_URL=[URL_MACRO]` +
`&cb=[TIMESTAMP_MACRO]` +
`&AV_WIDTH=[WIDTH_MACRO]` +
`&AV_HEIGHT=[HEIGHT_MACRO]` +
`&AV_SCHAIN=[SCHAIN_MACRO]` +
`&AV_CCPA=[CCPA_MACRO]` +
`&AV_GDPR=[GDPR_MACRO]` +
`&AV_CONSENT=[CONSENT_MACRO]` +
`&skip=true` +
`&skiptimer=5` +
`&logo=false` +
`&usevslot=true` +
`&vastretry=3` +
`&hidecontrols=false`;
* */
// TEST PRE-ROLL WITH THIS TAG:
// https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpreonly&cmsid=496&vid=short_onecue&correlator=
// Modified to work with IMA
const macroUrl =
`https://vast.aniview.com/api/adserver61/vast/` +
`?AV_PUBLISHERID=60afcbc58cfdb065440d2426` +
`&AV_CHANNELID=60b354389c7adb506d0bd9a4` +
`&AV_URL=[URL]` +
`&cb=[CACHEBUSTING]` +
`&AV_WIDTH=[WIDTH]` +
`&AV_HEIGHT=[HEIGHT]` +
// `&AV_SCHAIN=[SCHAIN_MACRO]` +
// `&AV_CCPA=[CCPA_MACRO]` +
// `&AV_GDPR=[GDPR_MACRO]` +
// `&AV_CONSENT=[CONSENT_MACRO]` +
`&skip=true` +
`&skiptimer=5` +
`&logo=true` +
`&usevslot=true` +
`&vastretry=5` +
`&hidecontrols=false`;
const defaults = {
adTagUrl: macroUrl,
debug: false,
};
const Component = videojs.getComponent('Component');
const registerPlugin = videojs.registerPlugin || videojs.plugin;
class AniviewPlugin extends Component {
constructor(player, options) {
super(player, options);
// Plugin started
if (options.debug) this.log(`Created aniview plugin.`);
// To help with debugging, we'll add a global vjs object with the video js player
window.aniview = player;
this.player = player;
// request ads whenever there's new video content
/* player.on('contentchanged', () => {
// in a real plugin, you might fetch your ad inventory here
player.trigger('adsready');
}); */
// Plugin event listeners
// player.on('readyforpreroll', (event) => this.onReadyForPreroll(event));
}
/* onReadyForPreroll(event) {
// send event when ad is playing to remove loading spinner
this.player.one('adplaying', () => {
this.player.trigger('ads-ad-started');
});
// resume content when all your linear ads have finished
this.player.one('adended', () => {
this.player.ads.endLinearAdMode();
});
} */
log(...args) {
if (this.options_.debug) {
console.log(`Aniview Debug:`, JSON.stringify(args));
}
}
}
videojs.registerComponent('aniview', AniviewPlugin);
const onPlayerReady = (player, options) => {
player.aniview = new AniviewPlugin(player, options);
};
/**
* Initialize the plugin.
*
* @function plugin
* @param {Object} [options={}]
*/
const plugin = function (options) {
const google = window.google;
this.ima({
// $FlowFixMe
vpaidMode: google.ima.ImaSdkSettings.VpaidMode.INSECURE,
adTagUrl: macroUrl,
});
this.ready(() => {
onPlayerReady(this, videojs.mergeOptions(defaults, options));
});
};
plugin.VERSION = VERSION;
registerPlugin('aniview', plugin);
export default plugin;
-4
View File
@@ -1,8 +1,4 @@
// @flow
/*
This component is not used at this time.
*/
import React from 'react';
import Button from 'component/button';
import { FormField, Form } from 'component/common/form';
+1 -2
View File
@@ -38,8 +38,7 @@ export default function YrblHelp(props: Props) {
}
actions={
<div className="section__actions">
<Button button="primary" icon={ICONS.REWARDS} label={__('Earn Rewards')} navigate={`/$/${PAGES.REWARDS}`} />
<Button button="secondary" icon={ICONS.BUY} label={'Buy/Swap Credits'} navigate={`/$/${PAGES.BUY}`} />
<Button button="secondary" icon={ICONS.BUY} label={'Buy Credits'} navigate={`/$/${PAGES.BUY}`} />
{includeWalletLink && (
<Button
icon={ICONS.RECEIVE}
+1 -1
View File
@@ -98,7 +98,7 @@ export default function BuyPage(props: Props) {
className="main--swap"
backout={{
backoutLabel: __('Done'),
title: <LbcSymbol prefix={__('Buy')} size={28} />,
title: <LbcSymbol prefix={__('Buy LBC')} size={28} />,
}}
>
<div className="section">
+2 -2
View File
@@ -15,7 +15,7 @@ import ChannelContent from 'component/channelContent';
import ChannelAbout from 'component/channelAbout';
import ChannelDiscussion from 'component/channelDiscussion';
import ChannelThumbnail from 'component/channelThumbnail';
import ChannelEdit from 'component/channelEdit';
import ChannelForm from 'component/channelForm';
import classnames from 'classnames';
import HelpLink from 'component/common/help-link';
import ClaimSupportButton from 'component/claimSupportButton';
@@ -202,7 +202,7 @@ function ChannelPage(props: Props) {
simpleTitle: __('Editing'),
}}
>
<ChannelEdit uri={uri} onDone={() => goBack()} />
<ChannelForm uri={uri} onDone={() => goBack()} />
</Page>
);
}
+2 -2
View File
@@ -1,7 +1,7 @@
// @flow
import * as PAGES from 'constants/pages';
import React from 'react';
import ChannelEdit from 'component/channelEdit';
import ChannelForm from 'component/channelForm';
import Page from 'component/page';
import { useHistory } from 'react-router';
import YrblWalletEmpty from 'component/yrblWalletEmpty';
@@ -29,7 +29,7 @@ function ChannelNew(props: Props) {
<Page noSideNavigation noFooter backout={{ title: __('Create a channel'), backLabel: __('Cancel') }}>
{emptyBalance && <YrblWalletEmpty />}
<ChannelEdit
<ChannelForm
disabled={emptyBalance}
onDone={() => {
push(redirectUrl || `/$/${PAGES.CHANNELS}`);
+2 -2
View File
@@ -5,7 +5,7 @@ import {
selectUserInviteStatusIsPending,
selectUserVerifiedEmail,
} from 'redux/selectors/user';
import { doFetchInviteStatus } from 'redux/actions/user';
// import { doFetchInviteStatus } from 'redux/actions/user';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import { doSetClientSetting } from 'redux/actions/settings';
import InvitePage from './view';
@@ -18,7 +18,7 @@ const select = (state) => ({
});
const perform = (dispatch) => ({
fetchInviteStatus: () => dispatch(doFetchInviteStatus()),
// fetchInviteStatus: () => dispatch(doFetchInviteStatus()),
acknowledgeInivte: () => dispatch(doSetClientSetting(SETTINGS.INVITE_ACKNOWLEDGED, true)),
});
+1 -4
View File
@@ -4,7 +4,7 @@ import { doToast } from 'redux/actions/notifications';
import * as ACTIONS from 'constants/action_types';
import { selectUnclaimedRewards } from 'redux/selectors/rewards';
import { selectUserIsRewardApproved } from 'redux/selectors/user';
import { doFetchInviteStatus } from 'redux/actions/user';
// import { doFetchInviteStatus } from 'redux/actions/user';
import rewards from 'rewards';
export function doRewardList() {
@@ -88,8 +88,6 @@ export function doClaimRewardType(rewardType, options = {}) {
});
if (successReward.reward_type === rewards.TYPE_NEW_USER && rewards.callbacks.claimFirstRewardSuccess) {
rewards.callbacks.claimFirstRewardSuccess();
} else if (successReward.reward_type === rewards.TYPE_REFERRAL) {
dispatch(doFetchInviteStatus());
}
dispatch(doRewardList());
@@ -125,7 +123,6 @@ export function doClaimRewardType(rewardType, options = {}) {
export function doClaimInitialRewards() {
return (dispatch) => {
dispatch(doClaimRewardType(rewards.TYPE_NEW_USER));
dispatch(doClaimRewardType(rewards.TYPE_CONFIRM_EMAIL));
};
}
-33
View File
@@ -7,7 +7,6 @@ import { batchActions } from 'util/batch-actions';
import * as ACTIONS from 'constants/action_types';
import { doClaimRewardType, doRewardList } from 'redux/actions/rewards';
import { selectEmailToVerify, selectPhoneToVerify, selectUserCountryCode, selectUser } from 'redux/selectors/user';
import { doToast } from 'redux/actions/notifications';
import rewards from 'rewards';
import { Lbryio } from 'lbryinc';
import { DOMAIN } from 'config';
@@ -156,7 +155,6 @@ export function doAuthenticate(
if (shareUsageData) {
dispatch(doRewardList());
dispatch(doFetchInviteStatus(false));
if (callInstall) {
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData, domain);
}
@@ -642,37 +640,6 @@ export function doUserIdentityVerify(stripeToken) {
};
}
export function doUserInviteNew(email) {
return (dispatch) => {
dispatch({
type: ACTIONS.USER_INVITE_NEW_STARTED,
});
return Lbryio.call('user', 'invite', { email }, 'post')
.then((success) => {
dispatch({
type: ACTIONS.USER_INVITE_NEW_SUCCESS,
data: { email },
});
dispatch(
doToast({
message: __('Invite sent to %email_address%', { email_address: email }),
})
);
dispatch(doFetchInviteStatus());
return success;
})
.catch((error) => {
dispatch({
type: ACTIONS.USER_INVITE_NEW_FAILURE,
data: { error },
});
});
};
}
export function doUserSetReferrerReset() {
return (dispatch) => {
dispatch({
+4
View File
@@ -4,6 +4,10 @@
top: var(--spacing-s);
}
.content__viewer--disable-click {
pointer-events: none;
}
.content__viewer--inline {
max-height: var(--inline-player-max-height);
border: none;
+19 -19
View File
@@ -42,25 +42,25 @@ let mainConfig = {
],
},
plugins: [
new CopyWebpackPlugin([
{
from: `${STATIC_ROOT}/`,
to: `${DIST_ROOT}/electron/static/`,
ignore: ['index-web.html', 'index-electron.html', 'daemon/**/*', 'lbry-first/**/*'],
},
{
from: `${STATIC_ROOT}/index-electron.html`,
to: `${DIST_ROOT}/electron/static/index.html`,
},
{
from: `${STATIC_ROOT}/daemon`,
to: `${DIST_ROOT}/electron/daemon`,
},
{
from: `${STATIC_ROOT}/lbry-first`,
to: `${DIST_ROOT}/electron/lbry-first`,
},
]),
new CopyWebpackPlugin({
patterns: [
{
from: `${STATIC_ROOT}/`,
to: `${DIST_ROOT}/electron/static/`,
globOptions: {
ignore: ['index-web.html', 'index-electron.html', 'daemon/**/*'],
},
},
{
from: `${STATIC_ROOT}/index-electron.html`,
to: `${DIST_ROOT}/electron/static/index.html`,
},
{
from: `${STATIC_ROOT}/daemon`,
to: `${DIST_ROOT}/electron/daemon`,
},
],
}),
],
};
+550 -4831
View File
File diff suppressed because it is too large. Load diff