Update test 3 #7636
2 changed files with 13 additions and 6 deletions
|
@ -7,6 +7,7 @@ import { selectUnclaimedRewards } from 'redux/selectors/rewards';
|
||||||
import { doFetchChannelListMine, doFetchCollectionListMine, doResolveUris } from 'redux/actions/claims';
|
import { doFetchChannelListMine, doFetchCollectionListMine, doResolveUris } from 'redux/actions/claims';
|
||||||
import { selectMyChannelUrls, selectMyChannelClaimIds } from 'redux/selectors/claims';
|
import { selectMyChannelUrls, selectMyChannelClaimIds } from 'redux/selectors/claims';
|
||||||
import * as SETTINGS from 'constants/settings';
|
import * as SETTINGS from 'constants/settings';
|
||||||
|
import * as MODALS from 'constants/modal_types';
|
||||||
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
||||||
import {
|
import {
|
||||||
makeSelectClientSetting,
|
makeSelectClientSetting,
|
||||||
|
@ -24,7 +25,7 @@ import {
|
||||||
import { doGetWalletSyncPreference, doSetLanguage } from 'redux/actions/settings';
|
import { doGetWalletSyncPreference, doSetLanguage } from 'redux/actions/settings';
|
||||||
import { doSyncLoop } from 'redux/actions/sync';
|
import { doSyncLoop } from 'redux/actions/sync';
|
||||||
import {
|
import {
|
||||||
doDownloadUpgradeRequested,
|
doOpenModal,
|
||||||
doSignIn,
|
doSignIn,
|
||||||
doGetAndPopulatePreferences,
|
doGetAndPopulatePreferences,
|
||||||
doSetActiveChannel,
|
doSetActiveChannel,
|
||||||
|
@ -60,7 +61,7 @@ const perform = (dispatch) => ({
|
||||||
fetchCollectionListMine: () => dispatch(doFetchCollectionListMine()),
|
fetchCollectionListMine: () => dispatch(doFetchCollectionListMine()),
|
||||||
setLanguage: (language) => dispatch(doSetLanguage(language)),
|
setLanguage: (language) => dispatch(doSetLanguage(language)),
|
||||||
signIn: () => dispatch(doSignIn()),
|
signIn: () => dispatch(doSignIn()),
|
||||||
requestDownloadUpgrade: () => dispatch(doDownloadUpgradeRequested()),
|
requestDownloadUpgrade: () => dispatch(doOpenModal(MODALS.UPGRADE)),
|
||||||
updatePreferences: () => dispatch(doGetAndPopulatePreferences()),
|
updatePreferences: () => dispatch(doGetAndPopulatePreferences()),
|
||||||
getWalletSyncPref: () => dispatch(doGetWalletSyncPreference()),
|
getWalletSyncPref: () => dispatch(doGetWalletSyncPreference()),
|
||||||
syncLoop: (noInterval) => dispatch(doSyncLoop(noInterval)),
|
syncLoop: (noInterval) => dispatch(doSyncLoop(noInterval)),
|
||||||
|
|
|
@ -6,12 +6,20 @@ export const selectState = (state) => state.app || {};
|
||||||
|
|
||||||
export const selectPlatform = createSelector(selectState, (state) => state.platform);
|
export const selectPlatform = createSelector(selectState, (state) => state.platform);
|
||||||
|
|
||||||
export const selectUpdateUrl = createSelector(selectPlatform, (platform) => {
|
export const selectRemoteVersion = createSelector(selectState, (state) => state.remoteVersion);
|
||||||
|
|
||||||
|
export const selectUpdateUrl = createSelector(selectPlatform, selectRemoteVersion, (platform, releaseVersion) => {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return 'https://lbry.com/get/lbry.dmg';
|
return 'https://lbry.com/get/lbry.dmg';
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return 'https://lbry.com/get/lbry.deb';
|
// releaseVersion can be used as the tag name
|
||||||
|
// Example: v0.53.5-alpha.test7495b
|
||||||
|
// When downloading, we need to remove the initial
|
||||||
|
// v, ending up with a file name like
|
||||||
|
// LBRY_0.53.5-alpha.test7495b.deb
|
||||||
|
const fileName = 'LBRY_' + (releaseVersion || '').replace('v', '') + '.deb';
|
||||||
|
return `https://github.com/lbryio/lbry-desktop/releases/download/${releaseVersion}/${fileName}`;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return 'https://lbry.com/get/lbry.exe';
|
return 'https://lbry.com/get/lbry.exe';
|
||||||
default:
|
default:
|
||||||
|
@ -21,8 +29,6 @@ export const selectUpdateUrl = createSelector(selectPlatform, (platform) => {
|
||||||
|
|
||||||
export const selectHasClickedComment = createSelector(selectState, (state) => state.hasClickedComment);
|
export const selectHasClickedComment = createSelector(selectState, (state) => state.hasClickedComment);
|
||||||
|
|
||||||
export const selectRemoteVersion = createSelector(selectState, (state) => state.remoteVersion);
|
|
||||||
|
|
||||||
export const selectIsUpgradeAvailable = createSelector(selectState, (state) => state.isUpgradeAvailable);
|
export const selectIsUpgradeAvailable = createSelector(selectState, (state) => state.isUpgradeAvailable);
|
||||||
|
|
||||||
export const selectUpgradeInitialized = createSelector(selectState, (state) => state.upgradeInitialized);
|
export const selectUpgradeInitialized = createSelector(selectState, (state) => state.upgradeInitialized);
|
||||||
|
|
Loading…
Add table
Reference in a new issue