Need private packages and team management tools?Check out npm Teams »

zombiebox-extension-about

2.1.1 • Public • Published

zombiebox-extension-about

ZombieBox extension for displaying main info about an application.

Usage

The extension provides popup About that should be integrated to the application. To do this, call About.processKey with the given key in main processKey method:

import About from 'about/about';
import BaseApplication from 'generated/zb/base-application';
 
/**
*/
export default class Application extends BaseApplication {
    /**
     * @override
     */
    processKey(zbKey, e) {
        About.processKey(zbKey);
 
        return super.processKey(zbKey, e);
    }
}

To display the information about the application press 1235789 (like Z) on the remote.

Custom key sequence

The default key sequence can be changed by calling About.setKeySequence method:

About.setKeySequence([
    Keys.DIGIT_1,
    Keys.DIGIT_2,
    Keys.DIGIT_3,
]);

Passing custom information

There is an ability to customize the displayed information. To do this, call About.setCustomDataProvider with a new function-provider:

About.setCustomDataProvider((defaultData) => {
    defaultData['apiVersion'] = app.getApiVersion();
    
    return defaultData;
});

Note: a new key must be defined by bracket notation.

Install

npm i zombiebox-extension-about

DownloadsWeekly Downloads

11

Version

2.1.1

License

MIT

Unpacked Size

110 kB

Total Files

30

Last publish

Collaborators

  • avatar
  • avatar