Merge pull request #3681 from urbit/mp/leap/add-home

leap: add 'home' to leap index, default results
This commit is contained in:
matildepark 2020-10-08 15:45:39 -04:00 committed by GitHub
commit 36126fd944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

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

View File

@ -120,7 +120,7 @@ export class Omnibox extends Component {
const { props } = this; const { props } = this;
this.setState({ results: this.initialResults(), query: '' }, () => { this.setState({ results: this.initialResults(), query: '' }, () => {
props.api.local.setOmnibox(); 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); props.history.push(link);
} else { } else {
window.location.href = link; 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} />; graphic = <Icon display="inline-block" verticalAlign="middle" icon='ArrowWest' mr='2' size='16px' color={iconFill} />;
} else if (icon === 'profile') { } else if (icon === 'profile') {
graphic = <Sigil color={sigilFill} classes='dib v-mid mr2' ship={window.ship} size={16} />; 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 { } else {
graphic = <Icon verticalAlign="middle" mr='2' size="16px" color={iconFill} />; graphic = <Icon verticalAlign="middle" mr='2' size="16px" color={iconFill} />;
} }