VulpesOS/assets/webapps/system.gaiamobile.org/js/mute_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

29 lines
846 B
JavaScript

/* global BaseIcon */
'use strict';
(function(exports) {
var MuteIcon = function(manager) {
BaseIcon.call(this, manager);
};
MuteIcon.prototype = Object.create(BaseIcon.prototype);
MuteIcon.prototype.name = 'MuteIcon';
MuteIcon.prototype.update = function() {
if (!this.element || !this.enabled()) {
return;
}
var muteState = this.manager.vibrationEnabled ? 'vibration' : 'mute';
this.element.classList.toggle('vibration', muteState === 'vibration');
this.updateLabel(muteState);
this.manager.currentVolume.notification === 0 ?
this.show() : this.hide();
};
MuteIcon.prototype.view = function view() {
return `<div id="statusbar-mute"
class="sb-icon sb-icon-mute"
hidden role="listitem">
</div>`;
};
exports.MuteIcon = MuteIcon;
}(window));