Bump electron 33.1.0 -> 33.2.0 and minor fixes

This commit is contained in:
everoddandeven 2024-11-08 15:57:03 +01:00
parent 34c9b04163
commit bcfbe9de4a
11 changed files with 61 additions and 43 deletions

View file

@ -38,14 +38,13 @@
], ],
"scripts": [ "scripts": [
"node_modules/jquery/dist/jquery.min.js", "node_modules/jquery/dist/jquery.min.js",
"node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js", "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js",
"node_modules/bootstrap-table/dist/bootstrap-table.min.js" "node_modules/bootstrap-table/dist/bootstrap-table.min.js"
], ],
"styles": [ "styles": [
"src/styles.scss",
"node_modules/bootstrap-icons/font/bootstrap-icons.css", "node_modules/bootstrap-icons/font/bootstrap-icons.css",
"node_modules/bootstrap-table/dist/bootstrap-table.min.css", "node_modules/bootstrap-table/dist/bootstrap-table.min.css"
"src/styles.scss"
], ],
"customWebpackConfig": { "customWebpackConfig": {
"path": "./angular.webpack.js", "path": "./angular.webpack.js",

View file

@ -1,5 +1,5 @@
import { app, BrowserWindow, ipcMain, screen, dialog, Tray, Menu, MenuItemConstructorOptions, import { app, BrowserWindow, ipcMain, screen, dialog, Tray, Menu, MenuItemConstructorOptions,
IpcMainInvokeEvent, Notification, NotificationConstructorOptions, clipboard, IpcMainInvokeEvent, Notification, NotificationConstructorOptions, clipboard
} from 'electron'; } from 'electron';
import { ChildProcessWithoutNullStreams, exec, ExecException, spawn } from 'child_process'; import { ChildProcessWithoutNullStreams, exec, ExecException, spawn } from 'child_process';
import * as path from 'path'; import * as path from 'path';
@ -96,7 +96,9 @@ let trayMenu: Menu;
const args = process.argv.slice(1), const args = process.argv.slice(1),
serve = args.some(val => val === '--serve'); serve = args.some(val => val === '--serve');
const isAppImage: () => boolean = () => {
return (!!process.env.APPIMAGE) || (!!process.env.PORTABLE_EXECUTABLE_DIR);
}
// #region Window // #region Window
@ -228,6 +230,7 @@ function createWindow(): BrowserWindow {
} }
const url = new URL(path.join('file:', dirname, pathIndex)); const url = new URL(path.join('file:', dirname, pathIndex));
console.log(`Main window url: ${url}`);
win.loadURL(url.href); win.loadURL(url.href);
} }
@ -254,9 +257,8 @@ function createWindow(): BrowserWindow {
return win; return win;
} }
const createSplashWindow = async (): Promise<BrowserWindow | undefined> => { const createSplashWindow = async (): Promise<BrowserWindow | undefined> => {
if (os.platform() == 'win32' || isAppImage()) {
if (os.platform() == 'win32') {
return undefined; return undefined;
} }
@ -281,8 +283,7 @@ const createSplashWindow = async (): Promise<BrowserWindow | undefined> => {
pathIndex = '../dist/splash.html'; pathIndex = '../dist/splash.html';
} }
const cdir = dirname.replace('/app/', '/src/'); const url = new URL(path.join('file:', dirname, pathIndex));
const url = new URL(path.join('file:', cdir, pathIndex));
await window.loadURL(url.href); await window.loadURL(url.href);
@ -290,7 +291,7 @@ const createSplashWindow = async (): Promise<BrowserWindow | undefined> => {
setTimeout(() => { setTimeout(() => {
window.show(); window.show();
resolve(); resolve();
}, 1000); }, 400);
}); });
return window; return window;
@ -1035,17 +1036,17 @@ try {
}); });
ipcMain.handle('is-app-image', (event: IpcMainInvokeEvent) => { ipcMain.handle('is-app-image', (event: IpcMainInvokeEvent) => {
const isAppImage: boolean = (!!process.env.APPIMAGE) || (!!process.env.PORTABLE_EXECUTABLE_DIR); win?.webContents.send('on-is-app-image', isAppImage());
win?.webContents.send('on-is-app-image', isAppImage ? true : false);
}); });
ipcMain.handle('copy-to-clipboard', (event: IpcMainInvokeEvent, content: string) => { ipcMain.handle('copy-to-clipboard', (event: IpcMainInvokeEvent, content: string) => {
clipboard.writeText(content, "selection"); clipboard.writeText(content, "selection");
}); });
} catch (e) { } catch (e) {
// Catch Error // Catch Error
console.error(e); console.error(e);
// throw e; // throw e;
} }

16
package-lock.json generated
View file

