VulpesOS/gaia/apps/system/js/tethering_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

30 lines
827 B
JavaScript
Executable file

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