2020-06-06 00:03:37 +02:00
|
|
|
"use strict";
|
2016-04-09 22:35:09 +02:00
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
const views = require("../util/views.js");
|
2016-04-09 22:35:09 +02:00
|
|
|
|
2016-06-14 10:31:48 +02:00
|
|
|
const template = () => {
|
|
|
|
return views.htmlToDom(
|
2020-06-06 00:03:37 +02:00
|
|
|
'<div class="wrapper"><div class="messages"></div></div>'
|
|
|
|
);
|
2016-06-14 10:31:48 +02:00
|
|
|
};
|
|
|
|
|
2016-04-09 22:35:09 +02:00
|
|
|
class EmptyView {
|
|
|
|
constructor() {
|
2020-06-06 00:03:37 +02:00
|
|
|
this._hostNode = document.getElementById("content-holder");
|
2016-06-14 10:31:48 +02:00
|
|
|
views.replaceContent(this._hostNode, template());
|
2016-07-13 17:18:28 +02:00
|
|
|
views.syncScrollPosition();
|
2016-04-09 22:35:09 +02:00
|
|
|
}
|
|
|
|
|
2016-06-14 10:31:48 +02:00
|
|
|
showError(message) {
|
|
|
|
views.showError(this._hostNode, message);
|
2016-04-09 22:35:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = EmptyView;
|