diff --git a/angular.json b/angular.json index 40ffb74..3607fe0 100644 --- a/angular.json +++ b/angular.json @@ -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", diff --git a/app/main.ts b/app/main.ts index 241bb41..8cd6758 100644 --- a/app/main.ts +++ b/app/main.ts @@ -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); } @@ -254,9 +257,8 @@ function createWindow(): BrowserWindow { return win; } -const createSplashWindow = async (): Promise => { - - if (os.platform() == 'win32') { +const createSplashWindow = async (): Promise => { + if (os.platform() == 'win32' || isAppImage()) { return undefined; } @@ -281,8 +283,7 @@ const createSplashWindow = async (): Promise => { 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 => { 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; } + diff --git a/package-lock.json b/package-lock.json index b0a1e21..1e56c48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index 4d0efae..09c4d0f 100644 --- a/package.json +++ b/package.json @@ -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" ] } diff --git a/src/app/pages/base-page/base-page.component.ts b/src/app/pages/base-page/base-page.component.ts index 32bb679..051c3ae 100644 --- a/src/app/pages/base-page/base-page.component.ts +++ b/src/app/pages/base-page/base-page.component.ts @@ -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' }); diff --git a/src/app/pages/detail/detail.component.html b/src/app/pages/detail/detail.component.html index 89e2c32..425f9bc 100644 --- a/src/app/pages/detail/detail.component.html +++ b/src/app/pages/detail/detail.component.html @@ -79,11 +79,6 @@ diff --git a/src/app/shared/components/navbar/navbar.component.ts b/src/app/shared/components/navbar/navbar.component.ts index fa80802..d0730af 100644 --- a/src/app/shared/components/navbar/navbar.component.ts +++ b/src/app/shared/components/navbar/navbar.component.ts @@ -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' })); diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 26fd663..72edd23 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -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], diff --git a/src/index.html b/src/index.html index 3312d5d..47c24c9 100644 --- a/src/index.html +++ b/src/index.html @@ -6,6 +6,7 @@ + diff --git a/src/polyfills.ts b/src/polyfills.ts index 044db0a..ca73c8f 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -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 { diff --git a/src/styles.scss b/src/styles.scss index c207a58..7062056 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,9 +1,3 @@ -/* -body { - min-height: 100vh; - min-height: -webkit-fill-available; -} -*/ $primary: #ff5733; @import "/node_modules/bootstrap/scss/bootstrap";