mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
leap: index unmanaged reosurces to '/home' path
This commit is contained in:
parent
36126fd944
commit
54fcd38e3d
@ -37,7 +37,7 @@ const otherIndex = function() {
|
||||
return other;
|
||||
};
|
||||
|
||||
export default function index(associations, apps, currentGroup) {
|
||||
export default function index(associations, apps, currentGroup, groups) {
|
||||
// all metadata from all apps is indexed
|
||||
// into subscriptions and landscape
|
||||
const subscriptions = [];
|
||||
@ -75,9 +75,11 @@ export default function index(associations, apps, currentGroup) {
|
||||
landscape.push(obj);
|
||||
} else {
|
||||
const app = each.metadata.module || each['app-name'];
|
||||
const group = (groups[each['group-path']]?.hidden)
|
||||
? '/home' : each['group-path'];
|
||||
const obj = result(
|
||||
title,
|
||||
`/~landscape${each['group-path']}/join/${app}${each['app-path']}`,
|
||||
`/~landscape${group}/join/${app}${each['app-path']}`,
|
||||
app.charAt(0).toUpperCase() + app.slice(1),
|
||||
(associations?.contacts?.[each['group-path']]?.metadata?.title || null)
|
||||
);
|
||||
|
@ -150,6 +150,7 @@ class App extends React.Component {
|
||||
apps={state.launch}
|
||||
api={this.api}
|
||||
dark={state.dark}
|
||||
groups={state.groups}
|
||||
show={state.omniboxShown}
|
||||
/>
|
||||
</ErrorBoundary>
|
||||
|
@ -31,7 +31,7 @@ export class Omnibox extends Component {
|
||||
const { pathname } = this.props.location;
|
||||
const selectedGroup = pathname.startsWith('/~landscape/ship/') ? '/' + pathname.split('/').slice(2,5).join('/') : null;
|
||||
|
||||
this.setState({ index: index(this.props.associations, this.props.apps.tiles, selectedGroup) });
|
||||
this.setState({ index: index(this.props.associations, this.props.apps.tiles, selectedGroup, this.props.groups) });
|
||||
}
|
||||
|
||||
if (prevProps && (prevProps.apps !== this.props.apps) && (this.state.query === '')) {
|
||||
|
Loading…
Reference in New Issue
Block a user