1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Ran eslint fix on existing codebase

Had to do some manual fixing of the app.js file due to misplaced
comments
This commit is contained in:
Dan Brown
2023-04-18 22:20:02 +01:00
parent 752ee664c2
commit e711290d8b
106 changed files with 905 additions and 869 deletions

View File

@ -1,7 +1,7 @@
import {htmlToDom} from "../services/dom";
import {debounce} from "../services/util";
import {KeyboardNavigationHandler} from "../services/keyboard-navigation";
import {Component} from "./component";
import {htmlToDom} from '../services/dom';
import {debounce} from '../services/util';
import {KeyboardNavigationHandler} from '../services/keyboard-navigation';
import {Component} from './component';
/**
* Global (header) search box handling.
@ -25,12 +25,12 @@ export class GlobalSearch extends Component {
// Handle search input changes
this.input.addEventListener('input', () => {
const value = this.input.value;
const {value} = this.input;
if (value.length > 0) {
this.loadingWrap.style.display = 'block';
this.suggestionResultsWrap.style.opacity = '0.5';
updateSuggestionsDebounced(value);
} else {
} else {
this.hideSuggestions();
}
});
@ -55,7 +55,7 @@ export class GlobalSearch extends Component {
if (!this.input.value) {
return;
}
const resultDom = htmlToDom(results);
this.suggestionResultsWrap.innerHTML = '';
@ -71,7 +71,7 @@ export class GlobalSearch extends Component {
this.container.classList.add('search-active');
window.requestAnimationFrame(() => {
this.suggestions.classList.add('search-suggestions-animation');
})
});
}
hideSuggestions() {
@ -79,4 +79,5 @@ export class GlobalSearch extends Component {
this.suggestions.classList.remove('search-suggestions-animation');
this.suggestionResultsWrap.innerHTML = '';
}
}
}