Skip to content

Commit

Permalink
adding static get name on the plugins class
Browse files Browse the repository at this point in the history
  • Loading branch information
jparez committed Sep 13, 2024
1 parent d711523 commit 0d2e2a1
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/plugins/BasebandRIL.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const OverlayPlugin = require('./util/OverlayPlugin');
* Provides Baseband and RIL informations control.
*/
module.exports = class BasebandRIL extends OverlayPlugin {
static get name() {
return 'BaseBandRil';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Battery.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const OverlayPlugin = require('./util/OverlayPlugin');
* Provides battery level and state control.
*/
module.exports = class Battery extends OverlayPlugin {
static get NAME() {
return 'Battery';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ log.setDefaultLevel('debug');
* Provides client webcam and camera control.
*/
module.exports = class Camera extends OverlayPlugin {
static get name() {
return 'Camera';
}
/**
* Plugin initialization.
*
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const QUART = Math.PI / 2;
* Provides file upload support and Open GApps installation control.
*/
module.exports = class FileUpload extends OverlayPlugin {
static get name() {
return 'FileUpload';
}
/**
* Plugin initialization.
*
Expand Down Expand Up @@ -137,7 +140,7 @@ module.exports = class FileUpload extends OverlayPlugin {

// Generate title
this.title = document.createElement('div');
this.title.className = 'gm-upload-title';
this.title.className = 'gm-title';
this.container.appendChild(this.title);

// Generate input rows
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/FingerPrint.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const FINGERPRINT_MESSAGES = {
},
};
module.exports = class FingerPrint extends OverlayPlugin {
static get name() {
return 'FingerPrint';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Gives the ability to display the renderer on the whole screen.
*/
module.exports = class Fullscreen {
static get name() {
return 'Fullscreen';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/GPS.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ log.setDefaultLevel('debug');
* Provides GPS control.
*/
module.exports = class GPS extends OverlayPlugin {
static get name() {
return 'GPS';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Gamepad.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const OverlayPlugin = require('./util/OverlayPlugin');
* Instance gamepad plugin.
*/
module.exports = class Gamepad extends OverlayPlugin {
static get name() {
return 'Gamepad';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/IOThrottling.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const BYTES_PER_MEGABYTE = BYTES_PER_KILOBYTE << 10;
* Provides disk I/O control.
*/
module.exports = class IOThrottling extends OverlayPlugin {
static get name() {
return 'IOThrottling';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Identifiers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const DIGITS = '0123456789';
* Provides device ID (IMEI) and Android ID control.
*/
module.exports = class Identifiers extends OverlayPlugin {
static get name() {
return 'Identifiers';
}
/**
* Plugin initialization.
*
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/KeyboardEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const CTRL_SHORTCUT_KEYS = {
* Translate and forward keyboard events to instance.
*/
module.exports = class KeyboardEvents {
static get name() {
return 'KeyboardEvents';
}

/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/KeyboardMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ const {generateUID} = require('../utils/helpers');
*/

module.exports = class KeyboardMapping {
static get name() {
return 'KeyboardMapping';
}
/**
* Plugin initialization.
*
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/MouseEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* Forward touch events to instance.
*/
module.exports = class MouseEvents {
static get name() {
return 'MouseEvents';
}

/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/MultiTouchEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Forward multi touch events to instance.
*/
module.exports = class MultiTouchEvents {
static get name() {
return 'MultiTouchEvents';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Network.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const MOBILE_SIGNAL_STRENGTH = require('./util/mobile-signal-strength');
* Provides network I/O control.
*/
module.exports = class Network extends OverlayPlugin {
static get name() {
return 'Network';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Phone.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const OverlayPlugin = require('./util/OverlayPlugin');
* Provides phone call and SMS support.
*/
module.exports = class Phone extends OverlayPlugin {
static get name() {
return 'Phone';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/Screencast.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const CAPTURE_INTERVAL_MS = 50;
* Provides screenshot and video capture.
*/
module.exports = class Screencast extends OverlayPlugin {
static get name() {
return 'Screencast';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/StreamBitrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Provides video stream quality (audio and video bitrates) control.
*/
module.exports = class StreamBitrate {
static get name() {
return 'StreamBitrate';
}
/**
* Plugin initialization.
*
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/StreamResolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const RESOLUTIONS = [
* Provides video stream resolution control.
*/
module.exports = class StreamResolution {
static get name() {
return 'StreamResolution';
}
/**
* Plugin initialization.
*
Expand Down
1 change: 1 addition & 0 deletions src/plugins/util/OverlayPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class OverlayPlugin {
if (this.toolbarBtnImage) {
this.toolbarBtnImage.classList.add('gm-active');
}
console.log(this.constructor.NAME, this.constructor.name, this.constructor);

Check warning on line 64 in src/plugins/util/OverlayPlugin.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected console statement
this.instance.store.dispatch({
type: 'ADD_TRACKED_EVENT',
payload: {
Expand Down

0 comments on commit 0d2e2a1

Please sign in to comment.