mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-02 12:05:28 +03:00
commit
273bc9c0f3
@ -4,7 +4,7 @@
|
||||
<title>OS1</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no,maximum-scale=1"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-touch-fullscreen" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
|
@ -68,6 +68,7 @@ export class Omnibox extends Component {
|
||||
}
|
||||
|
||||
if (evt.key === 'Enter') {
|
||||
evt.preventDefault();
|
||||
if (this.state.selected !== '') {
|
||||
this.navigate(this.state.selected);
|
||||
} else {
|
||||
@ -103,7 +104,7 @@ export class Omnibox extends Component {
|
||||
|
||||
search(event) {
|
||||
const { state } = this;
|
||||
const query = event.target.value;
|
||||
let query = event.target.value;
|
||||
const results = this.initialResults();
|
||||
|
||||
this.setState({ query: query });
|
||||
@ -119,6 +120,8 @@ export class Omnibox extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
query = query.toLowerCase();
|
||||
|
||||
['commands', 'subscriptions', 'groups', 'apps'].map((category) => {
|
||||
const categoryIndex = state.index.get(category);
|
||||
results.set(category,
|
||||
@ -189,7 +192,7 @@ export class Omnibox extends Component {
|
||||
{categoryResult}
|
||||
</Box>;
|
||||
|
||||
['commands', 'subscriptions', 'groups', 'apps'].map((category, i) => {
|
||||
['apps', 'commands', 'groups', 'subscriptions'].map((category, i) => {
|
||||
const categoryResults = state.results.get(category);
|
||||
if (categoryResults.length > 0) {
|
||||
const each = categoryResults.map((result, i) => {
|
||||
@ -214,7 +217,7 @@ export class Omnibox extends Component {
|
||||
|
||||
return (
|
||||
<Box
|
||||
backgroundColor='lightGray'
|
||||
backgroundColor='scales.black30'
|
||||
width='100vw'
|
||||
height='100vh'
|
||||
position='absolute'
|
||||
|
@ -15,6 +15,7 @@ export class OmniboxInput extends Component {
|
||||
placeholder='Search...'
|
||||
onKeyDown={props.control}
|
||||
onChange={props.search}
|
||||
spellCheck={false}
|
||||
value={props.query}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user