summaryrefslogtreecommitdiff
path: root/client/js/views/empty_view.js
blob: 59d336da65440684cad5b34cfec25501bfb98262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"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;