leap: add 'home' to leap index, default results

This commit is contained in:
Matilde Park 2020-10-08 14:31:23 -04:00
parent e2b1134e58
commit 0625c6f500
3 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,7 @@ const commandIndex = function (currentGroup) {
const otherIndex = function() {
const other = [];
other.push(result('Home', '/~landscape/home', 'home', null));
other.push(result('Profile and Settings', '/~profile/identity', 'profile', null));
other.push(result('Log Out', '/~/logout', 'logout', null));

View File

@ -120,7 +120,7 @@ export class Omnibox extends Component {
const { props } = this;
this.setState({ results: this.initialResults(), query: '' }, () => {
props.api.local.setOmnibox();
if (defaultApps.includes(app.toLowerCase()) || app === 'profile' || app === 'Links') {
if (defaultApps.includes(app.toLowerCase()) || app === 'profile' || app === 'Links' || app === 'home') {
props.history.push(link);
} else {
window.location.href = link;

View File

@ -39,6 +39,8 @@ export class OmniboxResult extends Component {
graphic = <Icon display="inline-block" verticalAlign="middle" icon='ArrowWest' mr='2' size='16px' color={iconFill} />;
} else if (icon === 'profile') {
graphic = <Sigil color={sigilFill} classes='dib v-mid mr2' ship={window.ship} size={16} />;
} else if (icon === 'home') {
graphic = <Icon display='inline-block' verticalAlign='middle' icon='Circle' mr='2' size='16px' color={iconFill} />;
} else {
graphic = <Icon verticalAlign="middle" mr='2' size="16px" color={iconFill} />;
}