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": [
"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-table/dist/bootstrap-table.min.js"
],
"styles": [
"src/styles.scss",
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
"node_modules/bootstrap-table/dist/bootstrap-table.min.css",
"src/styles.scss"
"node_modules/bootstrap-table/dist/bootstrap-table.min.css"
],
"customWebpackConfig": {
"path": "./angular.webpack.js",

View file

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

16
package-lock.json generated
View file

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

View file

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

View file

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

View file

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

View file

@ -5,7 +5,7 @@ import { DaemonService } from '../../../core/services/daemon/daemon.service';
import { DaemonDataService, MoneroInstallerService } from '../../../core/services';
import { DaemonSettings } from '../../../../common';
import { Subscription } from 'rxjs';
import * as bootstrap from 'bootstrap';
import { Tooltip } from 'bootstrap';
@Component({
selector: 'app-navbar',
@ -104,7 +104,7 @@ export class NavbarComponent implements AfterViewInit, OnDestroy {
this.subscriptions.push(onSavedSettingsSub, onStatusChangedSub);
}
private lastTooltips: bootstrap.Tooltip[] = [];
private lastTooltips: Tooltip[] = [];
private disposeTooltips(): void {
this.lastTooltips.forEach((tooltip) => {
@ -125,7 +125,7 @@ export class NavbarComponent implements AfterViewInit, OnDestroy {
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'
}));

View file

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

View file

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

View file

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

View file

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