@liquid-state/iwa-desktop
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -0,0 +0,0 @@ import { NoopCommunicator } from './noopCommunicator'; |
@@ -0,0 +0,0 @@ import createNoopCommunicator, { NoopCommunicator } from './noopCommunicator'; |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -6,2 +6,9 @@ var appMiddleware = function (dispatch) { return function (next, done) { return function (message) { | ||
switch (message.eventType) { | ||
case 'online_status': | ||
dispatch({ | ||
purpose: 'response', | ||
request_id: message.data.request_id, | ||
response_data: { status: navigator.onLine }, | ||
}); | ||
break; | ||
case 'user_location': | ||
@@ -8,0 +15,0 @@ navigator.geolocation.getCurrentPosition(function (loc) { |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -0,0 +0,0 @@ var configMiddleware = function (config) { return function (dispatch) { return function (next, done) { return function (message) { |
@@ -0,0 +0,0 @@ import { INativeCommunicator, WrappedSendingMessage } from '@liquid-state/iwa-core/dist/communicator/communicator'; |
@@ -0,0 +0,0 @@ import config from './config'; |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -9,9 +9,10 @@ var iwaMiddleware = function (dispatch) { return function (next, done) { return function (message) { | ||
var data = message.data.data; | ||
fetch(data.url, data) | ||
.then(function (res) { return dispatch({ | ||
purpose: "response", | ||
eventType: "http", | ||
request_id: message.data.request_id, | ||
response_data: res | ||
}); }); | ||
fetch(data.url, data).then(function (res) { | ||
return dispatch({ | ||
purpose: 'response', | ||
eventType: 'http', | ||
request_id: message.data.request_id, | ||
response_data: res, | ||
}); | ||
}); | ||
done(); | ||
@@ -18,0 +19,0 @@ break; |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -0,0 +0,0 @@ var _kv = null; |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -8,3 +8,3 @@ var launchMiddleware = function (dispatch) { return function (next, done) { return function (message) { | ||
var _a = message.data.data, url = _a.url, settings = _a.settings; | ||
window.open(url, "_iab"); | ||
window.open(url, '_iab'); | ||
done(); | ||
@@ -11,0 +11,0 @@ break; |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -0,0 +0,0 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { |
@@ -0,0 +0,0 @@ import { MiddlewareT } from '@liquid-state/iwa-core/dist/communicator/middleware'; |
@@ -0,0 +0,0 @@ var setReadyMiddleware = function (dispatch) { return function (next, done) { return function (message) { |
@@ -0,0 +0,0 @@ import { ReceivedMessage, ICommunicatorImpl } from '@liquid-state/iwa-core/dist/communicator/communicator'; |
@@ -0,0 +0,0 @@ import SimpleEvent from '@liquid-state/iwa-core/dist/utils/simpleEvent'; |
{ | ||
"name": "@liquid-state/iwa-desktop", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "A set of functions and utilities to make it easy to run IWAs in a desktop environment.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26895
333