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:
@ -1,5 +1,5 @@
|
||||
import * as DOM from "../services/dom";
|
||||
import {Component} from "./component";
|
||||
import * as DOM from '../services/dom';
|
||||
import {Component} from './component';
|
||||
|
||||
export class TemplateManager extends Component {
|
||||
|
||||
@ -66,7 +66,7 @@ export class TemplateManager extends Component {
|
||||
|
||||
async insertTemplate(templateId, action = 'replace') {
|
||||
const resp = await window.$http.get(`/templates/${templateId}`);
|
||||
const eventName = 'editor::' + action;
|
||||
const eventName = `editor::${action}`;
|
||||
window.$events.emit(eventName, resp.data);
|
||||
}
|
||||
|
||||
@ -79,10 +79,11 @@ export class TemplateManager extends Component {
|
||||
|
||||
async performSearch() {
|
||||
const searchTerm = this.searchInput.value;
|
||||
const resp = await window.$http.get(`/templates`, {
|
||||
search: searchTerm
|
||||
const resp = await window.$http.get('/templates', {
|
||||
search: searchTerm,
|
||||
});
|
||||
this.searchCancel.style.display = searchTerm ? 'block' : 'none';
|
||||
this.list.innerHTML = resp.data;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user