@ -7,7 +7,14 @@
"": { "": {
"name": "monerod-gui", "name": "monerod-gui",
"version": "0.1.2", "version": "0.1.2",
"funding": [
{
"type": "individual",
"url": "https://github.com/everoddandeven/monerod-gui?tab=readme-ov-file#donating"
}
],
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@angular/common": "17.3.12", "@angular/common": "17.3.12",
"@angular/compiler": "17.3.12", "@angular/compiler": "17.3.12",
@ -17,7 +24,6 @@
"@angular/platform-browser": "17.3.12", "@angular/platform-browser": "17.3.12",
"@angular/platform-browser-dynamic": "17.3.12", "@angular/platform-browser-dynamic": "17.3.12",
"@angular/router": "17.3.12", "@angular/router": "17.3.12",
"@popperjs/core": "2.11.8",
"bootstrap": "5.3.3", "bootstrap": "5.3.3",
"bootstrap-icons": "1.11.3", "bootstrap-icons": "1.11.3",
"bootstrap-table": "1.23.5", "bootstrap-table": "1.23.5",
@ -57,7 +63,7 @@
"@typescript-eslint/eslint-plugin": "7.7.1", "@typescript-eslint/eslint-plugin": "7.7.1",
"@typescript-eslint/parser": "7.7.1", "@typescript-eslint/parser": "7.7.1",
"conventional-changelog-cli": "5.0.0", "conventional-changelog-cli": "5.0.0",
"electron": "33.1.0", "electron": "33.2.0",
"electron-builder": "25.1.8", "electron-builder": "25.1.8",
"electron-debug": "4.1.0", "electron-debug": "4.1.0",
"electron-installer-dmg": "5.0.1", "electron-installer-dmg": "5.0.1",
@ -11818,9 +11824,9 @@
} }
}, },
"node_modules/electron": { "node_modules/electron": {
"version": "33.1.0", "version": "33.2.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-33.1.0.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-33.2.0.tgz",
"integrity": "sha512-7KiY6MtRo1fVFLPGyHS7Inh8yZfrbUTy43nNwUgMD2CBk729BgSwOC2WhmcptNJVlzHJpVxSWkiVi2hp9mH/bw==", "integrity": "sha512-PVw1ICAQDPsnnsmpNFX/b1i/49h67pbSPxuIENd9K9WpGO1tsRaQt+K2bmXqTuoMJsbzIc75Ce8zqtuwBPqawA==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {

View file

@ -3,16 +3,31 @@
"version": "0.1.2", "version": "0.1.2",
"description": "Monero daemon GUI", "description": "Monero daemon GUI",
"icon": "./assets/icons/favicon.ico", "icon": "./assets/icons/favicon.ico",
"homepage": "https://github.com/everoddandeven/monerod-gui", "homepage": "https://github.com/everoddandeven/monerod-gui#readme",
"author": { "author": {
"name": "everoddandeven", "name": "everoddandeven",
"email": "everoddandeven@protonmail.com" "email": "everoddandeven@protonmail.com"
}, },
"license": "MIT",
"bugs": {
"url": "https://github.com/everoddandeven/monerod-gui/issues",
"email": "everoddandeven@protonmail.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/everoddandeven/monerod-gui.git"
},
"funding": [
{
"type": "individual",
"url": "https://github.com/everoddandeven/monerod-gui?tab=readme-ov-file#donating"
}
],
"keywords": [ "keywords": [
"angular", "angular",
"angular 17", "angular 17",
"electron", "electron",
"electron 30", "electron 33",
"nodejs", "nodejs",
"typescript", "typescript",
"jest", "jest",
@ -25,7 +40,8 @@
"monero", "monero",
"monerod", "monerod",
"monerod gui", "monerod gui",
"monerod-gui" "monerod-gui",
"monero node manager"
], ],
"main": "app/main.js", "main": "app/main.js",
"private": true, "private": true,
@ -69,7 +85,6 @@
"@angular/platform-browser": "17.3.12", "@angular/platform-browser": "17.3.12",
"@angular/platform-browser-dynamic": "17.3.12", "@angular/platform-browser-dynamic": "17.3.12",
"@angular/router": "17.3.12", "@angular/router": "17.3.12",
"@popperjs/core": "2.11.8",
"bootstrap": "5.3.3", "bootstrap": "5.3.3",
"bootstrap-icons": "1.11.3", "bootstrap-icons": "1.11.3",
"bootstrap-table": "1.23.5", "bootstrap-table": "1.23.5",
@ -109,7 +124,7 @@
"@typescript-eslint/eslint-plugin": "7.7.1", "@typescript-eslint/eslint-plugin": "7.7.1",
"@typescript-eslint/parser": "7.7.1", "@typescript-eslint/parser": "7.7.1",
"conventional-changelog-cli": "5.0.0", "conventional-changelog-cli": "5.0.0",
"electron": "33.1.0", "electron": "33.2.0",
"electron-builder": "25.1.8", "electron-builder": "25.1.8",
"electron-debug": "4.1.0", "electron-debug": "4.1.0",
"electron-installer-dmg": "5.0.1", "electron-installer-dmg": "5.0.1",
@ -136,6 +151,6 @@
"node": ">= 16.14.0 || >= 18.10.0" "node": ">= 16.14.0 || >= 18.10.0"
}, },
"browserslist": [ "browserslist": [
"chrome 114" "chrome 130"
] ]
} }

