Reduced Linux binaries

This commit is contained in:
2021-02-12 15:12:31 -06:00
parent 4650fc00be
commit 8f4e38af07
10 changed files with 545 additions and 1043 deletions

14
.vim/coc-settings.json Normal file
View File

@@ -0,0 +1,14 @@
{
"cSpell.words": [
"HKEY",
"HKLM",
"Redistributable",
"Skylinks",
"Skynet",
"Unmount",
"msiexec",
"relver",
"siaprime",
"skylink"
]
}

5
.vimrc
View File

@@ -1,2 +1,7 @@
set autoread
set path+=.,public/**,src/**,test/**
if has('win32')
let &makeprg="create_dist.cmd"
else
let &makeprg="./create_dist.sh"
endif

View File

@@ -3,6 +3,10 @@
* \#48: Support pinning files to cache
* Fixed Skynet export display
* Properly detect existing remote
* Reduced number of Linux binaries to:
* CentOS 7
* Solus
* S3 mount support [disabled]
## 1.3.1
* \#45: Skynet mount support
@@ -17,8 +21,6 @@
* CentOS 7
* Debian 9
* Debian 10
* Debian 9 ARM64
* Debian 10 ARM64
* Solus
* Added `FocusTrap` to modals

View File

@@ -24,32 +24,16 @@ Repertory allows you to mount Sia, Skynet and/or ScPrime blockchain storage solu
* Antergos
* Arch Linux
* Bodhi 5.0.0
* CentOS 7
* CentOS 8
* Debian 9
* Debian 10
* Elementary OS 5.0
* Elementary OS 5.1
* Fedora 28
* Fedora 29
* Fedora 30
* Fedora 31
* Fedora 32
* Fedora 33
* Linux Mint 19
* Linux Mint 19.1
* Linux Mint 19.2
* Linux Mint 19.3
* CentOS 7, 8
* Debian 9, 10
* Elementary OS 5.0, 5.1
* Fedora 28, 29, 30, 31, 32, 33
* Linux Mint 19, 19.1, 19.2, 19.3, 20, 20.1
* Manjaro
* OpenSUSE Leap 15.0
* OpenSUSE Leap 15.1
* OpenSUSE Leap 15.0, 15.1
* OpenSUSE Tumbleweed
* Solus
* Ubuntu 18.04
* Ubuntu 18.10
* Ubuntu 19.04
* Ubuntu 19.10
* Ubuntu 20.04
* Ubuntu 18.04, 18.10, 19.04, 19.10, 20.04
## Issues/Suggestions
Please submit [here](https://bitbucket.org/blockstorage/repertory-ui/issues?status=new&status=open)

97
public/detect_linux.sh Normal file → Executable file
View File

@@ -8,104 +8,23 @@ resetDistVer() {
DISTVER=
}
if [ -f /etc/centos-release ]; then
. /etc/os-release
if [ "$VERSION_ID" = "7" ]; then
DISTNAME=centos
DISTVER=7
elif [ "$VERSION_ID" = "8" ]; then
DISTNAME=debian
DISTVER=10
else
resetDistVer
fi
elif [ -f /etc/fedora-release ]; then
. /etc/os-release
if [ "$VERSION_ID" != "33" ] && "$VERSION_ID" != "32" ] && [ "$VERSION_ID" != "31" ] && [ "$VERSION_ID" != "30" ] && [ "$VERSION_ID" != "29" ] && [ "$VERSION_ID" != "28" ]; then
resetDistVer
else
DISTNAME=debian
if [ "$VERSION_ID" = "28" ]; then
DISTVER=9
else
DISTVER=10
fi
fi
elif [ -f /etc/solus-release ]; then
DISTNAME=solus
elif [ -f /etc/lsb-release ]; then
. /etc/lsb-release
DISTNAME=$(echo ${DISTRIB_ID} | awk '{print tolower($0)}')
DISTVER=${DISTRIB_RELEASE}
if [ "$DISTNAME" != "ubuntu" ]; then
if [ "$DISTNAME" = "linuxmint" ]; then
if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ] || [ "$DISTVER" = "19.2" ] || [ "$DISTVER" = "19.3" ]; then
DISTNAME=debian
DISTVER=9
else
resetDistVer
fi
elif [ "$DISTNAME" = "elementary" ]; then
if [ "$DISTVER" = "5.0" ] || [ "$DISTVER" = "5.1" ]; then
DISTNAME=debian
DISTVER=9
else
resetDistVer
fi
else
resetDistVer
fi
elif [ "$DISTVER" != "18.04" ] && [ "$DISTVER" != "18.10" ] && [ "$DISTVER" != "19.04" ] && [ "$DISTVER" != "19.10" ] && [ "$DISTVER" != "20.04" ] && [ "$DISTVER" != "20.10" ]; then
resetDistVer
else
DISTNAME=debian
if [ "$DISTVER" = "18.04" ]; then
DISTVER=9
else
DISTVER=10
fi
fi
fi
IS_ARM=`(uname -a | grep aarch64) 1>/dev/null 2>&1 && echo 1`
if [ "$DISTNAME" = "unknown" ] && [ -f /etc/debian_version ]; then
if [ -f /etc/solus-release ]; then
DISTNAME=solus
elif [ "$IS_ARM" = "1" ] && [ -f /etc/debian_version ]; then
DISTNAME=debian
DISTVER=$(head -1 /etc/debian_version|awk -F. '{print $1}')
if [ "$DISTVER" != "9" ] && [ "$DISTVER" != "10" ]; then
resetDistVer
fi
fi
if [ "$DISTNAME" = "unknown" ]; then
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "arch" ]; then
DISTNAME=debian
DISTVER=10
elif [ "$ID" = "antergos" ] || [ "$ID" = "manjaro" ]; then
DISTNAME=debian
DISTVER=9
elif [ "$ID" = "opensuse-leap" ]; then
if [ "$VERSION_ID" = "15.0" ]; then
DISTNAME=debian
DISTVER=9
elif [ "$VERSION_ID" = "15.1" ]; then
DISTNAME=debian
DISTVER=9
elif [ "$VERSION_ID" = "15.2" ]; then
DISTNAME=debian
DISTVER=9
else
resetDistVer
fi
elif [ "$ID" = "opensuse-tumbleweed" ]; then
DISTNAME=debian
if [ $(grep sid /etc/debian_version) ]; then
DISTVER=10
else
resetDistVer
fi
else
resetDistVer
fi
else
DISTNAME=centos7
DISTVER=
fi
echo ${DISTNAME}${DISTVER}

View File

@@ -18,24 +18,6 @@
]
}
},
"debian9": {
"1.3.2": {
"sha256": "",
"sig": "",
"urls": [
"https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.2_linux_x86_64.AppImage"
]
}
},
"debian10": {
"1.3.2": {
"sha256": "",
"sig": "",
"urls": [
"https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.2_linux_x86_64.AppImage"
]
}
},
"solus": {
"1.3.2": {
"sha256": "",
@@ -62,12 +44,6 @@
"darwin": [
"1.3.2"
],
"debian9": [
"1.3.2"
],
"debian10": [
"1.3.2"
],
"linux": [
"unavailable"
],

View File

@@ -1,340 +0,0 @@
import React from 'react';
import './App.css';
import Box from './components/UI/Box/Box';
import Configuration from './containers/Configuration/Configuration';
import {connect} from 'react-redux';
import DependencyList from './components/DependencyList/DependencyList';
import DownloadProgress from './components/DownloadProgress/DownloadProgress';
import ErrorDetails from './components/ErrorDetails/ErrorDetails';
import Grid from './components/UI/Grid/Grid';
import InfoDetails from './components/InfoDetails/InfoDetails';
import IPCContainer from './containers/IPCContainer/IPCContainer';
import Loading from './components/UI/Loading/Loading';
import MountItems from './containers/MountItems/MountItems';
import NewReleases from './components/NewReleases/NewReleases';
import {notifyError} from './redux/actions/error_actions';
import Reboot from './components/Reboot/Reboot';
import {
setDismissNewReleasesAvailable,
setNewReleasesAvailable
} from './redux/actions/release_version_actions';
import ReleaseVersionDisplay from './components/ReleaseVersionDisplay/ReleaseVersionDisplay';
import {
displaySelectAppPlatform,
saveState
} from './redux/actions/common_actions';
import SelectAppPlatform from './containers/SelectAppPlatform/SelectAppPlatform';
import Text from './components/UI/Text/Text';
import UpgradeIcon from './components/UpgradeIcon/UpgradeIcon';
import UpgradeUI from './components/UpgradeUI/UpgradeUI';
import {
loadReleases,
setDismissUIUpgrade
} from './redux/actions/release_version_actions';
import YesNo from './components/YesNo/YesNo';
import {createModalConditionally} from './utils';
import SkynetImport from './containers/SkynetImport/SkynetImport';
import ApplicationBusy from './components/ApplicationBusy/ApplicationBusy';
import SkynetExport from './containers/SkynetExport/SkynetExport';
import PinnedManager from './containers/PinnedManager/PinnedManager';
const Constants = require('./constants');
const Scheduler = require('node-schedule');
class App extends IPCContainer {
componentDidMount() {
const detectUpgrades = () => {
if (this.props.AppPlatform === 'unknown') {
if (this.props.Platform === 'linux') {
this.props.displaySelectAppPlatform(true);
} else {
this.props.notifyError('Operating system is not supported.', true);
}
} else {
this.props.loadReleases();
}
};
detectUpgrades();
this.scheduledUpdateJob = Scheduler.scheduleJob('23 11 * * *', detectUpgrades);
}
componentDidUpdate(prevProps) {
if ((prevProps.Release !== this.props.Release) ||
(prevProps.ReleaseVersion !== this.props.ReleaseVersion) ||
(prevProps.VersionLookup !== this.props.VersionLookup)) {
this.props.saveState();
} else if (Object.keys(this.props.ProviderState).filter(k => {
return this.props.ProviderState[k] !== prevProps.ProviderState[k];
}).length > 0) {
this.props.saveState();
}
}
componentWillUnmount() {
Scheduler.cancelJob(this.scheduledUpdateJob);
super.componentWillUnmount();
}
getSelectedVersion = () => {
return (this.props.ReleaseVersion === -1) ?
'unavailable' :
this.props.VersionLookup[Constants.RELEASE_TYPES[this.props.Release]][this.props.ReleaseVersion];
};
handleUpgradeIconClicked = () => {
if (this.props.UpgradeAvailable) {
this.props.setDismissUIUpgrade(false)
} else if (this.props.NewReleasesAvailable2.length > 0) {
this.props.setNewReleasesAvailable(this.props.NewReleasesAvailable2);
this.props.setDismissNewReleasesAvailable(false);
}
};
render() {
const selectedVersion = this.getSelectedVersion();
const downloadEnabled = this.props.AllowDownload &&
!this.props.MountsBusy &&
!this.props.DownloadActive &&
(selectedVersion !== 'unavailable') &&
(selectedVersion !== this.props.InstalledVersion);
const missingDependencies = (this.props.MissingDependencies.length > 0) &&
this.props.AllowMount;
const allowMount = this.props.AllowMount &&
this.props.InstalledVersion !== 'none' &&
!missingDependencies &&
!this.props.InstallActive;
const remoteSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].supports_remote;
const s3Supported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].s3_support;
const skynetSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].skynet_support;
const scPrimeSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].siaprime_support;
const siaSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].sia_support;
const showConfig = !missingDependencies &&
!this.props.DisplayPinnedManager &&
this.props.DisplayConfiguration &&
!this.props.RebootRequired;
const showPinnedManager = !missingDependencies &&
!this.props.RebootRequired &&
this.props.DisplayPinnedManager;
const showUpgrade = this.props.UpgradeAvailable &&
!this.props.DisplayError &&
!showConfig &&
!this.props.DownloadActive &&
!this.props.UpgradeDismissed &&
!this.props.InstallActive &&
!this.props.RebootRequired;
const showDependencies = !showUpgrade &&
missingDependencies &&
!this.props.DownloadActive &&
!this.props.RebootRequired &&
!this.props.DismissDependencies &&
this.props.AllowMount;
const showNewReleases = !showConfig &&
!this.props.DisplayConfirmYesNo &&
!showDependencies &&
!this.props.DownloadActive &&
!this.props.DisplayError &&
!this.props.DisplayInfo &&
!this.props.InstallActive &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
!this.props.DismissNewReleasesAvailable &&
(this.props.NewReleasesAvailable.length > 0);
const showSkynetImport = !showConfig &&
!showDependencies &&
!this.props.DownloadActive &&
!showNewReleases &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
this.props.DisplayImport;
const showSkynetExport = !showConfig &&
!showDependencies &&
!this.props.DownloadActive &&
!showNewReleases &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
this.props.DisplayExport;
const configDisplay = createModalConditionally(showConfig, <Configuration
version={selectedVersion}
s3Supported={s3Supported}
remoteSupported={remoteSupported}/>);
const pinnedManagerDisplay = createModalConditionally(showPinnedManager, <PinnedManager
version={selectedVersion}/>)
const confirmDisplay = createModalConditionally(this.props.DisplayConfirmYesNo, <YesNo/>);
const dependencyDisplay = createModalConditionally(showDependencies,
<DependencyList/>, false, this.props.InstallActive);
const downloadDisplay = createModalConditionally(this.props.DownloadActive,
<DownloadProgress/>, false, true);
const errorDisplay = createModalConditionally(this.props.DisplayError, <ErrorDetails/>, true);
const infoDisplay = createModalConditionally(this.props.DisplayInfo, <InfoDetails/>, true);
const newReleasesDisplay = createModalConditionally(showNewReleases, <NewReleases/>);
const rebootDisplay = createModalConditionally(this.props.RebootRequired, <Reboot/>);
const selectAppPlatformDisplay = createModalConditionally(this.props.DisplaySelectAppPlatform,
<SelectAppPlatform/>);
const upgradeDisplay = createModalConditionally(showUpgrade, <UpgradeUI/>);
const importDisplay = createModalConditionally(showSkynetImport, <SkynetImport
version={selectedVersion}/>);
const exportDisplay = createModalConditionally(showSkynetExport, <SkynetExport
version={selectedVersion}/>)
const appBusyDisplay = createModalConditionally(this.props.AppBusy,
<ApplicationBusy/>, false, true, this.props.AppBusyTransparent);
let mainContent = [];
if (this.props.DisplaySelectAppPlatform || !this.props.AppReady) {
mainContent = (
<Box dxStyle={{height: '100%'}}>
<Loading/>
</Box>);
} else {
let key = 0;
mainContent.push((
<Box key={'md_' + key++}
dxStyle={{padding: 'var(--default_spacing)', height: 'auto'}}>
<ReleaseVersionDisplay downloadDisabled={!downloadEnabled}
version={selectedVersion}/>
</Box>
));
mainContent.push(<div key={'md_' + key++}
style={{paddingTop: 'var(--default_spacing)'}}/>);
if (allowMount) {
mainContent.push((
<Box dxStyle={{padding: 'var(--default_spacing)', height: 'auto'}}
key={'md_' + key++}>
<MountItems s3Supported={s3Supported}
remoteSupported={remoteSupported}
scPrimeSupported={scPrimeSupported}
siaSupported={siaSupported}
skynetSupported={skynetSupported}/>
</Box>
));
} else if (selectedVersion !== 'unavailable') {
mainContent.push((
<Box dxStyle={{padding: 'var(--default_spacing)', height: '170px'}}
key={'md_' + key++}>
<Loading/>
</Box>
));
}
}
return (
<div className={'App'}>
<div className={'AppContainer'}>
<div className={'AppHeader'}>
<Box>
<Grid>
<Text col={0}
colSpan={'remain'}
row={0}
rowSpan={'remain'}
text={'Repertory UI v' + this.props.Version}
textAlign={'center'}
type={'Heading1'}/>
<UpgradeIcon
available={this.props.UpgradeAvailable || (this.props.NewReleasesAvailable2.length > 0)}
newReleases={!this.props.UpgradeAvailable && (this.props.NewReleasesAvailable2.length > 0)}
clicked={this.handleUpgradeIconClicked}
col={dimensions => dimensions.columns - 6}
colSpan={5}
row={1}
rowSpan={remain => remain - 1}/>
</Grid>
</Box>
</div>
<div className={'AppContent'}>
{mainContent}
</div>
</div>
{importDisplay}
{exportDisplay}
{newReleasesDisplay}
{selectAppPlatformDisplay}
{dependencyDisplay}
{upgradeDisplay}
{pinnedManagerDisplay}
{configDisplay}
{infoDisplay}
{confirmDisplay}
{downloadDisplay}
{rebootDisplay}
{appBusyDisplay}
{errorDisplay}
</div>
);
}
}
const mapStateToProps = state => {
return {
AllowDownload: state.download.AllowDownload,
AllowMount: state.common.AllowMount,
AppPlatform: state.common.AppPlatform,
AppBusy: state.common.AppBusy,
AppBusyTransparent: state.common.AppBusyTransparent,
AppReady: state.common.AppReady,
DismissDependencies: state.install.DismissDependencies,
DisplayConfiguration: state.mounts.DisplayConfiguration,
DisplayConfirmYesNo: state.common.DisplayConfirmYesNo,
DisplayError: state.error.DisplayError,
DisplayExport: state.skynet.DisplayExport,
DisplayImport: state.skynet.DisplayImport,
DisplayInfo: state.error.DisplayInfo,
DisplayPinnedManager: state.pinned.DisplayPinnedManager,
DisplaySelectAppPlatform: state.common.DisplaySelectAppPlatform,
DismissNewReleasesAvailable: state.relver.DismissNewReleasesAvailable,
DownloadActive: state.download.DownloadActive,
InstallActive: state.install.InstallActive,
InstalledVersion: state.relver.InstalledVersion,
LocationsLookup: state.relver.LocationsLookup,
MissingDependencies: state.install.MissingDependencies,
MountsBusy: state.mounts.MountsBusy,
NewReleasesAvailable: state.relver.NewReleasesAvailable,
NewReleasesAvailable2: state.relver.NewReleasesAvailable2,
Platform: state.common.Platform,
ProviderState: state.mounts.ProviderState,
RebootRequired: state.common.RebootRequired,
Release: state.relver.Release,
ReleaseVersion: state.relver.Version,
UpgradeAvailable: state.relver.UpgradeAvailable,
UpgradeDismissed: state.relver.UpgradeDismissed,
Version: state.common.Version,
VersionLookup: state.relver.VersionLookup,
};
};
const mapDispatchToProps = dispatch => {
return {
displaySelectAppPlatform: display => dispatch(displaySelectAppPlatform(display)),
loadReleases: () => dispatch(loadReleases()),
notifyError: (msg, critical, callback) => dispatch(notifyError(msg, critical, callback)),
saveState: () => dispatch(saveState()),
setDismissNewReleasesAvailable: dismiss => dispatch(setDismissNewReleasesAvailable(dismiss)),
setNewReleasesAvailable: items => dispatch(setNewReleasesAvailable(items)),
setDismissUIUpgrade: dismiss => dispatch(setDismissUIUpgrade(dismiss)),
};
};
export default connect(mapStateToProps, mapDispatchToProps)(App);

View File

@@ -1,48 +1,46 @@
Object.defineProperty(exports, '__esModule', {value: true});
Object.defineProperty(exports, '__esModule', {value : true});
exports.DEV_PUBLIC_KEY =
'-----BEGIN PUBLIC KEY-----\n' +
'MIIEIjANBgkqhkiG9w0BAQEFAAOCBA8AMIIECgKCBAEKfZmq5mMAtD4kSt2Gc/5J\n' +
'H+HHTYtUZE6YYvsvz8TNG/bNL67ZtNRyaoMyhLTfIN4rPBNLUfD+owNS+u5Yk+lS\n' +
'ZLYyOuhoCZIFefayYqKLr42G8EeuRbx0IMzXmJtN0a4rqxlWhkYufJubpdQ+V4DF\n' +
'oeupcPdIATaadCKVeZC7A0G0uaSwoiAVMG5dZqjQW7F2LoQm3PhNkPvAybIJ6vBy\n' +
'LqdBegS1JrDn43x/pvQHzLO+l+FIG23D1F7iF+yZm3DkzBdcmi/mOMYs/rXZpBym\n' +
'2/kTuSGh5buuJCeyOwR8N3WdvXw6+KHMU/wWU8qTCTT87mYbzH4YR8HgkjkLHxAO\n' +
'5waHK6vMu0TxugCdJmVV6BSbiarJsh66VRosn7+6hlq6AdgksxqCeNELZBS+LBki\n' +
'tb5hKyL+jNZnaHiR0U7USWtmnqZG6FVVRzlCnxP7tZo5O5Ex9AAFGz5JzOzsFNbv\n' +
'xwQ0zqaTQOze+MJbkda7JfRoC6TncD0+3hoXsiaF4mCn8PqUCn0DwhglcRucZlST\n' +
'ZvDNDo1WAtxPJebb3aS6uymNhBIquQbVAWxVO4eTrOYEgutxwkHE3yO3is+ogp8d\n' +
'xot7f/+vzlbsbIDyuZBDe0fFkbTIMTU48QuUUVZpRKmKZTHQloz4EHqminbfX1sh\n' +
'M7wvDkpJEtqbc0VnG/BukUzP6e7Skvgc7eF1sI3+8jH8du2rivZeZAl7Q2f+L9JA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Vp2n+MnD1VLKlsCclHXjIciE\n' +
'W29n3G3lJ/sOta2sxqLd0j1XBQddrFXl5b609sIY81ocHqu8P2hRu5CpqJ/sGZC5\n' +
'mMH3segHBkRj0xJcfOxceRLj1a+ULIIR3xL/3f8s5Id25TDo/nqBoCvu5PeCpo6L\n' +
'9wIDAQAB\n' +
'-----END PUBLIC KEY-----';
const REPERTORY_BRANCH = '1.3.x_branch';
const REPERTORY_UI_BRANCH = '1.3.x_branch';
exports.RELEASES_URL = 'https://bitbucket.org/blockstorage/repertory/raw/' +
REPERTORY_BRANCH + '/releases_1.3.json';
REPERTORY_BRANCH + '/releases_1.3.json';
exports.UI_RELEASES_URL =
'https://bitbucket.org/blockstorage/repertory-ui/raw/' +
REPERTORY_UI_BRANCH + '/releases.json';
'https://bitbucket.org/blockstorage/repertory-ui/raw/' +
REPERTORY_UI_BRANCH + '/releases.json';
exports.LINUX_DETECT_SCRIPT_URL =
'https://bitbucket.org/blockstorage/repertory/raw/' + REPERTORY_BRANCH +
'/detect_linux2.sh';
'https://bitbucket.org/blockstorage/repertory/raw/' + REPERTORY_BRANCH +
'/detect_linux2.sh';
exports.LINUX_SELECTABLE_PLATFORMS = [
'centos7',
'debian9',
'debian10',
];
exports.WINFSP_VERSION_NAMES = [
@@ -63,15 +61,15 @@ exports.WINFSP_VERSION_NAMES = [
];
exports.DATA_LOCATIONS = {
linux: '~/.local/repertory/ui',
darwin: '~/Library/Application Support/repertory/ui',
win32: '%LOCALAPPDATA%\\repertory\\ui'
linux : '~/.local/repertory/ui',
darwin : '~/Library/Application Support/repertory/ui',
win32 : '%LOCALAPPDATA%\\repertory\\ui'
};
exports.REPERTORY_LOCATIONS = {
linux: '~/.local/repertory',
darwin: '~/Library/Application Support/repertory',
win32: '%LOCALAPPDATA%\\repertory'
linux : '~/.local/repertory',
darwin : '~/Library/Application Support/repertory',
win32 : '%LOCALAPPDATA%\\repertory'
};
exports.S3_PROVIDER_LIST = [
@@ -83,7 +81,7 @@ exports.S3_REGION_PROVIDER_REGION = [
];
exports.S3_PROVIDER_URL = {
'Filebase': 'https://s3.filebase.com',
'Filebase' : 'https://s3.filebase.com',
};
exports.PROVIDER_LIST = [
@@ -93,10 +91,10 @@ exports.PROVIDER_LIST = [
];
exports.PROVIDER_ARG = {
sia: '',
skynet: '-sk',
scprime: '-sp',
s3: '-s3',
sia : '',
skynet : '-sk',
scprime : '-sp',
s3 : '-s3',
};
exports.DEFAULT_RELEASE = 0;
@@ -108,10 +106,10 @@ exports.RELEASE_TYPES = [
];
exports.INSTALL_TYPES = {
Dependency: 'dependency',
Release: 'release',
TestRelease: 'test_release',
Upgrade: 'upgrade',
Dependency : 'dependency',
Release : 'release',
TestRelease : 'test_release',
Upgrade : 'upgrade',
};
exports.IPC_Browse_Directory = 'browse_directory';

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,18 @@
import './index.css';
import 'react-checkbox-tree/lib/react-checkbox-tree.css';
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import createAppStore from './redux/store/createAppStore';
import {getIPCRenderer} from './utils';
import packageJson from '../package.json';
import {Provider} from 'react-redux';
import {setActiveRelease} from './redux/actions/release_version_actions';
import packageJson from '../package.json';
import App from './App';
import {setProviderState} from './redux/actions/mount_actions';
import {setActiveRelease} from './redux/actions/release_version_actions';
import createAppStore from './redux/store/createAppStore';
import * as serviceWorker from './serviceWorker';
import 'react-checkbox-tree/lib/react-checkbox-tree.css';
import {getIPCRenderer} from './utils';
const Constants = require('./constants');
@@ -17,13 +20,13 @@ const ipcRenderer = getIPCRenderer();
let store;
if (ipcRenderer) {
ipcRenderer.once(Constants.IPC_Get_Platform_Reply, (event, platformInfo) => {
ipcRenderer.once(Constants.IPC_Get_Platform_Reply, (_, platformInfo) => {
if (platformInfo.Platform === 'linux') {
const root = document.documentElement;
root.style.setProperty('--default_font_size', '15.3px');
}
ipcRenderer.once(Constants.IPC_Get_State_Reply, (event, result) => {
ipcRenderer.once(Constants.IPC_Get_State_Reply, (_, result) => {
if (result.data) {
store = createAppStore(platformInfo, packageJson.version, result.data);
const providerList = [
@@ -41,7 +44,8 @@ if (ipcRenderer) {
}
store.dispatch(setProviderState(provider, state));
}
store.dispatch(setActiveRelease(result.data.Release, result.data.Version));
store.dispatch(
setActiveRelease(result.data.Release, result.data.Version));
} else {
store = createAppStore(platformInfo, packageJson.version, {});
}
@@ -57,4 +61,3 @@ if (ipcRenderer) {
});
ipcRenderer.send(Constants.IPC_Get_Platform);
}