commit
dec5ddd5b8
7 changed files with 69 additions and 37 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Channel subscribe button on search page ([#2146](https://github.com/lbryio/lbry-desktop/pull/2146))
|
||||||
|
* Close modal after redeeming reward code ([#2146](https://github.com/lbryio/lbry-desktop/pull/2146))
|
||||||
|
* Update Electron to prevent segfault on Ubuntu@18.10 ([#2146](https://github.com/lbryio/lbry-desktop/pull/2146))
|
||||||
|
* Show reward code modal when all rewards are claimed ([#2146](https://github.com/lbryio/lbry-desktop/pull/2146))
|
||||||
|
|
||||||
|
|
||||||
|
## [0.26.0] - 2018-12-12
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
* Redemption of custom reward codes via Rewards page ([#1935](https://github.com/lbryio/lbry-desktop/pull/1935))
|
* Redemption of custom reward codes via Rewards page ([#1935](https://github.com/lbryio/lbry-desktop/pull/1935))
|
||||||
* Ability to manage email preferences from Help page ([#1929](https://github.com/lbryio/lbry-desktop/pull/1929))
|
* Ability to manage email preferences from Help page ([#1929](https://github.com/lbryio/lbry-desktop/pull/1929))
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
"decompress": "^4.2.0",
|
"decompress": "^4.2.0",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"electron": "^2.0.6",
|
"electron": "^2.0.14",
|
||||||
"electron-builder": "^20.22.0",
|
"electron-builder": "^20.22.0",
|
||||||
"electron-devtools-installer": "^2.2.3",
|
"electron-devtools-installer": "^2.2.3",
|
||||||
"electron-publisher-s3": "^20.8.1",
|
"electron-publisher-s3": "^20.8.1",
|
||||||
|
|
|
@ -42,7 +42,7 @@ class ChannelTile extends React.PureComponent<Props> {
|
||||||
let subscriptionUri;
|
let subscriptionUri;
|
||||||
if (claim) {
|
if (claim) {
|
||||||
channelName = claim.name;
|
channelName = claim.name;
|
||||||
subscriptionUri = claim.permanent_url;
|
subscriptionUri = `lbry://${claim.permanent_url}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClick = () => navigate('/show', { uri });
|
const onClick = () => navigate('/show', { uri });
|
||||||
|
|
|
@ -15,6 +15,7 @@ import {
|
||||||
doDaemonReady,
|
doDaemonReady,
|
||||||
doAutoUpdate,
|
doAutoUpdate,
|
||||||
doOpenModal,
|
doOpenModal,
|
||||||
|
doHideModal,
|
||||||
} from 'redux/actions/app';
|
} from 'redux/actions/app';
|
||||||
import { doToast, doBlackListedOutpointsSubscribe, isURIValid } from 'lbry-redux';
|
import { doToast, doBlackListedOutpointsSubscribe, isURIValid } from 'lbry-redux';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
|
@ -88,6 +89,10 @@ rewards.setCallback('rewardApprovalRequired', () => {
|
||||||
app.store.dispatch(doOpenModal(MODALS.REWARD_APPROVAL_REQUIRED));
|
app.store.dispatch(doOpenModal(MODALS.REWARD_APPROVAL_REQUIRED));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rewards.setCallback('claimRewardSuccess', () => {
|
||||||
|
app.store.dispatch(doHideModal(MODALS.REWARD_APPROVAL_REQUIRED));
|
||||||
|
});
|
||||||
|
|
||||||
ipcRenderer.on('open-uri-requested', (event, uri, newSession) => {
|
ipcRenderer.on('open-uri-requested', (event, uri, newSession) => {
|
||||||
if (uri && uri.startsWith('lbry://')) {
|
if (uri && uri.startsWith('lbry://')) {
|
||||||
if (uri.startsWith('lbry://?verify=')) {
|
if (uri.startsWith('lbry://?verify=')) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React, { PureComponent, Fragment } from 'react';
|
||||||
import BusyIndicator from 'component/common/busy-indicator';
|
import BusyIndicator from 'component/common/busy-indicator';
|
||||||
import RewardListClaimed from 'component/rewardListClaimed';
|
import RewardListClaimed from 'component/rewardListClaimed';
|
||||||
import RewardTile from 'component/rewardTile';
|
import RewardTile from 'component/rewardTile';
|
||||||
|
@ -26,7 +26,7 @@ type Props = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
class RewardsPage extends React.PureComponent<Props> {
|
class RewardsPage extends PureComponent<Props> {
|
||||||
renderPageHeader() {
|
renderPageHeader() {
|
||||||
const { doAuth, navigate, user, daemonSettings } = this.props;
|
const { doAuth, navigate, user, daemonSettings } = this.props;
|
||||||
|
|
||||||
|
@ -76,6 +76,21 @@ class RewardsPage extends React.PureComponent<Props> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderCustomRewardCode() {
|
||||||
|
return (
|
||||||
|
<RewardTile
|
||||||
|
key={REWARD_TYPES.TYPE_GENERATED_CODE}
|
||||||
|
reward={{
|
||||||
|
reward_type: REWARD_TYPES.TYPE_GENERATED_CODE,
|
||||||
|
reward_title: __('Custom Code'),
|
||||||
|
reward_description: __(
|
||||||
|
'Are you a supermodel or rockstar that received a custom reward code? Claim it here.'
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
renderUnclaimedRewards() {
|
renderUnclaimedRewards() {
|
||||||
const { fetching, rewards, user, daemonSettings, navigate, claimed } = this.props;
|
const { fetching, rewards, user, daemonSettings, navigate, claimed } = this.props;
|
||||||
|
|
||||||
|
@ -108,13 +123,20 @@ class RewardsPage extends React.PureComponent<Props> {
|
||||||
);
|
);
|
||||||
} else if (!rewards || rewards.length <= 0) {
|
} else if (!rewards || rewards.length <= 0) {
|
||||||
return (
|
return (
|
||||||
<div className="card__content">
|
<Fragment>
|
||||||
{claimed && claimed.length
|
<div className="card--section">
|
||||||
? __(
|
<h2 className="card__title">{__('No Rewards Available')}</h2>
|
||||||
"You have claimed all available rewards! We're regularly adding more so be sure to check back later."
|
<p>
|
||||||
)
|
{claimed && claimed.length
|
||||||
: __('There are no rewards available at this time, please check back later.')}
|
? __(
|
||||||
</div>
|
"You have claimed all available rewards! We're regularly adding more so be sure to check back later."
|
||||||
|
)
|
||||||
|
: __('There are no rewards available at this time, please check back later.')}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="card__content card__list--rewards">{this.renderCustomRewardCode()}</div>
|
||||||
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,17 +148,10 @@ class RewardsPage extends React.PureComponent<Props> {
|
||||||
'card--disabled': isNotEligible,
|
'card--disabled': isNotEligible,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{rewards.map(reward => <RewardTile key={reward.reward_type} reward={reward} />)}
|
{rewards.map(reward => (
|
||||||
<RewardTile
|
<RewardTile key={reward.reward_type} reward={reward} />
|
||||||
key={REWARD_TYPES.TYPE_GENERATED_CODE}
|
))}
|
||||||
reward={{
|
{this.renderCustomRewardCode()}
|
||||||
reward_type: REWARD_TYPES.TYPE_GENERATED_CODE,
|
|
||||||
reward_title: __('Custom Code'),
|
|
||||||
reward_description: __(
|
|
||||||
'Are you a supermodel or rockstar that received a custom reward code? Claim it here.'
|
|
||||||
),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,18 +43,17 @@ export default (props: Props) => {
|
||||||
<Button button="primary" label={__('Explore')} onClick={doShowSuggestedSubs} />
|
<Button button="primary" label={__('Explore')} onClick={doShowSuggestedSubs} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{showSuggested &&
|
{showSuggested && numberOfSubscriptions > 0 && (
|
||||||
numberOfSubscriptions > 0 && (
|
<div className="card__actions">
|
||||||
<div className="card__actions">
|
<Button
|
||||||
<Button
|
button="primary"
|
||||||
button="primary"
|
onClick={onFinish}
|
||||||
onClick={onFinish}
|
label={`${__('View your')} ${numberOfSubscriptions} ${
|
||||||
label={`${__('View your')} ${numberOfSubscriptions} ${
|
numberOfSubscriptions > 1 ? __('subscribed channels') : __('subscribed channel')
|
||||||
numberOfSubscriptions > 1 ? __('subcriptions') : __('subscription')
|
}`}
|
||||||
}`}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{showSuggested && !loadingSuggested && <SuggestedSubscriptions />}
|
{showSuggested && !loadingSuggested && <SuggestedSubscriptions />}
|
||||||
|
|
|
@ -3185,9 +3185,9 @@ electron-window-state@^4.1.1:
|
||||||
jsonfile "^2.2.3"
|
jsonfile "^2.2.3"
|
||||||
mkdirp "^0.5.1"
|
mkdirp "^0.5.1"
|
||||||
|
|
||||||
electron@^2.0.6:
|
electron@^2.0.14:
|
||||||
version "2.0.6"
|
version "2.0.14"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.6.tgz#8e5c1bd2ebc08fa7a6ee906de3753c1ece9d7300"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.14.tgz#fad6766645e7c0cd10b4ae822d3167959735a870"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "^8.0.24"
|
"@types/node" "^8.0.24"
|
||||||
electron-download "^3.0.1"
|
electron-download "^3.0.1"
|
||||||
|
|
Loading…
Add table
Reference in a new issue