From d162bdcecfcd2406d1254482355aeeda3df83345 Mon Sep 17 00:00:00 2001 From: Milad Date: Fri, 8 Apr 2022 22:14:30 +0430 Subject: [PATCH 1/2] Fix error not finding files in dist folder during build --- main.js | 10 +--------- main.ts | 12 +----------- tsconfig.spec.json | 5 +++++ 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/main.js b/main.js index e088a80c..ae917932 100644 --- a/main.js +++ b/main.js @@ -346,6 +346,7 @@ function createWindow() { electron_1.shell.openExternal(linkUrl); }); if (serve) { + mainWindow.webContents.openDevTools(); require('electron-reload')(__dirname, { electron: require("".concat(__dirname, "/node_modules/electron")) }); @@ -360,15 +361,6 @@ function createWindow() { slashes: true })); } - if (serve) { - //mainWindow.webContents.openDevTools(); - var devtools_1 = null; - electron_1.app.once('ready', function () { - devtools_1 = new electron_1.BrowserWindow(); - mainWindow.webContents.setDevToolsWebContents(devtools_1.webContents); - mainWindow.webContents.openDevTools({ mode: 'detach' }); - }); - } // Emitted when the window is going to close. mainWindow.on('close', function (event) { writeLog("close event on mainWindow was triggered. Calling shutdown method. Daemon state is: ".concat(daemonState, ".")); diff --git a/main.ts b/main.ts index 4ef5ba69..a5fbfe7c 100644 --- a/main.ts +++ b/main.ts @@ -450,6 +450,7 @@ function createWindow() { }); if (serve) { + mainWindow.webContents.openDevTools(); require('electron-reload')(__dirname, { electron: require(`${__dirname}/node_modules/electron`) }); @@ -465,17 +466,6 @@ function createWindow() { })); } - if (serve) { - //mainWindow.webContents.openDevTools(); - let devtools = null - - app.once('ready', () => { - devtools = new BrowserWindow(); - mainWindow.webContents.setDevToolsWebContents(devtools.webContents); - mainWindow.webContents.openDevTools({ mode: 'detach' }); - }) - } - // Emitted when the window is going to close. mainWindow.on('close', (event) => { writeLog(`close event on mainWindow was triggered. Calling shutdown method. Daemon state is: ${daemonState}.`); diff --git a/tsconfig.spec.json b/tsconfig.spec.json index a957abf2..a1664c3b 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -15,5 +15,10 @@ "include": [ "src/**/*.spec.ts", "src/**/*.d.ts" + ], + "exclude": [ + "dist", + "release", + "node_modules" ] } From 7bcec7d5c300a024b5275a45ab792b88bd8e45a9 Mon Sep 17 00:00:00 2001 From: Milad Date: Sat, 9 Apr 2022 01:12:01 +0430 Subject: [PATCH 2/2] Fix some warnings --- angular.json | 6 +++++- src/app/components/wallet/receive/receive.component.ts | 1 - src/styles/styles.scss | 6 +++--- src/styles/themes/theming.scss | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/angular.json b/angular.json index b39eeceb..73f7a641 100644 --- a/angular.json +++ b/angular.json @@ -42,7 +42,11 @@ }, "scripts": [ "src/version.js" - ] + ], + "allowedCommonJsDependencies": [ + "lodash", + "qrcode" + ] }, "configurations": { "production": { diff --git a/src/app/components/wallet/receive/receive.component.ts b/src/app/components/wallet/receive/receive.component.ts index 0d29fa9a..3eb1e9c1 100644 --- a/src/app/components/wallet/receive/receive.component.ts +++ b/src/app/components/wallet/receive/receive.component.ts @@ -9,7 +9,6 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { WalletService } from '../../../services/wallet.service'; import { Logger } from '../../../services/logger.service'; import * as QRCode from 'qrcode'; - @Component({ selector: 'app-receive', templateUrl: './receive.component.html', diff --git a/src/styles/styles.scss b/src/styles/styles.scss index 41c72809..7145a37c 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -1,5 +1,5 @@ @use '@angular/material' as mat; -@import "~@angular/material/theming"; +@import "@angular/material/theming"; // for npm material-icons package (to load local files) // $material-icons-font-path: '~material-icons/iconfont/'; @@ -280,11 +280,11 @@ span.ellipsis { .title-bar-button i { font-size: 20px; } -*/ + .app-electron { } - +*/ .app-electron .login { height: $app-height; } diff --git a/src/styles/themes/theming.scss b/src/styles/themes/theming.scss index b81257be..b91a143d 100644 --- a/src/styles/themes/theming.scss +++ b/src/styles/themes/theming.scss @@ -4,7 +4,7 @@ $primary: map-get($theme, "primary"); $accent: map-get($theme, "accent"); - @include mat.all-component-themes($theme); + // @include mat.all-component-themes($theme); .mat-menu-panel { background-color: map-get($background, "dialog"); @@ -41,8 +41,8 @@ font-size: 16px; } - .link { - } + // .link { + // } .link:hover { text-decoration: underline;