1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-04 16:25:07 -05:00
mail/src/js/app-config.js

68 lines
2.6 KiB
JavaScript
Raw Normal View History

define(function(require) {
'use strict';
2013-03-13 11:58:46 -04:00
var _ = require('underscore'),
app = {},
cloudUrl, clientId;
2013-04-01 17:23:25 -04:00
// parse manifest to get configurations for current runtime
try {
var manifest = chrome.runtime.getManifest();
// get key server base url
cloudUrl = _.find(manifest.permissions, function(permission) {
return typeof permission === 'string' && permission.indexOf('https://keys') === 0;
});
// remove last '/' from url due to required syntax in manifest
cloudUrl = cloudUrl.substring(0, cloudUrl.length - 1);
// get client ID for OAuth requests
clientId = manifest.oauth2.client_id;
} catch (e) {}
2013-04-01 17:23:25 -04:00
/**
* Global app configurations
*/
app.config = {
cloudUrl: cloudUrl || 'https://keys.whiteout.io',
symKeySize: 128,
symIvSize: 128,
asymKeySize: 2048,
workerPath: 'js',
gmail: {
clientId: clientId || '440907777130.apps.googleusercontent.com',
imap: {
secure: true,
port: 993,
host: 'imap.gmail.com'
},
smtp: {
secure: true,
port: 465,
host: 'smtp.gmail.com'
}
},
checkOutboxInterval: 5000,
iconPath: '/img/icon.png',
2013-12-03 07:26:29 -05:00
verificationUrl: '/verify/',
verificationUuidLength: 36
};
/**
* Strings are maintained here
*/
app.string = {
subjectPrefix: '[whiteout] ',
2014-01-16 05:58:39 -05:00
fallbackSubject: '(no subject)',
invitationSubject: 'Invitation to a private conversation',
invitationMessage: 'Hi,\n\nI would like to invite you to a private conversation!\n\nPlease install the Whiteout Mail application. This application is used to read and write messages securely with strong encryption applied.\n\nGo to the Whiteout Networks homepage to learn more and to download the application: https://whiteout.io\n\n',
2014-02-05 18:34:31 -05:00
message: 'Hi,\n\nthis is a private conversation. To read my encrypted message below, simply open it in Whiteout Mail.\n\nOpen Whiteout Mail: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg\n\n',
cryptPrefix: '-----BEGIN PGP MESSAGE-----',
cryptSuffix: '-----END PGP MESSAGE-----',
signature: '\n\n\n--\nSent from Whiteout Mail - get the app for easy end-to-end encryption\nhttps://whiteout.io\n\n',
webSite: 'http://whiteout.io',
2014-01-15 04:57:28 -05:00
verificationSubject: 'New public key uploaded',
sendBtnClear: 'Send',
sendBtnSecure: 'Secure send'
};
return app;
2013-06-10 21:14:57 -04:00
});