History

Sanity-check decaffeinate app.views.Mobile

Simon Legner committed 2 years ago

Commit 1997d1e1 parent 63ff7311 file · +9 −21Browse files

Unified · Split

assets/javascripts/views/layout/mobile.js+9−21
@@ -1,27 +1,16 @@
1−// TODO: This file was created by bulk-decaffeinate.
2−// Sanity-check the conversion and remove this comment.
3−/*
4− * decaffeinate suggestions:
5− * DS102: Remove unnecessary code created because of implicit returns
6− * DS206: Consider reworking classes to avoid initClass
7− * DS207: Consider shorter variations of null checks
8− * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
9− */
101 app.views.Mobile = class Mobile extends app.View {
11− static initClass() {
12− this.className = "_mobile";
2+ static className = "_mobile";
133
14− this.elements = {
15− body: "body",
16− content: "._container",
17− sidebar: "._sidebar",
18− docPicker: "._settings ._sidebar",
19− };
4+ static elements = {
5+ body: "body",
6+ content: "._container",
7+ sidebar: "._sidebar",
8+ docPicker: "._settings ._sidebar",
9+ };
2010
21− this.shortcuts = { escape: "onEscape" };
11+ static shortcuts = { escape: "onEscape" };
2212
23− this.routes = { after: "afterRoute" };
24− }
13+ static routes = { after: "afterRoute" };
2514
2615 static detect() {
2716 if (Cookies.get("override-mobile-detect") != null) {
@@ -198,4 +187,3 @@ app.views.Mobile = class Mobile extends app.View { · 170 unmodified lines
198187 }
199188 }
200189 };
201−app.views.Mobile.initClass();