Sanity-check decaffeinate app.views.OfflinePage

pull/1441/head
Simon Legner 1 year ago
parent 35b38b796f
commit f9f5c2bc3d

@ -1,21 +1,10 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS206: Consider reworking classes to avoid initClass
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.views.OfflinePage = class OfflinePage extends app.View { app.views.OfflinePage = class OfflinePage extends app.View {
static initClass() { static className = "_static";
this.className = "_static";
this.events = { static events = {
click: "onClick", click: "onClick",
change: "onChange", change: "onChange",
}; };
}
deactivate() { deactivate() {
if (super.deactivate(...arguments)) { if (super.deactivate(...arguments)) {
@ -37,7 +26,7 @@ app.views.OfflinePage = class OfflinePage extends app.View {
this.html(this.tmpl("offlineError", app.db.reason, app.db.error)); this.html(this.tmpl("offlineError", app.db.reason, app.db.error));
} else { } else {
let html = ""; let html = "";
for (var doc of Array.from(app.docs.all())) { for (var doc of app.docs.all()) {
html += this.renderDoc(doc, statuses[doc.slug]); html += this.renderDoc(doc, statuses[doc.slug]);
} }
this.html(this.tmpl("offlinePage", html)); this.html(this.tmpl("offlinePage", html));
@ -154,4 +143,3 @@ app.views.OfflinePage = class OfflinePage extends app.View {
} }
} }
}; };
app.views.OfflinePage.initClass();

Loading…
Cancel
Save