leap: render custom app tiles

Fixes urbit/landscape#915
This commit is contained in:
Matilde Park 2021-05-28 17:42:19 -04:00
parent 7ea6c246ce
commit ab95f8ec12
2 changed files with 8 additions and 5 deletions

View File

@ -53,16 +53,16 @@ const appIndex = function (apps) {
const applications = [];
Object.keys(apps)
.filter((e) => {
return apps[e]?.type?.basic;
return !['weather','clock'].includes(e);
})
.sort((a, b) => {
return a.localeCompare(b);
})
.map((e) => {
const obj = result(
apps[e].type.basic.title,
apps[e].type.basic.linkedUrl,
apps[e].type.basic.title,
apps[e].type?.basic?.title || apps[e].type.custom?.tile || e,
apps[e]?.type.basic?.linkedUrl || apps[e]?.type.custom?.linkedUrl || '',
apps[e]?.type?.basic?.title || apps[e].type.custom?.tile || e,
null
);
applications.push(obj);

View File

@ -81,12 +81,15 @@ export class OmniboxResult extends Component<OmniboxResultProps, OmniboxResultSt
if (
defaultApps.includes(icon.toLowerCase()) ||
icon.toLowerCase() === 'links' ||
icon.toLowerCase() === 'terminal'
icon.toLowerCase() === 'terminal' ||
icon === 'btc-wallet'
) {
if (icon === 'Link') {
icon = 'Collection';
} else if (icon === 'Terminal') {
icon = 'Dojo';
} else if (icon === 'btc-wallet') {
icon = 'Bitcoin';
}
graphic = (
<Icon