From 0625c6f500e6421540f0d07bf77ac64e053c794e Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Thu, 8 Oct 2020 14:31:23 -0400 Subject: [PATCH] leap: add 'home' to leap index, default results --- pkg/interface/src/logic/lib/omnibox.js | 1 + pkg/interface/src/views/components/leap/Omnibox.js | 2 +- pkg/interface/src/views/components/leap/OmniboxResult.js | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/logic/lib/omnibox.js b/pkg/interface/src/logic/lib/omnibox.js index 74bc3bdf2..e5958866e 100644 --- a/pkg/interface/src/logic/lib/omnibox.js +++ b/pkg/interface/src/logic/lib/omnibox.js @@ -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)); diff --git a/pkg/interface/src/views/components/leap/Omnibox.js b/pkg/interface/src/views/components/leap/Omnibox.js index e72a53a48..d0cbe624b 100644 --- a/pkg/interface/src/views/components/leap/Omnibox.js +++ b/pkg/interface/src/views/components/leap/Omnibox.js @@ -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; diff --git a/pkg/interface/src/views/components/leap/OmniboxResult.js b/pkg/interface/src/views/components/leap/OmniboxResult.js index 0949a1b96..69806d945 100644 --- a/pkg/interface/src/views/components/leap/OmniboxResult.js +++ b/pkg/interface/src/views/components/leap/OmniboxResult.js @@ -39,6 +39,8 @@ export class OmniboxResult extends Component { graphic = ; } else if (icon === 'profile') { graphic = ; + } else if (icon === 'home') { + graphic = ; } else { graphic = ; }