VulpesOS/gaia/apps/bluetooth/js/views/pair_expired_dialog.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

39 lines
890 B
JavaScript
Executable file

/*
* PairExpiredDialog is responsible for:
* Notify a user that the earlier pairing request which fired in
* notification center is expired. There is a prompt handling via here.
*/
define(function(require) {
'use strict';
var PairExpiredDialog = {
init: function() {
this.dialog = document.getElementById('pairing-request-timeout');
this.confirmBtn =
document.getElementById('incoming-pairing-timeout-confirm');
},
showConfirm: function(callback) {
var self = this;
this.confirmBtn.onclick = function() {
self.close();
if (callback) {
callback();
}
};
this.dialog.hidden = false;
},
get isVisible() {
return (!this.dialog.hidden);
},
close: function() {
this.dialog.hidden = true;
}
};
PairExpiredDialog.init();
return PairExpiredDialog;
});