Electron support
From https://github.com/vector-im/vector-web/pull/2511 but with just the actual electron changes
This commit is contained in:
parent
8c3fed7559
commit
caa3cb7d89
9 changed files with 481 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue