From f89e7dc2bea36d797def10ac9725f15ddde2e885 Mon Sep 17 00:00:00 2001 From: CM Date: Sun, 6 Nov 2022 18:50:48 +0000 Subject: [PATCH 1/6] Rebased PR #213 Add QR code support Add TOTP code support Improve menu UX Improve prompt UX with accordion components Fix wallet idle/timeout functionality --- .vscode/settings.json | 5 +- app/img/beetSmall.png | Bin 0 -> 19337 bytes package-lock.json | 182 +- package.json | 3 +- src/app.js | 10 +- src/background.js | 118 +- src/components/account-details.vue | 83 + src/components/account-select.vue | 85 + src/components/backup.vue | 63 + src/components/balances.vue | 12 +- src/components/blockchains/operations.vue | 141 ++ src/components/dapps.vue | 113 + src/components/dashboard.vue | 101 +- src/components/header-guest.vue | 2 +- src/components/header-small.vue | 18 +- src/components/lang-select.vue | 57 +- src/components/main-menu.vue | 111 + src/components/popups.vue | 130 +- src/components/popups/genericrequestpopup.vue | 3 + .../popups/identityrequestpopup.vue | 6 +- src/components/popups/linkrequestpopup.vue | 4 + src/components/popups/relinkrequestpopup.vue | 5 +- src/components/popups/signedmessagepopup.vue | 11 +- .../popups/transactionrequestpopup.vue | 8 +- .../popups/transferrequestpopup.vue | 5 +- src/components/qr.vue | 260 ++ src/components/qr/Drag.vue | 100 + src/components/qr/Scan.vue | 167 ++ src/components/qr/Upload.vue | 41 + src/components/totp.vue | 393 +++ src/lib/apiUtils.js | 38 +- src/lib/blockchains/BitShares.js | 2120 ++++++++++++++++- src/lib/blockchains/BlockchainAPI.js | 69 +- src/router/index.js | 30 +- src/store/modules/AccountStore.js | 14 +- src/store/modules/SettingsStore.js | 47 +- src/translations/common/de.json | 50 + src/translations/common/en.json | 50 + src/translations/operations/de.json | 317 ++- src/translations/operations/en.json | 316 ++- 40 files changed, 5011 insertions(+), 277 deletions(-) create mode 100644 app/img/beetSmall.png create mode 100644 src/components/account-details.vue create mode 100644 src/components/account-select.vue create mode 100644 src/components/backup.vue create mode 100644 src/components/blockchains/operations.vue create mode 100644 src/components/dapps.vue create mode 100644 src/components/main-menu.vue create mode 100644 src/components/qr.vue create mode 100644 src/components/qr/Drag.vue create mode 100644 src/components/qr/Scan.vue create mode 100644 src/components/qr/Upload.vue create mode 100644 src/components/totp.vue diff --git a/.vscode/settings.json b/.vscode/settings.json index 48699102..1c0074eb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,8 @@ {"language": "vue", "autoFix": true} ], "eslint.provideLintTask": true, - "eslint.run": "onSave" + "eslint.run": "onSave", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + } } \ No newline at end of file diff --git a/app/img/beetSmall.png b/app/img/beetSmall.png new file mode 100644 index 0000000000000000000000000000000000000000..55ea334a90e8df2845b73d74812afeac0a8bdb38 GIT binary patch literal 19337 zcmeHtWmH{FlkUOYB{&2R?s9N{<#MR^G%cszIj0DvSVDXRST-}v_h3;p(Ox09?20N_t~ zsA@VX8@Q6#IoO(*TY*TN-0eUlAUAUp0KjdvD%0G7oX0BY^%|2O{C1z~BbgTj@i)Et zc6M#?ixp&>VOV{UCoi(?# zUzWbDFP(hfMahxzzy0B%-*bNPQNfppy5@1?&SN9#-lC)%&*OP}Ltk+!2jzr)L_?%c zU}@vTb?)gp|3G2R{W-`X^RD&&@uIF4ht{6iZP(SVZ&Ty-2J>cDWXW0AdSv}jxI+WH z=EGp_i79`|IU~Z|<6*&#LD?iha#*_6DJrwqRc82>LLLN20cl=1a`*`lU+p%gxh0v3B%;fSz#xW*Lr- z8a~D^*_$(I9VyQ@*4=t{JwCqXhXieHj?F%mSi4tOj3MvGkCHo>!gy-fNM%VjV*8WyE_sJ30tq=9Xo+1;{c0iq>EHj2J*1KcM zU`!Qh?qpRJ8NN^g$1(0yx~yZ0Bu(Yf;v{YDBldYsm5HW#ZJo1;7C;omoC9rD^P)$| z91)MT^V=li_ynOz;JGI$N#J|$@Uu>`UDGv8ay(wq(vkF5c8---RCR9*C%dehAAEAz zu)Ynf$+p{(qRMqRHZSqjJOeG%s6X1Y`8H>GYE9^g9CcrPvG~ZazY&C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ZT;lI~*EpvGD&S60K`tLc5;Ta~%< zeQG{)lhc^6^Yj}G;z;k(JTt*^s9niV8+sAzT`bZo+um@4ofuuolY!lx@@A(r((pAc zdcsqDI*a+dXJ+FSbedrj0Q!Rq64)6qd7Htoi>94ZpQSuJ{O`BoUj>vMhx)txHe)Pw#!8LYGGY z7iTpA25~5|F(-_Ps!e!;&D4A`r#ut1MET=SY6nmd*{6;S=US#(d*?hMK`dN9bTX)3sj1Aa}zy!-0BX?|Xst)C@<>!qNOVu8S$~>LOxGO7PT+cSW&?by&9@xx(&q zzP?{e@l)FO2Eu8v2beI8T9LWBNFgV))YH1CV@m`;o}D@n-%-V8e7DzFffg%$FdzmN2_i5%6Qw=X|<}?`ad?8k_6(`<<(6_UAdK=2g5s&)zny zyvgy@tJ@c4er2VR2ij>@W)d-iZ`+$M-*6Ip*nWdfeb0=(Qy(wi;D;@CdshfmsfIn39!BGQqc&eBlLw#eaL9Wv_V5>#JEub!T6vMwMOk@?uWAsOMqDJwWA z2sL;XT>X)2!cuA!7ef{Ug|(n;p?y>@ExlnuNft+_H6HGLkDxClG2&5Wl?i|>*)!IuDXvmGaf|iL&7)Hl1Qmf;D3?dI_rooKX7yFP9NA`&WtqLc2KyV6u z4{TepG@Gji zf}cS8$<#13mDh(X{$lJG+4DYI5L9)iIrm9DXDV6{HR~i;o;`tSY}k=jP2ak+Q^4AU wHeF5;XW17zu;aRJuvI;8XWyRf@jd&x3#8T#SXd*zoyP&B#N= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "optional": true + }, "node_modules/7zip-bin": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.1.1.tgz", @@ -3814,6 +3835,15 @@ "vue": ">=3" } }, + "node_modules/barcode-detector": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/barcode-detector/-/barcode-detector-0.7.0.tgz", + "integrity": "sha512-SJh+LV6e+W5e6QJe70ralFfqcYwvaOUGWyr+GepuQ5swPH4jF2asyTxOIUZNSU9Z5isD3KWI5hlqQ+b/QaFFOg==", + "dependencies": { + "@zxing/library": "^0.18.4", + "jsqr": "^1.3.1" + } + }, "node_modules/base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", @@ -4432,6 +4462,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callforth": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/callforth/-/callforth-0.4.0.tgz", + "integrity": "sha512-k3kD3OBPRvYs3Sb41Fn1T7l6vvSmTMPq1a0jxh8QKD+wb+17G8oOq48eBi0stn8ahpNVUJtPlrlYwbfv9Cfhpg==" + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -4772,6 +4807,16 @@ "node": ">= 0.6" } }, + "node_modules/core-js": { + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz", + "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-compat": { "version": "3.25.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.1.tgz", @@ -7808,6 +7853,11 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "node_modules/jssha": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jssha/-/jssha-3.2.0.tgz", @@ -8835,6 +8885,18 @@ "node": ">=8" } }, + "node_modules/qrcode-reader-vue3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/qrcode-reader-vue3/-/qrcode-reader-vue3-3.1.2.tgz", + "integrity": "sha512-OqhJ4lkKHlyV42Fm5qptm7cdV3X2DRbtCgTNMjcFY7plkMNDqGo+bPxxlGkoPMCHowxXa1pPu9knWPfoqu5mUg==", + "dependencies": { + "barcode-detector": "^0.7", + "callforth": "^0.4", + "core-js": "^3", + "vue": "^3", + "webrtc-adapter": "^7" + } + }, "node_modules/query-string": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", @@ -9269,6 +9331,18 @@ "node": ">=8.0" } }, + "node_modules/rtcpeerconnection-shim": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", + "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", + "dependencies": { + "sdp": "^2.6.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -9405,6 +9479,11 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/sdp": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", + "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" + }, "node_modules/secure-random": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/secure-random/-/secure-random-1.1.2.tgz", @@ -10118,6 +10197,14 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -10900,6 +10987,19 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/webrtc-adapter": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.1.tgz", + "integrity": "sha512-TbrbBmiQBL9n0/5bvDdORc6ZfRY/Z7JnEj+EYOD1ghseZdpJ+nF2yx14k3LgQKc7JZnG7HAcL+zHnY25So9d7A==", + "dependencies": { + "rtcpeerconnection-shim": "^1.2.15", + "sdp": "^2.12.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -13866,6 +13966,21 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "@zxing/library": { + "version": "0.18.6", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.18.6.tgz", + "integrity": "sha512-bulZ9JHoLFd9W36pi+7e7DnEYNJhljYjZ1UTsKPOoLMU3qtC+REHITeCRNx40zTRJZx18W5TBRXt5pq2Uopjsw==", + "requires": { + "@zxing/text-encoding": "~0.9.0", + "ts-custom-error": "^3.0.0" + } + }, + "@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "optional": true + }, "7zip-bin": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.1.1.tgz", @@ -14176,6 +14291,15 @@ "quill": "^1.3.7" } }, + "barcode-detector": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/barcode-detector/-/barcode-detector-0.7.0.tgz", + "integrity": "sha512-SJh+LV6e+W5e6QJe70ralFfqcYwvaOUGWyr+GepuQ5swPH4jF2asyTxOIUZNSU9Z5isD3KWI5hlqQ+b/QaFFOg==", + "requires": { + "@zxing/library": "^0.18.4", + "jsqr": "^1.3.1" + } + }, "base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", @@ -14636,6 +14760,11 @@ "get-intrinsic": "^1.0.2" } }, + "callforth": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/callforth/-/callforth-0.4.0.tgz", + "integrity": "sha512-k3kD3OBPRvYs3Sb41Fn1T7l6vvSmTMPq1a0jxh8QKD+wb+17G8oOq48eBi0stn8ahpNVUJtPlrlYwbfv9Cfhpg==" + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -14896,6 +15025,11 @@ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" }, + "core-js": { + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz", + "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==" + }, "core-js-compat": { "version": "3.25.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.1.tgz", @@ -17163,6 +17297,11 @@ "graceful-fs": "^4.1.6" } }, + "jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "jssha": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jssha/-/jssha-3.2.0.tgz", @@ -17937,6 +18076,18 @@ "escape-goat": "^2.0.0" } }, + "qrcode-reader-vue3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/qrcode-reader-vue3/-/qrcode-reader-vue3-3.1.2.tgz", + "integrity": "sha512-OqhJ4lkKHlyV42Fm5qptm7cdV3X2DRbtCgTNMjcFY7plkMNDqGo+bPxxlGkoPMCHowxXa1pPu9knWPfoqu5mUg==", + "requires": { + "barcode-detector": "^0.7", + "callforth": "^0.4", + "core-js": "^3", + "vue": "^3", + "webrtc-adapter": "^7" + } + }, "query-string": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", @@ -18278,6 +18429,14 @@ "sprintf-js": "^1.1.2" } }, + "rtcpeerconnection-shim": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", + "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", + "requires": { + "sdp": "^2.6.0" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18345,6 +18504,11 @@ "ajv-keywords": "^3.5.2" } }, + "sdp": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", + "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" + }, "secure-random": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/secure-random/-/secure-random-1.1.2.tgz", @@ -18869,6 +19033,11 @@ "utf8-byte-length": "^1.0.1" } }, + "ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==" + }, "tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -19438,6 +19607,15 @@ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true }, + "webrtc-adapter": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.1.tgz", + "integrity": "sha512-TbrbBmiQBL9n0/5bvDdORc6ZfRY/Z7JnEj+EYOD1ghseZdpJ+nF2yx14k3LgQKc7JZnG7HAcL+zHnY25So9d7A==", + "requires": { + "rtcpeerconnection-shim": "^1.2.15", + "sdp": "^2.12.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 80f4c727..14bd1cc8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "beet", "productName": "Beet Blockchain Companion", - "version": "0.15.0-rc1", + "version": "0.16.0-rc1", "apiversion": 3, "description": "Beet is a stand-alone key-manager and signing app for blockchains like BitShares, Bitcoin and others.", "author": "clockworkgr ", @@ -63,6 +63,7 @@ "mitt": "^3.0.0", "otpauth": "^8.0.1", "query-string": "^7.1.1", + "qrcode-reader-vue3": "^3.1.2", "simple-websocket": "^9.1.0", "socket.io": "^4.5.1", "typeface-rajdhani": "1.1.13", diff --git a/src/app.js b/src/app.js index 968bf1aa..9e85088e 100644 --- a/src/app.js +++ b/src/app.js @@ -5,7 +5,6 @@ import mitt from 'mitt'; import BalmUI from 'balm-ui'; // Official Google Material Components import BalmUIPlus from 'balm-ui/dist/balm-ui-plus'; // BalmJS Team Material Components -import BalmUINext from 'balm-ui/dist/balm-ui-next'; import 'balm-ui-css'; import router from './router/index.js'; @@ -53,16 +52,11 @@ window.t = (key, params) => { app.use(VueRouter); app.use(BalmUI, { $theme: { - primary: '#C7088E' + primary: '#C7088E', + secondary: '#960069' } }); app.use(BalmUIPlus); -app.use(BalmUINext, { - // Optional. Overwrite `` props with default value. - UiNavigationBar: { - // some props - } -}); app.use(router); app.use(store); diff --git a/src/background.js b/src/background.js index 523b7822..52823eff 100644 --- a/src/background.js +++ b/src/background.js @@ -5,6 +5,9 @@ import path from "path"; import url from "url"; import fs from 'fs'; +import os from 'os'; +import { argv } from 'node:process'; +import queryString from "query-string"; // Special module holding environment variables which you declared // in config/env_xxx.json file. @@ -312,7 +315,7 @@ const createWindow = async () => { const NOTIFICATION_TITLE = 'Beet wallet notification'; const NOTIFICATION_BODY = arg == 'request' ? "Beet has received a new request." : arg; - if (process.platform === 'win32') + if (os.platform === 'win32') { app.setAppUserModelId(app.name); } @@ -334,7 +337,7 @@ const createWindow = async () => { seed = null; const emitter = mitt(); try { - emitter.emit('timeout', 'logout'); + mainWindow.webContents.send('timeout', 'logout'); } catch (error) { console.log(error); } @@ -460,26 +463,95 @@ const createWindow = async () => { app.disableHardwareAcceleration(); -// This method will be called when Electron has finished -// initialization and is ready to create browser windows. -// Some APIs can only be used after this event occurs. -app.on('ready', async () => { - createWindow(); -}); +let currentOS = os.platform(); +if (currentOS == 'win32') { + // windows specific steps + const gotTheLock = app.requestSingleInstanceLock() + + if (!gotTheLock) { + app.quit() + } else { + // Handle the protocol. In this case, we choose to show an Error Box. + app.on('second-instance', (event, args) => { + // Someone tried to run a second instance, we should focus our window. + if (mainWindow) { + if (mainWindow.isMinimized()) mainWindow.restore() + mainWindow.focus() + + if (process.platform == 'win32' && args.length > 2) { + let deeplinkingUrl = args[3].replace('beet://api/', ''); + + let qs; + try { + qs = queryString.parse(deeplinkingUrl); + } catch (error) { + console.log(error); + return; + } + + if (qs) { + mainWindow.webContents.send('deeplink', qs); + } + } -// Quit when all windows are closed. -app.on('window-all-closed', () => { - // On OS X it is common for applications and their menu bar - // to stay active until the user quits explicitly with Cmd + Q - if (process.platform !== 'darwin') { - app.quit(); - } -}); + } + }) + + let defaultPath; + try { + defaultPath = path.resolve(argv[1]); + } catch (error) { + console.log(error) + } + app.setAsDefaultProtocolClient('beet', process.execPath, [defaultPath]) + + app.whenReady().then(() => { + createWindow(); + }); + } +} else { + app.setAsDefaultProtocolClient('beet') + + // mac or linux + app.whenReady().then(() => { + createWindow() + }) + + // Handle the protocol. In this case, we choose to show an Error Box. + app.on('open-url', (event, url) => { + let deeplinkingUrl = url.replace('beet://api/', ''); + + let qs; + try { + qs = queryString.parse(deeplinkingUrl); + } catch (error) { + console.log(error); + return; + } + + if (qs) { + mainWindow.webContents.send('deeplink', qs); + } + }) + + // This method will be called when Electron has finished + // initialization and is ready to create browser windows. + // Some APIs can only be used after this event occurs. + // Quit when all windows are closed. + app.on('window-all-closed', () => { + // On OS X it is common for applications and their menu bar + // to stay active until the user quits explicitly with Cmd + Q + if (process.platform !== 'darwin') { + app.quit(); + } + }); + + app.on('activate', () => { + // On OS X it's common to re-create a window in the app when the + // dock icon is clicked and there are no other windows open. + if (mainWindow === null) { + createWindow(); + } + }); +} -app.on('activate', () => { - // On OS X it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (mainWindow === null) { - createWindow(); - } -}); diff --git a/src/components/account-details.vue b/src/components/account-details.vue new file mode 100644 index 00000000..4b167e2d --- /dev/null +++ b/src/components/account-details.vue @@ -0,0 +1,83 @@ + + + diff --git a/src/components/account-select.vue b/src/components/account-select.vue new file mode 100644 index 00000000..94f2f094 --- /dev/null +++ b/src/components/account-select.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/components/backup.vue b/src/components/backup.vue new file mode 100644 index 00000000..2a5396a7 --- /dev/null +++ b/src/components/backup.vue @@ -0,0 +1,63 @@ + + + diff --git a/src/components/balances.vue b/src/components/balances.vue index 65855205..51da3303 100644 --- a/src/components/balances.vue +++ b/src/components/balances.vue @@ -113,10 +113,12 @@ :data="tableData.data" :thead="tableData.thead" :tbody="tableData.tbody" - style="height: 180px; overflow-y: scroll;" + v-shadow="1" + style="height: 150px;" /> No balances in account @@ -124,17 +126,15 @@ -
- -
-
Connecting to blockchain
-
+
Couldn't to connect to blockchain diff --git a/src/components/blockchains/operations.vue b/src/components/blockchains/operations.vue new file mode 100644 index 00000000..fb90def7 --- /dev/null +++ b/src/components/blockchains/operations.vue @@ -0,0 +1,141 @@ + + + diff --git a/src/components/dapps.vue b/src/components/dapps.vue new file mode 100644 index 00000000..6bd1252f --- /dev/null +++ b/src/components/dapps.vue @@ -0,0 +1,113 @@ + + + diff --git a/src/components/dashboard.vue b/src/components/dashboard.vue index 3e84a570..8d865e76 100644 --- a/src/components/dashboard.vue +++ b/src/components/dashboard.vue @@ -1,102 +1,29 @@ diff --git a/src/components/header-guest.vue b/src/components/header-guest.vue index efa38c94..693aa704 100644 --- a/src/components/header-guest.vue +++ b/src/components/header-guest.vue @@ -18,7 +18,7 @@ class="largeHeader" columns="12" > - + { logger.debug("Small Header mounted"); }); + + /* + + + + */