1
0
mirror of https://github.com/moparisthebest/mail synced 2024-10-31 15:25:01 -04:00
mail/src/js/app-config.js

113 lines
5.4 KiB
JavaScript
Raw Normal View History

2014-10-02 16:05:44 -04:00
'use strict';
2013-03-13 11:58:46 -04:00
var appCfg = {};
var ngModule = angular.module('woAppConfig', []);
ngModule.factory('appConfig', function() {
return appCfg;
});
module.exports = appCfg;
2014-10-02 16:05:44 -04:00
/**
* Global app configurations
*/
appCfg.config = {
pgpComment: 'Whiteout Mail - https://whiteout.io',
keyServerUrl: 'https://keys.whiteout.io',
hkpUrl: 'http://keyserver.ubuntu.com',
2014-10-02 16:05:44 -04:00
adminUrl: 'https://admin-node.whiteout.io',
settingsUrl: 'https://settings.whiteout.io/autodiscovery/',
mailServer: {
domain: 'wmail.io',
imap: {
hostname: 'imap.wmail.io',
port: 993,
secure: true
},
smtp: {
hostname: 'smtp.wmail.io',
port: 465,
secure: true
}
},
oauthDomains: [/\.gmail\.com$/, /\.googlemail\.com$/],
ignoreUploadOnSentDomains: [/\.gmail\.com$/, /\.googlemail\.com$/],
2014-10-02 16:05:44 -04:00
serverPrivateKeyId: 'EE342F0DDBB0F3BE',
symKeySize: 256,
symIvSize: 96,
asymKeySize: 2048,
workerPath: 'js',
reconnectInterval: 10000,
checkOutboxInterval: 5000,
iconPath: '/img/icon-128-chrome.png',
verificationUrl: '/verify/',
verificationUuidLength: 36,
2015-04-07 11:15:38 -04:00
dbVersion: 6,
2014-10-22 12:17:40 -04:00
appVersion: undefined,
2014-10-02 16:05:44 -04:00
outboxMailboxPath: 'OUTBOX',
outboxMailboxName: 'Outbox',
outboxMailboxType: 'Outbox',
connDocTimeout: 5000,
imapUpdateBatchSize: 25
};
2014-10-22 12:17:40 -04:00
// parse manifest to get configurations for current runtime
if (typeof chrome !== 'undefined' && chrome.runtime && chrome.runtime.getManifest) {
setConfigParams(chrome.runtime.getManifest());
} else if (typeof $ !== 'undefined' && $.get) {
$.get('/manifest.json', setConfigParams, 'json');
}
function setConfigParams(manifest) {
var cfg = appCfg.config;
function getUrl(beginsWith) {
return _.find(manifest.permissions, function(permission) {
return typeof permission === 'string' && permission.indexOf(beginsWith) === 0;
}).replace(/\/$/, ''); // remove last '/' from url due to required syntax in manifest
}
2014-10-22 12:17:40 -04:00
// get key server base url
cfg.keyServerUrl = getUrl('https://keys');
2014-10-22 12:17:40 -04:00
// get the app version
cfg.appVersion = manifest.version;
}
2014-10-02 16:05:44 -04:00
/**
* Strings are maintained here
*/
appCfg.string = {
2014-10-02 16:05:44 -04:00
fallbackSubject: '(no subject)',
invitationSubject: 'Invitation to a private conversation',
invitationMessage: 'Hi,\n\nI use Whiteout Mail to send and receive encrypted email. I would like to exchange encrypted messages with you as well.\n\nPlease install the Whiteout Mail application. This application makes it easy to read and write messages securely with PGP encryption applied.\n\nGo to the Whiteout Networks homepage to learn more and to download the application: https://whiteout.io\n\n',
signature: '\n\n\n--\nSent from Whiteout Mail - https://whiteout.io\n\nMy PGP key: ',
webSite: 'http://whiteout.io',
verificationSubject: '[whiteout] New public key uploaded',
sendBtnClear: 'Send',
sendBtnSecure: 'Send securely',
updatePublicKeyTitle: 'Public Key Updated',
updatePublicKeyMsgNewKey: '{0} updated his key and may not be able to read encrypted messages sent with his old key. Update the key?',
updatePublicKeyMsgRemovedKey: '{0} revoked his key and may no longer be able to read encrypted messages. Remove the key?',
updatePublicKeyPosBtn: 'Yes',
updatePublicKeyNegBtn: 'No',
outdatedCertificateTitle: 'Warning',
outdatedCertificateMessage: 'The SSL certificate for the mail server {0} changed, the connection was refused.',
updateCertificateTitle: 'Warning',
updateCertificateMessage: 'The SSL certificate for the mail server {0} changed. Do you want to proceed?',
updateCertificatePosBtn: 'Yes',
updateCertificateNegBtn: 'No',
certificateFaqLink: 'https://github.com/whiteout-io/mail-html5/wiki/FAQ#what-does-the-ssl-certificate-for-the-mail-server--changed-mean',
bugReportTitle: 'Report a bug',
bugReportSubject: '[Bug] I want to report a bug',
bugReportBody: 'Steps to reproduce\n1. \n2. \n3. \n\nWhat happens?\n\n\nWhat do you expect to happen instead?\n\n\n\n== PLEASE DONT PUT ANY KEYS HERE! ==\n\n\n## Log\n\nBelow is the log. It includes your interactions with your email provider in an anonymized way from the point where you started the app for the last time. Any information provided by you will be used for the porpose of locating and fixing the bug you reported. It will be deleted subsequently. However, you can edit this log and/or remove log data in the event that something would show up.\n\nUser-Agent: {0}\nVersion: {1}\n\n',
2014-10-02 16:05:44 -04:00
supportAddress: 'mail.support@whiteout.io',
connDocOffline: 'It appears that you are offline. Please retry when you are online.',
connDocTlsWrongCert: 'A connection to {0} was rejected because the TLS certificate is invalid. Please have a look at the FAQ for information on how to fix this error.',
connDocHostUnreachable: 'We could not establish a connection to {0}. Please check the server settings!',
connDocHostTimeout: 'We could not establish a connection to {0} within {1} ms. Please check the server settings and encryption mode!',
connDocAuthRejected: 'Your credentials for {0} were rejected. Please check your username and password!',
connDocNoInbox: 'We could not detect an IMAP inbox folder on {0}. Please have a look at the FAQ for information on how to fix this error.',
connDocGenericError: 'There was an error connecting to {0}: {1}',
logoutTitle: 'Logout',
logoutMessage: 'Are you sure you want to logout?'
2014-10-02 16:05:44 -04:00
};