View file

@ -37,7 +37,13 @@ export abstract class BasePageComponent implements AfterContentInit, OnDestroy {
const $table = $(`#${id}`); const $table = $(`#${id}`);
$table.bootstrapTable({}); $table.bootstrapTable({
search: true,
showSearchButton: true,
showColumnsSearch: true,
showColumns: true,
pagination: true
});
$table.bootstrapTable('refreshOptions', { $table.bootstrapTable('refreshOptions', {
classes: 'table table-bordered table-hover table-dark table-striped' classes: 'table table-bordered table-hover table-dark table-striped'
}); });

View file

@ -79,11 +79,6 @@
<table <table
id="peersTable" id="peersTable"
data-toggle="peersTable" data-toggle="peersTable"
data-toolbar="#toolbar"
data-search="true"
data-pagination="true"
data-show-columns="true"
data-show-columns-search="true"
> >
<thead> <thead>
<tr> <tr>

View file

@ -5,7 +5,7 @@ import { DaemonService } from '../../../core/services/daemon/daemon.service';
import { DaemonDataService, MoneroInstallerService } from '../../../core/services'; import { DaemonDataService, MoneroInstallerService } from '../../../core/services';
import { DaemonSettings } from '../../../../common'; import { DaemonSettings } from '../../../../common';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import * as bootstrap from 'bootstrap'; import { Tooltip } from 'bootstrap';
@Component({ @Component({
selector: 'app-navbar', selector: 'app-navbar',
@ -104,7 +104,7 @@ export class NavbarComponent implements AfterViewInit, OnDestroy {
this.subscriptions.push(onSavedSettingsSub, onStatusChangedSub); this.subscriptions.push(onSavedSettingsSub, onStatusChangedSub);
} }
private lastTooltips: bootstrap.Tooltip[] = []; private lastTooltips: Tooltip[] = [];
private disposeTooltips(): void { private disposeTooltips(): void {
this.lastTooltips.forEach((tooltip) => { this.lastTooltips.forEach((tooltip) => {
@ -125,7 +125,7 @@ export class NavbarComponent implements AfterViewInit, OnDestroy {
queryResult.forEach((el) => tooltipTriggerList.push(el)); queryResult.forEach((el) => tooltipTriggerList.push(el));
const tooltipList: bootstrap.Tooltip[] = tooltipTriggerList.map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl, { const tooltipList: Tooltip[] = tooltipTriggerList.map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl, {
placement: 'bottom' placement: 'bottom'
})); }));

View file

@ -9,6 +9,10 @@ import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { NavbarComponent } from './components/navbar/navbar.component'; import { NavbarComponent } from './components/navbar/navbar.component';
import 'jquery';
import 'bootstrap';
import 'bootstrap-table';
@NgModule({ @NgModule({
declarations: [PageNotFoundComponent, SidebarComponent, DaemonNotRunningComponent, NavbarComponent, WebviewDirective], declarations: [PageNotFoundComponent, SidebarComponent, DaemonNotRunningComponent, NavbarComponent, WebviewDirective],
imports: [CommonModule, TranslateModule, FormsModule, RouterModule], imports: [CommonModule, TranslateModule, FormsModule, RouterModule],

View file

@ -6,6 +6,7 @@
<base href="./"> <base href="./">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="assets/icons/favicon.ico"> <link rel="icon" type="image/x-icon" href="assets/icons/favicon.ico">
</head> </head>
<body> <body>

View file

@ -52,9 +52,6 @@ import 'zone.js'; // Included with Angular CLI.
* APPLICATION IMPORTS * APPLICATION IMPORTS
*/ */
import 'jquery';
import '@popperjs/core';
import 'bootstrap-table';
import { NotificationConstructorOptions } from 'electron'; import { NotificationConstructorOptions } from 'electron';
declare global { declare global {

View file

@ -1,9 +1,3 @@
/*
body {
min-height: 100vh;
min-height: -webkit-fill-available;
}
*/
$primary: #ff5733; $primary: #ff5733;
@import "/node_modules/bootstrap/scss/bootstrap"; @import "/node_modules/bootstrap/scss/bootstrap";