History

Sanity-check decaffeinate app.views.Mobile

Simon Legner committed 2 years ago

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

Showing the changes to assets/javascripts (1 of 1 file). Show all

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 */
10app.views.Mobile = class Mobile extends app.View {1app.views.Mobile = class Mobile extends app.View {
11 static initClass() {2 static className = "_mobile";
12 this.className = "_mobile";
13 3
14 this.elements = {4 static elements = {
15 body: "body",5 body: "body",
16 content: "._container",6 content: "._container",
17 sidebar: "._sidebar",7 sidebar: "._sidebar",
18 docPicker: "._settings ._sidebar",8 docPicker: "._settings ._sidebar",
19 };9 };
20 10
21 this.shortcuts = { escape: "onEscape" };11 static shortcuts = { escape: "onEscape" };
22 12
23 this.routes = { after: "afterRoute" };13 static routes = { after: "afterRoute" };
24 }
25 14
26 static detect() {15 static detect() {
27 if (Cookies.get("override-mobile-detect") != null) {16 if (Cookies.get("override-mobile-detect") != null) {
@@ -198,4 +187,3 @@ app.views.Mobile = class Mobile extends app.View { · 170 unmodified lines
198 }187 }
199 }188 }
200};189};
201app.views.Mobile.initClass();