Compare commits

..
Author SHA1 Message Date
zeppi 0f3cc149da v0.53.5-alpha.test7495c3 2022-07-06 17:23:39 -04:00
21 changed files with 45 additions and 123 deletions

No files matched your search

File renamed without changes.
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# $> versionAndTag v0.12.34-sdjljsd
ver=\"$1\"
yarn version $ver
git add --all
git commit -m $ver
commit=`git rev-parse HEAD`
echo $commit
git tag -a $ver -m $ver $commit
+3 -14
View File
@@ -417,9 +417,9 @@ process.on('uncaughtException', error => {
});
// Auto updater
autoUpdater.on('download-progress', () => {
updateState = UPDATE_STATE_DOWNLOADING;
});
// autoUpdater.on('download-progress', (p) => {
// rendererWindow.webContents.send('download-progress-update', p);
// });
autoUpdater.on('update-downloaded', () => {
updateState = UPDATE_STATE_DOWNLOADED;
@@ -434,9 +434,6 @@ autoUpdater.on('update-downloaded', () => {
});
autoUpdater.on('update-available', () => {
if (updateState === UPDATE_STATE_DOWNLOADING) {
return;
}
updateState = UPDATE_STATE_UPDATES_FOUND;
});
@@ -445,10 +442,6 @@ autoUpdater.on('update-not-available', () => {
});
autoUpdater.on('error', () => {
if (updateState === UPDATE_STATE_DOWNLOADING) {
updateState = UPDATE_STATE_UPDATES_FOUND;
return;
}
updateState = UPDATE_STATE_INIT;
});
@@ -514,10 +507,6 @@ ipcMain.on('autoUpdateAccepted', () => {
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,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lbry",
"version": "0.53.5-alpha.test7495b4",
"version": "0.53.5-alpha.test7495b3",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"keywords": [
"lbry"
-3
View File
@@ -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 -12
View File
@@ -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 {
+2 -23
View File
@@ -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
View File
@@ -325,7 +325,6 @@ function PublishFile(props: Props) {
{showFileUpload && (
<>
<FileSelector
type="openFile"
label={__('File')}
disabled={disabled}
currentPath={currentFile}
-1
View File
@@ -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),
+1 -10
View File
@@ -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"
+12 -8
View File
@@ -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);
+2 -4
View File
@@ -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'} />
-1
View File
@@ -60,7 +60,6 @@ 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
-1
View File
@@ -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';
+1 -5
View File
@@ -22,7 +22,6 @@ import {
doUpdateDownloadProgress,
doNotifyUpdateAvailable,
doShowUpgradeInstallationError,
doAutoUpdateDownloading,
doAutoUpdateReset,
doAutoUpdateFail,
} from 'redux/actions/app';
@@ -132,15 +131,12 @@ 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(doAutoUpdateReset());
app.store.dispatch(doNotifyUpdateAvailable(e));
});
+1 -3
View File
@@ -1,12 +1,10 @@
import { connect } from 'react-redux';
import { doAutoUpdateDeclined, doHideModal } from 'redux/actions/app';
import { selectAutoUpdateFailed, selectAutoUpdateDownloading, selectIsUpgradeAvailable } from 'redux/selectors/app';
import { selectAutoUpdateFailed } from 'redux/selectors/app';
import ModalAutoUpdateDownloaded from './view';
const select = (state, props) => ({
errorWhileUpdating: selectAutoUpdateFailed(state),
isDownloading: selectAutoUpdateDownloading(state),
isUpdateAvailable: selectIsUpgradeAvailable(state),
});
const perform = (dispatch) => ({
+7 -12
View File
@@ -1,5 +1,5 @@
// @flow
import React, { useState, useEffect } from 'react';
import React, { useState } from 'react';
// @if TARGET='app'
import { ipcRenderer } from 'electron';
// @endif
@@ -10,16 +10,15 @@ type Props = {
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, errorWhileUpdating } = props;
const [disabled, setDisabled] = useState(false);
const isDownloading = disabled && !errorWhileUpdating;
const handleConfirm = () => {
setWaitingForAutoUpdateResponse(true);
setDisabled(true);
ipcRenderer.send('autoUpdateAccepted');
};
@@ -28,10 +27,6 @@ const ModalAutoUpdateDownloaded = (props: Props) => {
closeModal();
};
useEffect(() => {
setWaitingForAutoUpdateResponse(false);
}, [errorWhileUpdating, isDownloading, isUpdateAvailable]);
return (
<Modal
isOpen
@@ -39,8 +34,8 @@ const ModalAutoUpdateDownloaded = (props: Props) => {
contentLabel={__('Upgrade Downloaded')}
title={__('LBRY leveled up')}
confirmButtonLabel={isDownloading ? __('Downloading...') : __('Upgrade Now')}
abortButtonLabel={isDownloading ? __('Keep browsing') : __('Not Now')}
confirmButtonDisabled={!isUpdateAvailable || isDownloading || waitingForAutoUpdateResponse}
abortButtonLabel={__('Not Now')}
confirmButtonDisabled={isDownloading}
onConfirmed={handleConfirm}
onAborted={handleAbort}
>
-6
View File
@@ -220,12 +220,6 @@ export function doNotifyUpdateAvailable(e) {
};
}
export function doAutoUpdateDownloading() {
return {
type: ACTIONS.AUTO_UPDATE_DOWNLOADING,
};
}
export function doAutoUpdateReset() {
return {
type: ACTIONS.AUTO_UPDATE_RESET,
-15
View File
@@ -26,7 +26,6 @@ export type AppState = {
hasSignature: boolean,
badgeNumber: number,
volume: number,
autoUpdateDownloading: boolean,
autoUpdateDeclined: boolean,
autoUpdateFailed: boolean,
modalsAllowed: boolean,
@@ -64,7 +63,6 @@ const defaultState: AppState = {
upgradeSkipped: sessionStorage.getItem('upgradeSkipped') === 'true',
// @endif
muted: false,
autoUpdateDownloading: false,
autoUpdateDownloaded: false,
autoUpdateDeclined: false,
autoUpdateFailed: false,
@@ -146,18 +144,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) =>
@@ -168,14 +157,10 @@ reducers[ACTIONS.AUTO_UPDATE_DECLINED] = (state) =>
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,
});
-1
View File
@@ -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,
-2
View File
@@ -62,8 +62,6 @@ export const selectAutoUpdateDeclined = createSelector(selectState, (state) => s
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);
});