diff --git a/pkg/interface/src/App.js b/pkg/interface/src/App.js index 283be53cb..f88524431 100644 --- a/pkg/interface/src/App.js +++ b/pkg/interface/src/App.js @@ -145,6 +145,7 @@ class App extends React.Component { api={this.api} connection={this.state.connection} subscription={this.subscription} + ship={this.ship} /> { return ( <> { return ( <> { const location = useLocation(); const atHome = Boolean(location.pathname === '/'); const display = (!window.location.href.includes('popout/')) - ? 'db' : 'dn'; + ? 'grid' : 'none'; const invites = (props.invites && props.invites['/contacts']) ? props.invites['/contacts'] : {}; - const Notification = (Object.keys(invites).length > 0) - ? - : null; const metaKey = (window.navigator.platform.includes('Mac')) ? '⌘' : 'Ctrl+'; - const mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test( - navigator.userAgent - ); - return ( -
-
+ + {atHome ? null : ( - props.history.push('/')}> + props.history.push('/')}> - + )} - props.api.local.setOmnibox()}> + props.api.local.setOmnibox()}> Leap - + {metaKey}/ - + -
-
- props.history.push('/~groups')}> + + + props.history.push('/~groups')} mr={2} badge={Object.keys(invites).length > 0}> - {Notification} - Groups - -
-
+ Groups + + props.history.push('/~profile')}> + + {props.ship} + + + +
); }; diff --git a/pkg/interface/src/components/StatusBarItem.tsx b/pkg/interface/src/components/StatusBarItem.tsx new file mode 100644 index 000000000..3d33eaef6 --- /dev/null +++ b/pkg/interface/src/components/StatusBarItem.tsx @@ -0,0 +1,42 @@ +import React, { ReactNode } from "react"; +import { Row as _Row, Icon } from "@tlon/indigo-react"; +import styled from "styled-components"; + +const Row = styled(_Row)` + cursor: pointer; +`; + +type StatusBarItemProps = Parameters[0] & { badge?: boolean }; + +export function StatusBarItem({ + badge, + children, + ...props +}: StatusBarItemProps) { + return ( + + {children} + {badge && ( + + )} + + ); +} diff --git a/pkg/interface/src/lib/omnibox.js b/pkg/interface/src/lib/omnibox.js index 2be8824f2..ab3e4b8d5 100644 --- a/pkg/interface/src/lib/omnibox.js +++ b/pkg/interface/src/lib/omnibox.js @@ -38,6 +38,8 @@ export default function index(associations, apps) { commands.push(obj); } }); + + commands.push(result('Profile', '/~profile', 'profile', null)); index.set('commands', commands); // all metadata from all apps is indexed