2023-07-10 09:53:00 +00:00
|
|
|
import GObject from 'gi://GObject';
|
|
|
|
import Shell from 'gi://Shell';
|
2023-07-13 21:34:30 +00:00
|
|
|
|
2023-07-10 09:53:00 +00:00
|
|
|
import {SystemIndicator} from '../quickSettings.js';
|
2023-07-13 21:34:30 +00:00
|
|
|
|
2023-07-10 09:53:00 +00:00
|
|
|
export const Indicator = GObject.registerClass(
|
2023-07-13 21:34:30 +00:00
|
|
|
class Indicator extends SystemIndicator {
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
|
|
|
|
this._indicator = this._addIndicator();
|
|
|
|
this._indicator.icon_name = 'camera-web-symbolic';
|
|
|
|
this._indicator.add_style_class_name('privacy-indicator');
|
|
|
|
|
|
|
|
this._cameraMonitor = new Shell.CameraMonitor();
|
|
|
|
this._cameraMonitor.bind_property('cameras-in-use', this._indicator,
|
|
|
|
'visible', GObject.BindingFlags.SYNC_CREATE);
|
|
|
|
}
|
|
|
|
});
|