Use AppPlatform for releases
This commit is contained in:
23
src/App.js
23
src/App.js
@@ -276,8 +276,8 @@ class App extends IPCContainer {
|
|||||||
|
|
||||||
installUpgrade = data => {
|
installUpgrade = data => {
|
||||||
if (data.Success) {
|
if (data.Success) {
|
||||||
const sha256 = this.state.LocationsLookup[this.props.Platform][this.state.VersionLookup[this.props.Platform][0]].sha256;
|
const sha256 = this.state.LocationsLookup[this.props.AppPlatform][this.state.VersionLookup[this.props.AppPlatform][0]].sha256;
|
||||||
const signature = this.state.LocationsLookup[this.props.Platform][this.state.VersionLookup[this.props.Platform][0]].sig;
|
const signature = this.state.LocationsLookup[this.props.AppPlatform][this.state.VersionLookup[this.props.AppPlatform][0]].sig;
|
||||||
this.sendRequest(Constants.IPC_Install_Upgrade, {
|
this.sendRequest(Constants.IPC_Install_Upgrade, {
|
||||||
Sha256: sha256,
|
Sha256: sha256,
|
||||||
Signature: signature,
|
Signature: signature,
|
||||||
@@ -408,13 +408,13 @@ class App extends IPCContainer {
|
|||||||
.get(Constants.RELEASES_URL)
|
.get(Constants.RELEASES_URL)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
const versionLookup = {
|
const versionLookup = {
|
||||||
Alpha: response.data.Versions.Alpha[this.props.Platform],
|
Alpha: response.data.Versions.Alpha[this.props.AppPlatform],
|
||||||
Beta: response.data.Versions.Beta[this.props.Platform],
|
Beta: response.data.Versions.Beta[this.props.AppPlatform],
|
||||||
RC: response.data.Versions.RC[this.props.Platform],
|
RC: response.data.Versions.RC[this.props.AppPlatform],
|
||||||
Release: response.data.Versions.Release[this.props.Platform],
|
Release: response.data.Versions.Release[this.props.AppPlatform],
|
||||||
};
|
};
|
||||||
const locationsLookup = {
|
const locationsLookup = {
|
||||||
...response.data.Locations[this.props.Platform],
|
...response.data.Locations[this.props.AppPlatform],
|
||||||
};
|
};
|
||||||
|
|
||||||
window.localStorage.setItem('releases', JSON.stringify({
|
window.localStorage.setItem('releases', JSON.stringify({
|
||||||
@@ -443,13 +443,13 @@ class App extends IPCContainer {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
if (data.Versions &&
|
if (data.Versions &&
|
||||||
data.Versions[this.props.Platform] &&
|
data.Versions[this.props.AppPlatform] &&
|
||||||
(data.Versions[this.props.Platform].length > 0) &&
|
(data.Versions[this.props.AppPlatform].length > 0) &&
|
||||||
(data.Versions[this.props.Platform][0] !== this.props.version)) {
|
(data.Versions[this.props.AppPlatform][0] !== this.props.version)) {
|
||||||
this.setState({
|
this.setState({
|
||||||
UpgradeAvailable: true,
|
UpgradeAvailable: true,
|
||||||
UpgradeDismissed: false,
|
UpgradeDismissed: false,
|
||||||
UpgradeData: data.Locations[this.props.Platform][data.Versions[this.props.Platform][0]],
|
UpgradeData: data.Locations[this.props.AppPlatform][data.Versions[this.props.AppPlatform][0]],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@@ -720,6 +720,7 @@ class App extends IPCContainer {
|
|||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
return {
|
return {
|
||||||
|
AppPlatform: state.common.AppPlatform,
|
||||||
DisplayConfiguration: state.mounts.DisplayConfiguration,
|
DisplayConfiguration: state.mounts.DisplayConfiguration,
|
||||||
MountsBusy: state.mounts.MountsBusy,
|
MountsBusy: state.mounts.MountsBusy,
|
||||||
Platform: state.common.Platform,
|
Platform: state.common.Platform,
|
||||||
|
|||||||
Reference in New Issue
Block a user