load SessionPasswordPrompt directly from password_preload.js

pull/1260/head
Audric Ackermann 5 years ago
parent 1d34be1176
commit 30964e5008
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1,15 +0,0 @@
// The idea with this file is to make it webpackable for the style guide
const {
SessionPasswordPrompt,
} = require('../../ts/components/session/SessionPasswordPrompt');
exports.setup = () => {
const Components = {
SessionPasswordPrompt,
};
return {
Components,
};
};

@ -21,17 +21,18 @@ window.getEnvironment = () => config.environment;
window.getVersion = () => config.version;
window.getAppInstance = () => config.appInstance;
// So far we're only using this for Signal.Types
const Signal = require('./js/modules/signal_password');
const electron = require('electron');
const ipc = electron.ipcRenderer;
window.Signal = Signal.setup({
Attachments: null,
userDataPath: null,
getRegionCode: () => null,
});
const {
SessionPasswordPrompt,
} = require('./ts/components/session/SessionPasswordPrompt');
window.Signal = {
Components: {
SessionPasswordPrompt,
},
}
window.CONSTANTS = {
MAX_LOGIN_TRIES: 3,

Loading…
Cancel
Save