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