Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e7bd2c370 |
No files matched your search
File renamed without changes.
@@ -29,10 +29,6 @@
|
||||
"from": "./static/font",
|
||||
"to": "static/font",
|
||||
"filter": ["**/*"]
|
||||
},
|
||||
{
|
||||
"from": "./static/app-update.yml",
|
||||
"to": "app-update.yml"
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
|
||||
+99
-173
@@ -22,7 +22,6 @@ import { diskSpaceLinux, diskSpaceWindows, diskSpaceMac } from '../ui/util/disks
|
||||
const { download } = require('electron-dl');
|
||||
const remote = require('@electron/remote/main');
|
||||
const os = require('os');
|
||||
const sudo = require('sudo-prompt');
|
||||
|
||||
remote.initialize();
|
||||
const filePath = path.join(process.resourcesPath, 'static', 'upgradeDisabled');
|
||||
@@ -34,23 +33,29 @@ try {
|
||||
upgradeDisabled = false;
|
||||
}
|
||||
autoUpdater.autoDownload = !upgradeDisabled;
|
||||
autoUpdater.allowPrerelease = false;
|
||||
|
||||
const UPDATE_STATE_INIT = 0;
|
||||
const UPDATE_STATE_CHECKING = 1;
|
||||
const UPDATE_STATE_UPDATES_FOUND = 2;
|
||||
const UPDATE_STATE_NO_UPDATES_FOUND = 3;
|
||||
const UPDATE_STATE_DOWNLOADING = 4;
|
||||
const UPDATE_STATE_DOWNLOADED = 5;
|
||||
let updateState = UPDATE_STATE_INIT;
|
||||
let updateDownloadItem;
|
||||
|
||||
const isAutoUpdateSupported = ['win32', 'darwin'].includes(process.platform) || !!process.env.APPIMAGE;
|
||||
// This is set to true if an auto update has been downloaded through the Electron
|
||||
// auto-update system and is ready to install. If the user declined an update earlier,
|
||||
// it will still install on shutdown.
|
||||
let autoUpdateDownloaded = false;
|
||||
|
||||
// This is used to keep track of whether we are showing the special dialog
|
||||
// that we show on Windows after you decline an upgrade and close the app later.
|
||||
let showingAutoUpdateCloseAlert = false;
|
||||
|
||||
// This is used to prevent downloading updates multiple times when
|
||||
// using the auto updater API.
|
||||
// As read in the documentation:
|
||||
// "Calling autoUpdater.checkForUpdates() twice will download the update two times."
|
||||
// https://www.electronjs.org/docs/latest/api/auto-updater#autoupdatercheckforupdates
|
||||
let keepCheckingForUpdates = true;
|
||||
|
||||
// Auto updater doesn't support Linux installations (only trough AppImages)
|
||||
// this is why, for that case, we download a full executable (.deb package)
|
||||
// as a fallback support. This variable will be used to prevent
|
||||
// multiple downloads when auto updater isn't supported.
|
||||
let downloadUpgradeInProgress = false;
|
||||
|
||||
// Keep a global reference, if you don't, they will be closed automatically when the JavaScript
|
||||
// object is garbage collected.
|
||||
let rendererWindow;
|
||||
@@ -238,8 +243,7 @@ app.on('activate', () => {
|
||||
app.on('will-quit', event => {
|
||||
if (
|
||||
process.platform === 'win32' &&
|
||||
updateState === UPDATE_STATE_DOWNLOADED &&
|
||||
isAutoUpdateSupported &&
|
||||
autoUpdateDownloaded &&
|
||||
!appState.autoUpdateAccepted &&
|
||||
!showingAutoUpdateCloseAlert
|
||||
) {
|
||||
@@ -323,6 +327,87 @@ ipcMain.on('get-disk-space', async (event) => {
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('download-upgrade', async (event, params) => {
|
||||
if (downloadUpgradeInProgress) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { url, options } = params;
|
||||
const dir = fs.mkdtempSync(app.getPath('temp') + path.sep);
|
||||
options.onProgress = function(p) {
|
||||
rendererWindow.webContents.send('download-progress-update', p);
|
||||
};
|
||||
options.directory = dir;
|
||||
options.onCompleted = function(c) {
|
||||
downloadUpgradeInProgress = false;
|
||||
rendererWindow.webContents.send('download-update-complete', c);
|
||||
};
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
downloadUpgradeInProgress = true;
|
||||
await download(win, url, options).catch(e => console.log('e', e));
|
||||
});
|
||||
|
||||
ipcMain.on('upgrade', (event, installerPath) => {
|
||||
app.on('quit', () => {
|
||||
console.log('Launching upgrade installer at', installerPath);
|
||||
// This gets triggered called after *all* other quit-related events, so
|
||||
// we'll only get here if we're fully prepared and quitting for real.
|
||||
shell.openPath(installerPath);
|
||||
});
|
||||
// what to do if no shutdown in a long time?
|
||||
console.log('Update downloaded to', installerPath);
|
||||
console.log('The app will close and you will be prompted to install the latest version of LBRY.');
|
||||
console.log('After the install is complete, please reopen the app.');
|
||||
app.quit();
|
||||
});
|
||||
|
||||
ipcMain.on('check-for-updates', (event, autoDownload) => {
|
||||
// Prevent downloading the same update multiple times.
|
||||
if (!keepCheckingForUpdates) {
|
||||
return;
|
||||
}
|
||||
|
||||
keepCheckingForUpdates = false;
|
||||
autoUpdater.autoDownload = autoDownload;
|
||||
autoUpdater.checkForUpdates();
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
autoUpdateDownloaded = true;
|
||||
|
||||
// If this download was trigger by
|
||||
// autoUpdateAccepted it means, the user
|
||||
// wants to install the new update but
|
||||
// needed to downloaded the files first.
|
||||
if (appState.autoUpdateAccepted) {
|
||||
autoUpdater.quitAndInstall();
|
||||
}
|
||||
});
|
||||
|
||||
autoUpdater.on('update-not-available', () => {
|
||||
keepCheckingForUpdates = true;
|
||||
});
|
||||
|
||||
ipcMain.on('autoUpdateAccepted', () => {
|
||||
appState.autoUpdateAccepted = true;
|
||||
|
||||
// quitAndInstall can only be called if the
|
||||
// update has been downloaded. Since the user
|
||||
// can disable auto updates, we have to make
|
||||
// sure it has been downloaded first.
|
||||
if (autoUpdateDownloaded) {
|
||||
autoUpdater.quitAndInstall();
|
||||
return;
|
||||
}
|
||||
|
||||
// If the update hasn't been downloaded,
|
||||
// start downloading it. After it's done, the
|
||||
// event 'update-downloaded' will be triggered,
|
||||
// where we will be able to resume the
|
||||
// update installation.
|
||||
autoUpdater.downloadUpdate();
|
||||
});
|
||||
|
||||
ipcMain.on('version-info-requested', () => {
|
||||
function formatRc(ver) {
|
||||
// Adds dash if needed to make RC suffix SemVer friendly
|
||||
@@ -415,162 +500,3 @@ process.on('uncaughtException', error => {
|
||||
if (daemon) daemon.quit();
|
||||
app.exit(1);
|
||||
});
|
||||
|
||||
// Auto updater
|
||||
autoUpdater.on('download-progress', () => {
|
||||
updateState = UPDATE_STATE_DOWNLOADING;
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
updateState = UPDATE_STATE_DOWNLOADED;
|
||||
|
||||
// If this download was trigger by
|
||||
// autoUpdateAccepted it means, the user
|
||||
// wants to install the new update but
|
||||
// needed to downloaded the files first.
|
||||
if (appState.autoUpdateAccepted) {
|
||||
autoUpdater.quitAndInstall();
|
||||
}
|
||||
});
|
||||
|
||||
autoUpdater.on('update-available', () => {
|
||||
if (updateState === UPDATE_STATE_DOWNLOADING) {
|
||||
return;
|
||||
}
|
||||
updateState = UPDATE_STATE_UPDATES_FOUND;
|
||||
});
|
||||
|
||||
autoUpdater.on('update-not-available', () => {
|
||||
updateState = UPDATE_STATE_NO_UPDATES_FOUND;
|
||||
});
|
||||
|
||||
autoUpdater.on('error', () => {
|
||||
if (updateState === UPDATE_STATE_DOWNLOADING) {
|
||||
updateState = UPDATE_STATE_UPDATES_FOUND;
|
||||
return;
|
||||
}
|
||||
updateState = UPDATE_STATE_INIT;
|
||||
});
|
||||
|
||||
// Manual (.deb) update
|
||||
ipcMain.on('cancel-download-upgrade', () => {
|
||||
if (updateDownloadItem) {
|
||||
// Cancel the download and execute the onCancel
|
||||
// callback set in the options.
|
||||
updateDownloadItem.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('download-upgrade', (event, params) => {
|
||||
if (updateState !== UPDATE_STATE_UPDATES_FOUND) {
|
||||
return;
|
||||
}
|
||||
if (isAutoUpdateSupported) {
|
||||
updateState = UPDATE_STATE_DOWNLOADING;
|
||||
autoUpdater.downloadUpdate();
|
||||
return;
|
||||
}
|
||||
|
||||
const { url, options } = params;
|
||||
const dir = fs.mkdtempSync(app.getPath('temp') + path.sep);
|
||||
|
||||
updateState = UPDATE_STATE_DOWNLOADING;
|
||||
|
||||
// Grab the download item's handler to allow
|
||||
// cancelling the operation if required.
|
||||
options.onStarted = function(downloadItem) {
|
||||
updateDownloadItem = downloadItem;
|
||||
};
|
||||
options.onCancel = function() {
|
||||
updateState = UPDATE_STATE_UPDATES_FOUND;
|
||||
updateDownloadItem = undefined;
|
||||
};
|
||||
options.onProgress = function(p) {
|
||||
rendererWindow.webContents.send('download-progress-update', p);
|
||||
};
|
||||
options.onCompleted = function(c) {
|
||||
updateState = UPDATE_STATE_DOWNLOADED;
|
||||
updateDownloadItem = undefined;
|
||||
rendererWindow.webContents.send('download-update-complete', c);
|
||||
};
|
||||
options.directory = dir;
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
download(win, url, options).catch(e => {
|
||||
updateState = UPDATE_STATE_UPDATES_FOUND;
|
||||
console.log('e', e);
|
||||
});
|
||||
});
|
||||
|
||||
// Update behavior
|
||||
ipcMain.on('autoUpdateAccepted', () => {
|
||||
appState.autoUpdateAccepted = true;
|
||||
|
||||
// quitAndInstall can only be called if the
|
||||
// update has been downloaded. Since the user
|
||||
// can disable auto updates, we have to make
|
||||
// sure it has been downloaded first.
|
||||
if (updateState === UPDATE_STATE_DOWNLOADED) {
|
||||
autoUpdater.quitAndInstall();
|
||||
return;
|
||||
}
|
||||
|
||||
if (updateState !== UPDATE_STATE_UPDATES_FOUND) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the update hasn't been downloaded,
|
||||
// start downloading it. After it's done, the
|
||||
// event 'update-downloaded' will be triggered,
|
||||
// where we will be able to resume the
|
||||
// update installation.
|
||||
updateState = UPDATE_STATE_DOWNLOADING;
|
||||
autoUpdater.downloadUpdate();
|
||||
});
|
||||
|
||||
ipcMain.on('check-for-updates', (event, autoDownload) => {
|
||||
if (![UPDATE_STATE_INIT, UPDATE_STATE_NO_UPDATES_FOUND].includes(updateState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
updateState = UPDATE_STATE_CHECKING;
|
||||
|
||||
// If autoDownload is true, checkForUpdates will begin the
|
||||
// download automatically.
|
||||
if (autoDownload) {
|
||||
updateState = UPDATE_STATE_DOWNLOADING;
|
||||
}
|
||||
|
||||
autoUpdater.autoDownload = autoDownload;
|
||||
autoUpdater.checkForUpdates();
|
||||
});
|
||||
|
||||
ipcMain.on('upgrade', (event, installerPath) => {
|
||||
// what to do if no shutdown in a long time?
|
||||
console.log('Update downloaded to', installerPath);
|
||||
console.log('The app will close and you will be prompted to install the latest version of LBRY.');
|
||||
console.log('After the install is complete, please reopen the app.');
|
||||
|
||||
// Prevent .deb package from opening with archive manager (Ubuntu >= 20)
|
||||
if (process.platform === 'linux' && !process.env.APPIMAGE) {
|
||||
sudo.exec(`dpkg -i ${installerPath}`, { name: app.name }, (err, stdout, stderr) => {
|
||||
if (err || stderr) {
|
||||
rendererWindow.webContents.send('upgrade-installing-error');
|
||||
return;
|
||||
}
|
||||
|
||||
// Re-launch the application when the installation finishes.
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
app.on('quit', () => {
|
||||
console.log('Launching upgrade installer at', installerPath);
|
||||
// This gets triggered called after *all* other quit-related events, so
|
||||
// we'll only get here if we're fully prepared and quitting for real.
|
||||
shell.openPath(installerPath);
|
||||
});
|
||||
app.quit();
|
||||
});
|
||||
+2
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lbry",
|
||||
"version": "0.53.5-alpha.test7495b4",
|
||||
"version": "0.53.5-t109",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -67,7 +67,6 @@
|
||||
"remove-markdown": "^0.3.0",
|
||||
"rss": "^1.2.2",
|
||||
"source-map-explorer": "^2.5.2",
|
||||
"sudo-prompt": "^9.2.1",
|
||||
"tempy": "^0.6.0",
|
||||
"videojs-logo": "^2.1.4"
|
||||
},
|
||||
@@ -239,7 +238,7 @@
|
||||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
"lbrynetDaemonVersion": "0.107.2",
|
||||
"lbrynetDaemonVersion": "0.109.0",
|
||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||
"lbrynetDaemonDir": "static/daemon",
|
||||
"lbrynetDaemonFileName": "lbrynet"
|
||||
|
||||
@@ -2312,8 +2312,5 @@
|
||||
"Free --[legend, unused disk space]--": "Free",
|
||||
"Top content in %language%": "Top content in %language%",
|
||||
"Apply": "Apply",
|
||||
"Disable background": "Disable background",
|
||||
"Installing, please wait...": "Installing, please wait...",
|
||||
"There was an error during installation. Please, try again.": "There was an error during installation. Please, try again.",
|
||||
"--end--": "--end--"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
owner: lbryio
|
||||
repo: lbry-desktop
|
||||
provider: github
|
||||
@@ -50,7 +50,6 @@ function ChannelThumbnail(props: Props) {
|
||||
setThumbUploadError,
|
||||
ThumbUploadError,
|
||||
} = props;
|
||||
const [retries, setRetries] = React.useState(3);
|
||||
const [thumbLoadError, setThumbLoadError] = React.useState(ThumbUploadError);
|
||||
const shouldResolve = !isResolving && claim === undefined;
|
||||
const thumbnail = rawThumbnail && rawThumbnail.trim().replace(/^http:\/\//i, 'https://');
|
||||
@@ -59,15 +58,6 @@ function ChannelThumbnail(props: Props) {
|
||||
const channelThumbnail = thumbnailPreview || thumbnail || defaultAvatar;
|
||||
const isGif = channelThumbnail && channelThumbnail.endsWith('gif');
|
||||
const showThumb = (!obscure && !!thumbnail) || thumbnailPreview;
|
||||
const avatarSrc = React.useMemo(() => {
|
||||
if (retries <= 0) {
|
||||
return defaultAvatar;
|
||||
}
|
||||
if (!thumbLoadError) {
|
||||
return channelThumbnail;
|
||||
}
|
||||
return defaultAvatar;
|
||||
}, [retries, thumbLoadError, channelThumbnail, defaultAvatar]);
|
||||
|
||||
// Generate a random color class based on the first letter of the channel name
|
||||
const { channelName } = parseURI(uri);
|
||||
@@ -110,10 +100,9 @@ function ChannelThumbnail(props: Props) {
|
||||
<OptimizedImage
|
||||
alt={__('Channel profile picture')}
|
||||
className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'}
|
||||
src={avatarSrc}
|
||||
src={(!thumbLoadError && channelThumbnail) || defaultAvatar}
|
||||
loading={noLazyLoad ? undefined : 'lazy'}
|
||||
onError={() => {
|
||||
setRetries((retries) => retries - 1);
|
||||
if (setThumbUploadError) {
|
||||
setThumbUploadError(true);
|
||||
} else {
|
||||
|
||||
@@ -47,24 +47,7 @@ class FileSelector extends React.PureComponent<Props> {
|
||||
};
|
||||
|
||||
handleDirectoryInputSelection = () => {
|
||||
let defaultPath;
|
||||
let properties;
|
||||
let isWin = process.platform === 'win32';
|
||||
let type = this.props.type;
|
||||
|
||||
if (isWin === true) {
|
||||
defaultPath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
|
||||
}
|
||||
|
||||
if (type === 'openFile') {
|
||||
properties = ['openFile'];
|
||||
}
|
||||
|
||||
if (type === 'openDirectory') {
|
||||
properties = ['openDirectory'];
|
||||
}
|
||||
|
||||
remote.dialog.showOpenDialog({ properties, defaultPath }).then((result) => {
|
||||
remote.dialog.showOpenDialog({ properties: ['openDirectory'] }).then((result) => {
|
||||
const path = result && result.filePaths[0];
|
||||
if (path) {
|
||||
// $FlowFixMe
|
||||
@@ -99,11 +82,7 @@ class FileSelector extends React.PureComponent<Props> {
|
||||
autoFocus={autoFocus}
|
||||
button="primary"
|
||||
disabled={disabled}
|
||||
onClick={
|
||||
type === 'openDirectory' || type === 'openFile'
|
||||
? this.handleDirectoryInputSelection
|
||||
: this.fileInputButton
|
||||
}
|
||||
onClick={type === 'openDirectory' ? this.handleDirectoryInputSelection : this.fileInputButton}
|
||||
label={__('Browse')}
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { selectRemoteVersion } from 'redux/selectors/app';
|
||||
import LastReleaseChanges from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
releaseVersion: selectRemoteVersion(state),
|
||||
});
|
||||
|
||||
const perform = {};
|
||||
|
||||
export default connect(select, perform)(LastReleaseChanges);
|
||||
export default LastReleaseChanges;
|
||||
@@ -5,12 +5,11 @@ import Button from 'component/button';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
|
||||
type Props = {
|
||||
releaseVersion: string,
|
||||
hideReleaseVersion?: boolean,
|
||||
};
|
||||
|
||||
const LastReleaseChanges = (props: Props) => {
|
||||
const { hideReleaseVersion, releaseVersion } = props;
|
||||
const { hideReleaseVersion } = props;
|
||||
const [releaseTag, setReleaseTag] = useState('');
|
||||
const [releaseChanges, setReleaseChanges] = useState('');
|
||||
const [fetchingReleaseChanges, setFetchingReleaseChanges] = useState(false);
|
||||
@@ -36,7 +35,7 @@ const LastReleaseChanges = (props: Props) => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const lastReleaseUrl = `https://api.github.com/repos/lbryio/lbry-desktop/releases/tags/${releaseVersion}`;
|
||||
const lastReleaseUrl = 'https://api.github.com/repos/lbryio/lbry-desktop/releases/latest';
|
||||
const options = {
|
||||
method: 'GET',
|
||||
headers: { Accept: 'application/vnd.github.v3+json' },
|
||||
@@ -55,7 +54,7 @@ const LastReleaseChanges = (props: Props) => {
|
||||
setFetchingReleaseChanges(false);
|
||||
setFetchReleaseFailed(true);
|
||||
});
|
||||
}, [releaseVersion, setFetchingReleaseChanges, setReleaseTag, setReleaseChanges, setFetchReleaseFailed]);
|
||||
}, []);
|
||||
|
||||
if (fetchingReleaseChanges) {
|
||||
return <p>{__('Loading...')}</p>;
|
||||
|
||||
@@ -325,7 +325,6 @@ function PublishFile(props: Props) {
|
||||
{showFileUpload && (
|
||||
<>
|
||||
<FileSelector
|
||||
type="openFile"
|
||||
label={__('File')}
|
||||
disabled={disabled}
|
||||
currentPath={currentFile}
|
||||
|
||||
@@ -5,7 +5,6 @@ import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import SettingAppearance from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
disableBackground: makeSelectClientSetting(SETTINGS.DISABLE_BACKGROUND)(state),
|
||||
clock24h: makeSelectClientSetting(SETTINGS.CLOCK_24H)(state),
|
||||
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
|
||||
hideBalance: makeSelectClientSetting(SETTINGS.HIDE_BALANCE)(state),
|
||||
|
||||
@@ -12,7 +12,6 @@ import ThemeSelector from 'component/themeSelector';
|
||||
import homepages from 'homepages';
|
||||
|
||||
type Props = {
|
||||
disableBackground: boolean,
|
||||
clock24h: boolean,
|
||||
searchInLanguage: boolean,
|
||||
hideBalance: boolean,
|
||||
@@ -21,7 +20,7 @@ type Props = {
|
||||
};
|
||||
|
||||
export default function SettingAppearance(props: Props) {
|
||||
const { clock24h, disableBackground, searchInLanguage, hideBalance, setClientSetting, setSearchInLanguage } = props;
|
||||
const { clock24h, searchInLanguage, hideBalance, setClientSetting, setSearchInLanguage } = props;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -64,14 +63,6 @@ export default function SettingAppearance(props: Props) {
|
||||
checked={clock24h}
|
||||
/>
|
||||
</SettingsRow>
|
||||
<SettingsRow title={__('Disable background')}>
|
||||
<FormField
|
||||
type="checkbox"
|
||||
name="background"
|
||||
onChange={() => setClientSetting(SETTINGS.DISABLE_BACKGROUND, !disableBackground)}
|
||||
checked={disableBackground}
|
||||
/>
|
||||
</SettingsRow>
|
||||
<SettingsRow title={__('Hide wallet balance in header')}>
|
||||
<FormField
|
||||
type="checkbox"
|
||||
|
||||
@@ -241,12 +241,8 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||
|
||||
return (
|
||||
<div className="splash">
|
||||
{!error && (
|
||||
<>
|
||||
<h1 className="splash__title">LBRY</h1>
|
||||
<div className="splash__details">{details}</div>
|
||||
</>
|
||||
)}
|
||||
<h1 className="splash__title">LBRY</h1>
|
||||
<div className="splash__details">{details}</div>
|
||||
|
||||
{!animationHidden && !error && (
|
||||
<css-doodle class="doodle">
|
||||
@@ -294,7 +290,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||
)}
|
||||
{error && (
|
||||
<Card
|
||||
title={<h1 className="splash__error-title">{__('Error starting up')}</h1>}
|
||||
title={__('Error starting up')}
|
||||
subtitle={
|
||||
<React.Fragment>
|
||||
<p>
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import { connect } from 'react-redux';
|
||||
// import { makeSelectCoverForUri, makeSelectAvatarForUri } from 'redux/selectors/claims';
|
||||
import Wallpaper from './view';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
|
||||
const select = (state) => ({
|
||||
disableBackground: makeSelectClientSetting(SETTINGS.DISABLE_BACKGROUND)(state),
|
||||
});
|
||||
/*
|
||||
const select = (state, props) => {
|
||||
if (props.uri && (props.uri.indexOf('@') !== -1 || props.uri.indexOf('#') !== -1)) {
|
||||
return {
|
||||
cover: makeSelectCoverForUri(props.uri)(state),
|
||||
avatar: makeSelectAvatarForUri(props.uri)(state),
|
||||
};
|
||||
} else return {};
|
||||
};
|
||||
*/
|
||||
|
||||
const perform = {};
|
||||
|
||||
export default connect(select, perform)(Wallpaper);
|
||||
export default connect()(Wallpaper);
|
||||
@@ -8,11 +8,10 @@ type Props = {
|
||||
// cover: ?string,
|
||||
// avatar: ?string,
|
||||
reset: ?boolean,
|
||||
disableBackground: ?boolean,
|
||||
};
|
||||
|
||||
const Wallpaper = (props: Props) => {
|
||||
const { disableBackground } = props;
|
||||
// const { cover, avatar } = props;
|
||||
|
||||
/*
|
||||
if (avatar) {
|
||||
@@ -228,13 +227,12 @@ const Wallpaper = (props: Props) => {
|
||||
}}
|
||||
/>
|
||||
*/
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={'background-image'}
|
||||
style={{
|
||||
backgroundImage: disableBackground ? `none` : `url(${freeezepeach})`,
|
||||
backgroundImage: `url(${freeezepeach})`,
|
||||
}}
|
||||
/>
|
||||
<div className={'theme'} />
|
||||
|
||||
@@ -45,8 +45,6 @@ export const DOWNLOAD_UPGRADE = 'DOWNLOAD_UPGRADE';
|
||||
export const UPGRADE_DOWNLOAD_STARTED = 'UPGRADE_DOWNLOAD_STARTED';
|
||||
export const UPGRADE_DOWNLOAD_COMPLETED = 'UPGRADE_DOWNLOAD_COMPLETED';
|
||||
export const UPGRADE_DOWNLOAD_PROGRESSED = 'UPGRADE_DOWNLOAD_PROGRESSED';
|
||||
export const UPGRADE_INIT_INSTALL = 'UPGRADE_INIT_INSTALL';
|
||||
export const UPGRADE_INSTALL_ERROR = 'UPGRADE_INSTALL_ERROR';
|
||||
export const CHECK_UPGRADE_AVAILABLE = 'CHECK_UPGRADE_AVAILABLE';
|
||||
export const CHECK_UPGRADE_START = 'CHECK_UPGRADE_START';
|
||||
export const CHECK_UPGRADE_SUCCESS = 'CHECK_UPGRADE_SUCCESS';
|
||||
@@ -57,10 +55,7 @@ export const UPDATE_REMOTE_VERSION = 'UPDATE_REMOTE_VERSION';
|
||||
export const SKIP_UPGRADE = 'SKIP_UPGRADE';
|
||||
export const START_UPGRADE = 'START_UPGRADE';
|
||||
export const AUTO_UPDATE_DECLINED = 'AUTO_UPDATE_DECLINED';
|
||||
export const AUTO_UPDATE_RESET = 'AUTO_UPDATE_RESET';
|
||||
export const AUTO_UPDATE_FAILED = 'AUTO_UPDATE_FAILED';
|
||||
export const AUTO_UPDATE_DOWNLOADED = 'AUTO_UPDATE_DOWNLOADED';
|
||||
export const AUTO_UPDATE_DOWNLOADING = 'AUTO_UPDATE_DOWNLOADING';
|
||||
export const CLEAR_UPGRADE_TIMER = 'CLEAR_UPGRADE_TIMER';
|
||||
|
||||
// Wallet
|
||||
|
||||
@@ -14,7 +14,6 @@ export const THEME = 'theme';
|
||||
export const THEMES = 'themes';
|
||||
export const AUTOMATIC_DARK_MODE_ENABLED = 'automatic_dark_mode_enabled';
|
||||
export const CLOCK_24H = 'clock_24h';
|
||||
export const DISABLE_BACKGROUND = 'disableBackground';
|
||||
export const AUTOPLAY_MEDIA = 'autoplay';
|
||||
export const AUTOPLAY_NEXT = 'autoplay_next';
|
||||
export const OS_NOTIFICATIONS_ENABLED = 'os_notifications_enabled';
|
||||
|
||||
@@ -21,10 +21,6 @@ import {
|
||||
doToggle3PAnalytics,
|
||||
doUpdateDownloadProgress,
|
||||
doNotifyUpdateAvailable,
|
||||
doShowUpgradeInstallationError,
|
||||
doAutoUpdateDownloading,
|
||||
doAutoUpdateReset,
|
||||
doAutoUpdateFail,
|
||||
} from 'redux/actions/app';
|
||||
import { isURIValid } from 'util/lbryURI';
|
||||
import { setSearchApi } from 'redux/actions/search';
|
||||
@@ -132,30 +128,10 @@ ipcRenderer.on('open-uri-requested', (event, url, newSession) => {
|
||||
handleError();
|
||||
});
|
||||
|
||||
autoUpdater.on('download-progress', () => {
|
||||
app.store.dispatch(doAutoUpdateDownloading());
|
||||
});
|
||||
|
||||
autoUpdater.on('checking-for-update', () => {
|
||||
app.store.dispatch(doAutoUpdateReset());
|
||||
});
|
||||
|
||||
autoUpdater.on('update-available', (e) => {
|
||||
app.store.dispatch(doNotifyUpdateAvailable(e));
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
app.store.dispatch(doAutoUpdateReset());
|
||||
});
|
||||
|
||||
autoUpdater.on('error', () => {
|
||||
app.store.dispatch(doAutoUpdateFail());
|
||||
});
|
||||
|
||||
ipcRenderer.on('upgrade-installing-error', () => {
|
||||
app.store.dispatch(doShowUpgradeInstallationError());
|
||||
});
|
||||
|
||||
ipcRenderer.on('download-progress-update', (e, p) => {
|
||||
app.store.dispatch(doUpdateDownloadProgress(Math.round(p.percent * 100)));
|
||||
});
|
||||
@@ -232,8 +208,6 @@ function AppWrapper() {
|
||||
const enabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
|
||||
if (enabled) {
|
||||
autoUpdater.allowPrerelease = true;
|
||||
} else {
|
||||
autoUpdater.allowPrerelease = false;
|
||||
}
|
||||
}
|
||||
}, [persistDone]);
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doAutoUpdateDeclined, doHideModal } from 'redux/actions/app';
|
||||
import { selectAutoUpdateFailed, selectAutoUpdateDownloading, selectIsUpgradeAvailable } from 'redux/selectors/app';
|
||||
import ModalAutoUpdateDownloaded from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
errorWhileUpdating: selectAutoUpdateFailed(state),
|
||||
isDownloading: selectAutoUpdateDownloading(state),
|
||||
isUpdateAvailable: selectIsUpgradeAvailable(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
const perform = dispatch => ({
|
||||
closeModal: () => dispatch(doHideModal()),
|
||||
declineAutoUpdate: () => dispatch(doAutoUpdateDeclined()),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ModalAutoUpdateDownloaded);
|
||||
export default connect(
|
||||
null,
|
||||
perform
|
||||
)(ModalAutoUpdateDownloaded);
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
// @if TARGET='app'
|
||||
import { ipcRenderer } from 'electron';
|
||||
// @endif
|
||||
@@ -7,19 +7,16 @@ import { Modal } from 'modal/modal';
|
||||
import LastReleaseChanges from 'component/lastReleaseChanges';
|
||||
|
||||
type Props = {
|
||||
closeModal: (any) => any,
|
||||
closeModal: any => any,
|
||||
declineAutoUpdate: () => any,
|
||||
errorWhileUpdating: boolean,
|
||||
isDownloading: boolean,
|
||||
isUpdateAvailable: boolean,
|
||||
};
|
||||
|
||||
const ModalAutoUpdateDownloaded = (props: Props) => {
|
||||
const { closeModal, declineAutoUpdate, errorWhileUpdating, isDownloading, isUpdateAvailable } = props;
|
||||
const [waitingForAutoUpdateResponse, setWaitingForAutoUpdateResponse] = useState(false);
|
||||
const { closeModal, declineAutoUpdate } = props;
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
|
||||
const handleConfirm = () => {
|
||||
setWaitingForAutoUpdateResponse(true);
|
||||
setDisabled(true);
|
||||
ipcRenderer.send('autoUpdateAccepted');
|
||||
};
|
||||
|
||||
@@ -28,24 +25,19 @@ const ModalAutoUpdateDownloaded = (props: Props) => {
|
||||
closeModal();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setWaitingForAutoUpdateResponse(false);
|
||||
}, [errorWhileUpdating, isDownloading, isUpdateAvailable]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
isOpen
|
||||
type="confirm"
|
||||
contentLabel={__('Upgrade Downloaded')}
|
||||
title={__('LBRY leveled up')}
|
||||
confirmButtonLabel={isDownloading ? __('Downloading...') : __('Upgrade Now')}
|
||||
abortButtonLabel={isDownloading ? __('Keep browsing') : __('Not Now')}
|
||||
confirmButtonDisabled={!isUpdateAvailable || isDownloading || waitingForAutoUpdateResponse}
|
||||
confirmButtonLabel={__('Upgrade Now')}
|
||||
abortButtonLabel={__('Not Now')}
|
||||
confirmButtonDisabled={disabled}
|
||||
onConfirmed={handleConfirm}
|
||||
onAborted={handleAbort}
|
||||
>
|
||||
<LastReleaseChanges />
|
||||
{errorWhileUpdating && <p>{__('There was an error while updating. Please try again.')}</p>}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { doStartUpgrade, doCancelUpgrade, doHideModal } from 'redux/actions/app';
|
||||
import {
|
||||
selectDownloadProgress,
|
||||
selectDownloadComplete,
|
||||
selectUpgradeDownloadPath,
|
||||
selectUpgradeInitialized,
|
||||
selectUpgradeFailedInstallation,
|
||||
} from 'redux/selectors/app';
|
||||
import { selectDownloadProgress, selectDownloadComplete, selectUpgradeDownloadPath } from 'redux/selectors/app';
|
||||
import ModalDownloading from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
const select = state => ({
|
||||
downloadProgress: selectDownloadProgress(state),
|
||||
downloadComplete: selectDownloadComplete(state),
|
||||
downloadItem: selectUpgradeDownloadPath(state),
|
||||
upgradeInitialized: selectUpgradeInitialized(state),
|
||||
failedInstallation: selectUpgradeFailedInstallation(state),
|
||||
});
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
const perform = dispatch => ({
|
||||
startUpgrade: () => dispatch(doStartUpgrade()),
|
||||
cancelUpgrade: () => {
|
||||
dispatch(doHideModal());
|
||||
@@ -25,4 +17,7 @@ const perform = (dispatch) => ({
|
||||
},
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ModalDownloading);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ModalDownloading);
|
||||
@@ -10,21 +10,11 @@ type Props = {
|
||||
downloadItem: string,
|
||||
startUpgrade: () => void,
|
||||
cancelUpgrade: () => void,
|
||||
upgradeInitialized: boolean,
|
||||
failedInstallation: boolean,
|
||||
};
|
||||
|
||||
class ModalDownloading extends React.PureComponent<Props> {
|
||||
render() {
|
||||
const {
|
||||
downloadProgress,
|
||||
downloadComplete,
|
||||
downloadItem,
|
||||
startUpgrade,
|
||||
cancelUpgrade,
|
||||
upgradeInitialized,
|
||||
failedInstallation,
|
||||
} = this.props;
|
||||
const { downloadProgress, downloadComplete, downloadItem, startUpgrade, cancelUpgrade } = this.props;
|
||||
|
||||
return (
|
||||
<Modal title={__('Downloading update')} isOpen contentLabel={__('Downloading update')} type="custom">
|
||||
@@ -50,18 +40,9 @@ class ModalDownloading extends React.PureComponent<Props> {
|
||||
</React.Fragment>
|
||||
) : null}
|
||||
|
||||
{failedInstallation && <p>{__('There was an error during installation. Please, try again.')}</p>}
|
||||
|
||||
<div className="card__actions">
|
||||
{downloadComplete ? (
|
||||
<Button
|
||||
disabled={upgradeInitialized}
|
||||
button="primary"
|
||||
label={__(upgradeInitialized ? 'Installing, please wait...' : 'Begin Upgrade')}
|
||||
onClick={startUpgrade}
|
||||
/>
|
||||
) : null}
|
||||
<Button disabled={upgradeInitialized} button="link" label={__('Cancel')} onClick={cancelUpgrade} />
|
||||
{downloadComplete ? <Button button="primary" label={__('Begin Upgrade')} onClick={startUpgrade} /> : null}
|
||||
<Button button="link" label={__('Cancel')} onClick={cancelUpgrade} />
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
|
||||
+20
-29
@@ -28,6 +28,7 @@ import {
|
||||
import {
|
||||
selectIsUpgradeSkipped,
|
||||
selectUpdateUrl,
|
||||
selectUpgradeDownloadItem,
|
||||
selectUpgradeDownloadPath,
|
||||
selectAutoUpdateDeclined,
|
||||
selectRemoteVersion,
|
||||
@@ -84,15 +85,6 @@ export function doStartUpgrade() {
|
||||
const upgradeDownloadPath = selectUpgradeDownloadPath(state);
|
||||
|
||||
ipcRenderer.send('upgrade', upgradeDownloadPath);
|
||||
dispatch({
|
||||
type: ACTIONS.UPGRADE_INIT_INSTALL,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doShowUpgradeInstallationError() {
|
||||
return {
|
||||
type: ACTIONS.UPGRADE_INSTALL_ERROR,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -162,8 +154,25 @@ export function doAutoUpdateDeclined() {
|
||||
}
|
||||
|
||||
export function doCancelUpgrade() {
|
||||
ipcRenderer.send('cancel-download-upgrade');
|
||||
return { type: ACTIONS.UPGRADE_CANCELLED };
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const upgradeDownloadItem = selectUpgradeDownloadItem(state);
|
||||
|
||||
if (upgradeDownloadItem) {
|
||||
/*
|
||||
* Right now the remote reference to the download item gets garbage collected as soon as the
|
||||
* the download is over (maybe even earlier), so trying to cancel a finished download may
|
||||
* throw an error.
|
||||
*/
|
||||
try {
|
||||
upgradeDownloadItem.cancel();
|
||||
} catch (err) {
|
||||
console.error(err); // eslint-disable-line no-console
|
||||
}
|
||||
}
|
||||
|
||||
dispatch({ type: ACTIONS.UPGRADE_CANCELLED });
|
||||
};
|
||||
}
|
||||
|
||||
export function doCheckUpgradeAvailable() {
|
||||
@@ -220,24 +229,6 @@ export function doNotifyUpdateAvailable(e) {
|
||||
};
|
||||
}
|
||||
|
||||
export function doAutoUpdateDownloading() {
|
||||
return {
|
||||
type: ACTIONS.AUTO_UPDATE_DOWNLOADING,
|
||||
};
|
||||
}
|
||||
|
||||
export function doAutoUpdateReset() {
|
||||
return {
|
||||
type: ACTIONS.AUTO_UPDATE_RESET,
|
||||
};
|
||||
}
|
||||
|
||||
export function doAutoUpdateFail() {
|
||||
return {
|
||||
type: ACTIONS.AUTO_UPDATE_FAILED,
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
Initiate a timer that will check for an app upgrade every 10 minutes.
|
||||
*/
|
||||
|
||||
@@ -26,9 +26,7 @@ export type AppState = {
|
||||
hasSignature: boolean,
|
||||
badgeNumber: number,
|
||||
volume: number,
|
||||
autoUpdateDownloading: boolean,
|
||||
autoUpdateDeclined: boolean,
|
||||
autoUpdateFailed: boolean,
|
||||
modalsAllowed: boolean,
|
||||
downloadProgress: ?number,
|
||||
upgradeDownloading: ?boolean,
|
||||
@@ -64,15 +62,11 @@ const defaultState: AppState = {
|
||||
upgradeSkipped: sessionStorage.getItem('upgradeSkipped') === 'true',
|
||||
// @endif
|
||||
muted: false,
|
||||
autoUpdateDownloading: false,
|
||||
autoUpdateDownloaded: false,
|
||||
autoUpdateDeclined: false,
|
||||
autoUpdateFailed: false,
|
||||
modalsAllowed: true,
|
||||
hasClickedComment: false,
|
||||
downloadProgress: undefined,
|
||||
upgradeInitialized: false,
|
||||
upgradeFailedInstallation: false,
|
||||
upgradeDownloading: undefined,
|
||||
upgradeDownloadComplete: undefined,
|
||||
checkUpgradeTimer: undefined,
|
||||
@@ -146,18 +140,9 @@ reducers[ACTIONS.UPGRADE_CANCELLED] = (state) =>
|
||||
modal: null,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.AUTO_UPDATE_DOWNLOADING] = (state) =>
|
||||
Object.assign({}, state, {
|
||||
autoUpdateDownloading: true,
|
||||
autoUpdateDownloaded: false,
|
||||
autoUpdateFailed: false,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.AUTO_UPDATE_DOWNLOADED] = (state) =>
|
||||
Object.assign({}, state, {
|
||||
autoUpdateDownloading: false,
|
||||
autoUpdateDownloaded: true,
|
||||
autoUpdateFailed: false,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.AUTO_UPDATE_DECLINED] = (state) =>
|
||||
@@ -165,20 +150,6 @@ reducers[ACTIONS.AUTO_UPDATE_DECLINED] = (state) =>
|
||||
autoUpdateDeclined: true,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.AUTO_UPDATE_RESET] = (state) =>
|
||||
Object.assign({}, state, {
|
||||
autoUpdateFailed: false,
|
||||
autoUpdateDownloading: false,
|
||||
autoUpdateDownloaded: false,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.AUTO_UPDATE_FAILED] = (state) =>
|
||||
Object.assign({}, state, {
|
||||
autoUpdateDownloading: false,
|
||||
autoUpdateDownloaded: false,
|
||||
autoUpdateFailed: true,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.UPGRADE_DOWNLOAD_COMPLETED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
downloadPath: action.data.path,
|
||||
@@ -191,18 +162,6 @@ reducers[ACTIONS.UPGRADE_DOWNLOAD_STARTED] = (state) =>
|
||||
upgradeDownloading: true,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.UPGRADE_INIT_INSTALL] = (state) =>
|
||||
Object.assign({}, state, {
|
||||
upgradeInitialized: true,
|
||||
upgradeFailedInstallation: false,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.UPGRADE_INSTALL_ERROR] = (state) =>
|
||||
Object.assign({}, state, {
|
||||
upgradeInitialized: false,
|
||||
upgradeFailedInstallation: true,
|
||||
});
|
||||
|
||||
reducers[ACTIONS.CHANGE_MODALS_ALLOWED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
modalsAllowed: action.data.modalsAllowed,
|
||||
|
||||
@@ -40,7 +40,6 @@ const defaultState = {
|
||||
[SETTINGS.OS_NOTIFICATIONS_ENABLED]: true,
|
||||
[SETTINGS.AUTOMATIC_DARK_MODE_ENABLED]: false,
|
||||
[SETTINGS.CLOCK_24H]: false,
|
||||
[SETTINGS.DISABLE_BACKGROUND]: false,
|
||||
[SETTINGS.TILE_LAYOUT]: true,
|
||||
[SETTINGS.VIDEO_THEATER_MODE]: false,
|
||||
[SETTINGS.VIDEO_PLAYBACK_RATE]: 1,
|
||||
|
||||
@@ -6,20 +6,12 @@ export const selectState = (state) => state.app || {};
|
||||
|
||||
export const selectPlatform = createSelector(selectState, (state) => state.platform);
|
||||
|
||||
export const selectRemoteVersion = createSelector(selectState, (state) => state.remoteVersion);
|
||||
|
||||
export const selectUpdateUrl = createSelector(selectPlatform, selectRemoteVersion, (platform, releaseVersion) => {
|
||||
export const selectUpdateUrl = createSelector(selectPlatform, (platform) => {
|
||||
switch (platform) {
|
||||
case 'darwin':
|
||||
return 'https://lbry.com/get/lbry.dmg';
|
||||
case 'linux':
|
||||
// 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}`;
|
||||
return 'https://lbry.com/get/lbry.deb';
|
||||
case 'win32':
|
||||
return 'https://lbry.com/get/lbry.exe';
|
||||
default:
|
||||
@@ -29,12 +21,10 @@ export const selectUpdateUrl = createSelector(selectPlatform, selectRemoteVersio
|
||||
|
||||
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 selectUpgradeInitialized = createSelector(selectState, (state) => state.upgradeInitialized);
|
||||
|
||||
export const selectUpgradeFailedInstallation = createSelector(selectState, (state) => state.upgradeFailedInstallation);
|
||||
|
||||
export const selectUpgradeFilename = createSelector(selectPlatform, selectRemoteVersion, (platform, version) => {
|
||||
switch (platform) {
|
||||
case 'darwin':
|
||||
@@ -56,14 +46,12 @@ export const selectIsUpgradeSkipped = createSelector(selectState, (state) => sta
|
||||
|
||||
export const selectUpgradeDownloadPath = createSelector(selectState, (state) => state.downloadPath);
|
||||
|
||||
export const selectUpgradeDownloadItem = createSelector(selectState, (state) => state.downloadItem);
|
||||
|
||||
export const selectAutoUpdateDownloaded = createSelector(selectState, (state) => state.autoUpdateDownloaded);
|
||||
|
||||
export const selectAutoUpdateDeclined = createSelector(selectState, (state) => state.autoUpdateDeclined);
|
||||
|
||||
export const selectAutoUpdateFailed = createSelector(selectState, (state) => state.autoUpdateFailed);
|
||||
|
||||
export const selectAutoUpdateDownloading = createSelector(selectState, (state) => state.autoUpdateDownloading);
|
||||
|
||||
export const selectIsUpdateModalDisplayed = createSelector(selectState, (state) => {
|
||||
return [MODALS.AUTO_UPDATE_DOWNLOADED, MODALS.UPGRADE, MODALS.DOWNLOADING].includes(state.modal);
|
||||
});
|
||||
|
||||
@@ -28,13 +28,6 @@
|
||||
margin-top: -1rem;
|
||||
}
|
||||
|
||||
.splash__error-title {
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.splash__animation-toggle {
|
||||
position: fixed;
|
||||
top: var(--spacing-l);
|
||||
|
||||
Reference in new issue
Block a user