1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Adds button for opening app in main browser window in extension.

This commit is contained in:
Dan 2017-12-08 21:18:08 -03:30 committed by Chi Kei Chan
parent 800eb2b969
commit 05c6789030
4 changed files with 29 additions and 0 deletions

15
app/images/open.svg Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>open</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Mobile-screens" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="MetaMascara-Mobile---structured" transform="translate(-329.000000, -93.000000)">
<g id="open" transform="translate(330.000000, 94.000000)">
<path d="M26,13 C26,20.1799 20.1799,26 13,26 C5.8201,26 0,20.1799 0,13 C0,5.8201 5.8201,0 13,0 C20.1799,0 26,5.8201 26,13 Z" id="Stroke-3" stroke="#4A4A4A"></path>
<path d="M6,17 C6,17 7.78735344,10.8360387 13.7616996,10.8360387 L13.7616996,8 L19,12.3733433 L13.7616996,17 L13.7616996,14.1639613 C13.7616996,14.1639613 9.54083576,13.4629933 6,17" id="Fill-5" fill="#4A4A4A"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -17,6 +17,11 @@ class ExtensionPlatform {
return extension.runtime.getManifest().version
}
openExtensionInBrowser () {
const extensionURL = extension.runtime.getURL('home.html')
this.openWindow({ url: extensionURL })
}
getPlatformInfo (cb) {
try {
extension.runtime.getPlatformInfo((platform) => {

View File

@ -107,6 +107,7 @@ TxView.prototype.render = function () {
h('div.flex-row.phone-visible', {
style: {
margin: '1em 0.9em',
justifyContent: 'space-between',
alignItems: 'center',
},
}, [
@ -139,6 +140,10 @@ TxView.prototype.render = function () {
identity.name,
]),
h('div.open-in-browser', {
onClick: () => global.platform.openExtensionInBrowser(),
}, [h('img', { src: 'images/open.svg' })])
]),
this.renderHeroBalance(),

View File

@ -38,6 +38,10 @@ $wallet-view-bg: $wild-sand;
}
}
.open-in-browser {
cursor: pointer;
}
// wallet view and sidebar
.wallet-view {