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.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,67 @@
define(
[
'./worker-router',
'./mailbridge',
'logic',
'./mailuniverse',
'exports'
],
function(
$router,
$mailbridge,
logic,
$mailuniverse,
exports
) {
'use strict';
var routerBridgeMaker = $router.registerInstanceType('bridge');
var bridgeUniqueIdentifier = 0;
function createBridgePair(universe) {
var uid = bridgeUniqueIdentifier++;
var TMB = new $mailbridge.MailBridge(universe);
var routerInfo = routerBridgeMaker.register(function(data) {
TMB.__receiveMessage(data.msg);
});
var sendMessage = routerInfo.sendMessage;
TMB.__sendMessage = function(msg) {
logic(TMB, 'send', { type: msg.type, msg: msg });
sendMessage(null, msg);
};
// Let's say hello to the main thread in order to generate a
// corresponding mailAPI.
TMB.__sendMessage({
type: 'hello',
config: universe.exposeConfigForClient()
});
}
var universe = null;
function onUniverse() {
createBridgePair(universe);
console.log("Mail universe/bridge created and notified!");
}
var sendControl = $router.registerSimple('control', function(data) {
var args = data.args;
switch (data.cmd) {
case 'hello':
universe = new $mailuniverse.MailUniverse(onUniverse, args[0]);
break;
case 'online':
case 'offline':
universe._onConnectionChange(args[0]);
break;
}
});
sendControl('hello');
////////////////////////////////////////////////////////////////////////////////
});