Unified · Split
| @@ -1,21 +1,10 @@ | |||
| 1 | // TODO: This file was created by bulk-decaffeinate. | ||
| 2 | // Sanity-check the conversion and remove this comment. | ||
| 3 | /* | ||
| 4 | * decaffeinate suggestions: | ||
| 5 | * DS101: Remove unnecessary use of Array.from | ||
| 6 | * DS102: Remove unnecessary code created because of implicit returns | ||
| 7 | * DS206: Consider reworking classes to avoid initClass | ||
| 8 | * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md | ||
| 9 | */ | ||
| 10 | app.views.OfflinePage = class OfflinePage extends app.View { | 1 | app.views.OfflinePage = class OfflinePage extends app.View { |
| 11 | static initClass() { | 2 | static className = "_static"; |
| 12 | this.className = "_static"; | ||
| 13 | 3 | ||
| 14 | this.events = { | 4 | static events = { |
| 15 | click: "onClick", | 5 | click: "onClick", |
| 16 | change: "onChange", | 6 | change: "onChange", |
| 17 | }; | 7 | }; |
| 18 | } | ||
| 19 | 8 | ||
| 20 | deactivate() { | 9 | deactivate() { |
| 21 | if (super.deactivate(...arguments)) { | 10 | if (super.deactivate(...arguments)) { |
| @@ -37,7 +26,7 @@ app.views.OfflinePage = class OfflinePage extends app.View { · 15 unmodified lines | |||
| 37 | this.html(this.tmpl("offlineError", app.db.reason, app.db.error)); | 26 | this.html(this.tmpl("offlineError", app.db.reason, app.db.error)); |
| 38 | } else { | 27 | } else { |
| 39 | let html = ""; | 28 | let html = ""; |
| 40 | for (var doc of Array.from(app.docs.all())) { | 29 | for (var doc of app.docs.all()) { |
| 41 | html += this.renderDoc(doc, statuses[doc.slug]); | 30 | html += this.renderDoc(doc, statuses[doc.slug]); |
| 42 | } | 31 | } |
| 43 | this.html(this.tmpl("offlinePage", html)); | 32 | this.html(this.tmpl("offlinePage", html)); |
| @@ -154,4 +143,3 @@ app.views.OfflinePage = class OfflinePage extends app.View { · 110 unmodified lines | |||
| 154 | } | 143 | } |
| 155 | } | 144 | } |
| 156 | }; | 145 | }; |
| 157 | app.views.OfflinePage.initClass(); | ||