Electron support

From https://github.com/vector-im/vector-web/pull/2511 but with
just the actual electron changes
This commit is contained in:
David Baker 2016-11-02 18:49:28 +00:00
parent 8c3fed7559
commit caa3cb7d89
9 changed files with 481 additions and 3 deletions

View file

@ -16,8 +16,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import ElectronPlatform from './ElectronPlatform';
import WebPlatform from './WebPlatform';
let Platform = WebPlatform;
let Platform = null;
if (window && window.process && window.process && window.process.type === 'renderer') {
// we're running inside electron
Platform = ElectronPlatform;
} else {
Platform = WebPlatform;
}
export default Platform;