diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-18 08:10:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 13:10:09 +0000 |
commit | 6cf38229b54efbbc3ae7bc174c3999f9dfa7b1d2 (patch) | |
tree | 1d47e64bf80ef2f7fd082dde956d0b214946f189 /ext/js/display | |
parent | c48cd6ff6d8dcced7baf1b27ce3ac2449944f5d7 (diff) |
Html templates update (#707)
* Simplify display template loading
* Add helper
* Rename file
* Rename for simplicity
* Create templates file
* Load
* Remove templates
* Move permissions templates
* Remove "templates" from comments
* Fix prepare
Diffstat (limited to 'ext/js/display')
-rw-r--r-- | ext/js/display/display-generator.js | 9 | ||||
-rw-r--r-- | ext/js/display/display.js | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 621ea833..65736759 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -39,12 +39,9 @@ export class DisplayGenerator { this._structuredContentGenerator = new StructuredContentGenerator(this._contentManager, document); } - /** - * @param {import('../comm/api.js').API} api - */ - async prepare(api) { - const html = await api.getDisplayTemplatesHtml(); - this._templates.load(html); + /** */ + async prepare() { + await this._templates.loadFromFiles(['/templates-display.html']); this.updateHotkeys(); } diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 4cd2d611..588508b5 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -318,7 +318,7 @@ export class Display extends EventDispatcher { // Prepare await this._hotkeyHelpController.prepare(this._application.api); - await this._displayGenerator.prepare(this._application.api); + await this._displayGenerator.prepare(); this._queryParser.prepare(); this._history.prepare(); this._optionToggleHotkeyHandler.prepare(); |