import BasicWidget from "./basic_widget.js";
const TPL = `
`;
export default class SyncStatusWidget extends BasicWidget {
doRender() {
this.$widget = $(TPL);
this.$widget.hide();
this.overflowing();
}
syncInProgressEvent() {
this.showIcon('in-progress');
}
syncFinishedEvent() {
this.showIcon('online-no-changes');
}
syncFailedEvent() {
this.showIcon('offline-no-changes');
}
showIcon(className) {
this.$widget.show();
this.$widget.find('.sync-status-icon').hide();
this.$widget.find('.sync-status-' + className).show();
}
}