-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathextension.js
33 lines (30 loc) · 1.12 KB
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import Logger from './src/utils/Logger.js';
import Config from './src/config/Config.js';
import {TabPanel} from './src/TabPanel.js';
export const getExtensionObject = () => globalThis.DockerContainersExtension;
export default class AppTabsExtension extends Extension {
enable() {
globalThis.DockerContainersExtension = this;
this._logger = new Logger("AppTabsExtension")
this._config = new Config();
this._tabs = new TabPanel(
{
config: this._config,
settings: this.getSettings()
});
this._logger.info("Enabling extension...");
Main.panel.addToStatusArea(
'AppTabs', this._tabs, this._config.index, this._config.side
)
}
disable() {
delete globalThis.DockerContainersExtension;
this._logger.info("Disabling extension...");
this._logger = null;
this._config = null;
this._tabs.destroy();
this._tabs = null;
}
}