Skip to content
2 changes: 1 addition & 1 deletion accelerator-home-ui/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"log": true,
"enableAppSuspended": true,
"showVersion": false,
"version": "5.0.9"
"version": "5.0.12"
}
}
30 changes: 9 additions & 21 deletions accelerator-home-ui/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,19 +807,13 @@ export default class App extends Router.App {
try {
await appApi.getPluginStatus("Cobalt").then(async res => {
params.applications.push({
"cors": [".youtube.com"],
"cors": ".youtube.com",
"name": "YouTube",
"prefix": "myYoutube",
"properties": {
"allowStop": false
}
"prefix": "myYoutube"
}, {
"cors": [".youtube.com"],
"cors": ".youtube.com",
"name": "YouTubeTV",
"prefix": "myYouTubeTV",
"properties": {
"allowStop": false
}
"prefix": "myYouTubeTV"
});
});
} catch (e) {
Expand All @@ -828,12 +822,9 @@ export default class App extends Router.App {
try {
await appApi.getPluginStatus("Amazon").then(async res => {
params.applications.push({
"name": ["AmazonInstantVideo"],
"prefixes": ["myPrimeVideo"],
"cors": [".amazon.com"],
"properties": {
"allowStop": true
}
"name": "AmazonInstantVideo",
"prefix": "myPrimeVideo",
"cors": ".amazon.com"
})
});
} catch (e) {
Expand All @@ -843,11 +834,8 @@ export default class App extends Router.App {
await appApi.getPluginStatus("Netflix").then(async res => {
params.applications.push({
"name": "Netflix",
"prefixes": ["myNetflix"],
"cors": [".netflix.com"],
"properties": {
"allowStop": true
}
"prefix": "myNetflix",
"cors": ".netflix.com"
})
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion accelerator-home-ui/src/items/AppCatalogItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default class AppCatalogItem extends Lightning.Component {
}
let installedApps = await getInstalledDACApps()
this._app.isInstalled = installedApps.find((a) => {
return a.id === this._app.id
return a.id === this._app.id && a.installed && a.installed.length > 0
})
if (this._app.isInstalled === undefined)
this._app.isInstalled = false
Expand Down
28 changes: 17 additions & 11 deletions accelerator-home-ui/src/items/AppStoreItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export default class AppStoreItem extends Lightning.Component {
src: data.icon,
});
}
this.tag('Text').text.text = data.installed[0].appName
if (data.installed && data.installed.length > 0 && data.installed[0].appName) {
this.tag('Text').text.text = data.installed[0].appName;
}
}

static get width() {
Expand All @@ -90,10 +92,12 @@ export default class AppStoreItem extends Lightning.Component {
this._app.isUnInstalling = false
this._buttonIndex = 0;
if (Storage.get("CloudAppStore")) {
let icon = await fetchAppIcon(this.data.id, this.data.installed[0].version)
this.tag('Image').patch({
src: icon,
});
if (this.data.installed && this.data.installed.length > 0 && this.data.installed[0].version) {
let icon = await fetchAppIcon(this.data.id, this.data.installed[0].version)
this.tag('Image').patch({
src: icon,
});
}
}
else {
let icon = await fetchLocalAppIcon(this.data.id)
Expand All @@ -118,11 +122,13 @@ export default class AppStoreItem extends Lightning.Component {
this.tag("Text").alpha = 0
}
async _handleEnter() {
this._app.url = this.data.installed[0].url
this._app.id = this.data.id
this._app.name = this.data.installed[0].appName
this._app.version = this.data.installed[0].version
this._app.type = this.data.type
this._app.isRunning = await startDACApp(this._app);
if (this.data.installed && this.data.installed.length > 0) {
this._app.url = this.data.installed[0].url
this._app.id = this.data.id
this._app.name = this.data.installed[0].appName
this._app.version = this.data.installed[0].version
this._app.type = this.data.type
this._app.isRunning = await startDACApp(this._app);
}
}
}
4 changes: 3 additions & 1 deletion accelerator-home-ui/src/items/ManageAppItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export default class ManageAppItem extends Lightning.Component {
src: data.icon,
});
}
this.tag('Text').text.text = data.installed[0].appName
if (data.installed && data.installed.length > 0 && data.installed[0].appName) {
this.tag('Text').text.text = data.installed[0].appName;
}
}

static get width() {
Expand Down
15 changes: 12 additions & 3 deletions accelerator-home-ui/src/views/AppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export default class AppStore extends Lightning.Component {
this.options = {
0: async () => {
const installedApplications = await getInstalledDACApps()
this.tag('Apps').add(installedApplications.map((element) => {
const appsWithInstalled = installedApplications.filter(app =>
app.installed && app.installed.length > 0
)
this.tag('Apps').add(appsWithInstalled.map((element) => {
return { h: AppStoreItem.height + 90, w: AppStoreItem.width, info: element }
}));
},
Expand All @@ -109,13 +112,19 @@ export default class AppStore extends Lightning.Component {
},
2: async () => {
const installedApplications = await getInstalledDACApps()
this.tag('ManagedApps').add(installedApplications.map((element) => {
const appsWithInstalled = installedApplications.filter(app =>
app.installed && app.installed.length > 0
)
this.tag('ManagedApps').add(appsWithInstalled.map((element) => {
return { h: ManageAppItem.height + 90, w: ManageAppItem.width, info: element }
}));
},
}
const installedApps = await getInstalledDACApps()
if (Object.keys(installedApps).length === 0) {
const appsWithInstalled = installedApps.filter(app =>
app.installed && app.installed.length > 0
)
if (appsWithInstalled.length === 0) {
this.tag('Options').setIndex(1)
this.options[1]()
this._setState('Catalog')
Expand Down