diff options
add platforms to mascara + move buyEther window open to ui
Diffstat (limited to 'app/scripts/platforms')
-rw-r--r-- | app/scripts/platforms/sw.js | 24 | ||||
-rw-r--r-- | app/scripts/platforms/window.js | 22 |
2 files changed, 46 insertions, 0 deletions
diff --git a/app/scripts/platforms/sw.js b/app/scripts/platforms/sw.js new file mode 100644 index 000000000..007d8dc5b --- /dev/null +++ b/app/scripts/platforms/sw.js @@ -0,0 +1,24 @@ + +class SwPlatform { + + // + // Public + // + + reload () { + // you cant actually do this + global.location.reload() + } + + openWindow ({ url }) { + // this doesnt actually work + global.open(url, '_blank') + } + + getVersion () { + return '<unable to read version>' + } + +} + +module.exports = SwPlatform diff --git a/app/scripts/platforms/window.js b/app/scripts/platforms/window.js new file mode 100644 index 000000000..1527c008b --- /dev/null +++ b/app/scripts/platforms/window.js @@ -0,0 +1,22 @@ + +class WindowPlatform { + + // + // Public + // + + reload () { + global.location.reload() + } + + openWindow ({ url }) { + global.open(url, '_blank') + } + + getVersion () { + return '<unable to read version>' + } + +} + +module.exports = WindowPlatform |