VulpesOS/assets/webapps/system.gaiamobile.org/js/bluetooth_icon.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

28 lines
796 B
JavaScript

/* global BaseIcon */
'use strict';
(function(exports) {
var BluetoothIcon = function(manager) {
BaseIcon.call(this, manager);
};
BluetoothIcon.prototype = Object.create(BaseIcon.prototype);
BluetoothIcon.prototype.name = 'BluetoothIcon';
BluetoothIcon.prototype.update = function() {
var icon = this.element;
if (!icon) {
return;
}
this.manager.isEnabled ? this.show() : this.hide();
icon.dataset.active = this.manager.connected;
this.updateLabel('bluetooth', this.manager.connected);
};
BluetoothIcon.prototype.view = function view() {
return `<div id="statusbar-bluetooth"
class="sb-icon sb-icon-bluetooth" hidden
role="listitem">
</div>`;
};
exports.BluetoothIcon = BluetoothIcon;
}(window));