mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-03 09:03:48 +00:00
Added pseudo privacy bar support to macOS
This commit is contained in:
@@ -291,7 +291,17 @@ function x_notifybar(title)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
||||
function macos_messagebox(title)
|
||||
{
|
||||
var ret = {};
|
||||
require('events').EventEmitter.call(ret, true)
|
||||
.createEvent('close')
|
||||
.addMethod('close', function close() { this._messageBox.close(); });
|
||||
ret._messageBox = require('message-box').create('', title, 0, ['Disconnect']);
|
||||
ret._messageBox.that = ret;
|
||||
ret._messageBox.then(function () { this.that.emit('close'); }, function () { this.that.emit('close'); });
|
||||
return (ret);
|
||||
}
|
||||
|
||||
switch(process.platform)
|
||||
{
|
||||
@@ -303,6 +313,9 @@ switch(process.platform)
|
||||
case 'freebsd':
|
||||
module.exports = x_notifybar_check;
|
||||
break;
|
||||
case 'darwin':
|
||||
module.exports = macos_messagebox;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user