szurubooru/client/js/views/empty_view.js
2016-07-13 17:18:28 +02:00

22 lines
503 B
JavaScript

'use strict';
const views = require('../util/views.js');
const template = () => {
return views.htmlToDom(
'<div class="wrapper"><div class="messages"></div></div>');
};
class EmptyView {
constructor() {
this._hostNode = document.getElementById('content-holder');
views.replaceContent(this._hostNode, template());
views.syncScrollPosition();
}
showError(message) {
views.showError(this._hostNode, message);
}
}
module.exports = EmptyView;