mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 09:33:10 -07:00
fix AUR-finding functionality for the "System" tab, fix window bounds saving when close-to-tray functionality is enabled
This commit is contained in:
parent
4ac392f429
commit
f4a818e982
4 changed files with 12 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "gerbil",
|
||||
"productName": "Gerbil",
|
||||
"version": "1.6.6",
|
||||
"version": "1.6.7",
|
||||
"description": "Run Large Language Models locally",
|
||||
"main": "out/main/index.js",
|
||||
"homepage": "./",
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-error-boundary": "^6.0.0",
|
||||
"systeminformation": "^5.27.10",
|
||||
"systeminformation": "^5.27.11",
|
||||
"winston": "^3.18.3",
|
||||
"winston-daily-rotate-file": "^5.0.0",
|
||||
"yauzl": "^3.2.0",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { join } from 'path';
|
|||
import { platform, env as processEnv } from 'process';
|
||||
import { execa } from 'execa';
|
||||
import { app } from 'electron';
|
||||
|
||||
import { PRODUCT_NAME } from '@/constants';
|
||||
|
||||
async function executeCommand(
|
||||
|
|
@ -167,14 +166,16 @@ export async function getAURVersion() {
|
|||
return aurVersionCache;
|
||||
}
|
||||
|
||||
const packageName = PRODUCT_NAME.toLowerCase();
|
||||
|
||||
try {
|
||||
const { stdout } = await execa('pacman', ['-Q', PRODUCT_NAME], {
|
||||
const { stdout } = await execa('pacman', ['-Q', packageName], {
|
||||
timeout: 1000,
|
||||
reject: false,
|
||||
});
|
||||
const trimmed = stdout.trim();
|
||||
if (trimmed.length > 0) {
|
||||
aurVersionCache = trimmed.replace('gerbil ', '');
|
||||
aurVersionCache = trimmed.replace(`${packageName} `, '');
|
||||
return aurVersionCache;
|
||||
}
|
||||
} catch {}
|
||||
|
|
|
|||
|
|
@ -144,11 +144,11 @@ export function createMainWindow(options?: { startHidden?: boolean }) {
|
|||
}));
|
||||
|
||||
mainWindow.on('close', (event) => {
|
||||
saveBounds();
|
||||
if (getEnableSystemTray() && isTrayActive()) {
|
||||
event.preventDefault();
|
||||
mainWindow?.hide();
|
||||
} else {
|
||||
saveBounds();
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
10
yarn.lock
10
yarn.lock
|
|
@ -3890,7 +3890,7 @@ __metadata:
|
|||
react-dom: "npm:^19.2.0"
|
||||
react-error-boundary: "npm:^6.0.0"
|
||||
rollup-plugin-visualizer: "npm:^6.0.4"
|
||||
systeminformation: "npm:^5.27.10"
|
||||
systeminformation: "npm:^5.27.11"
|
||||
typescript: "npm:^5.9.3"
|
||||
vite: "npm:^7.1.9"
|
||||
winston: "npm:^3.18.3"
|
||||
|
|
@ -6900,12 +6900,12 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"systeminformation@npm:^5.27.10":
|
||||
version: 5.27.10
|
||||
resolution: "systeminformation@npm:5.27.10"
|
||||
"systeminformation@npm:^5.27.11":
|
||||
version: 5.27.11
|
||||
resolution: "systeminformation@npm:5.27.11"
|
||||
bin:
|
||||
systeminformation: lib/cli.js
|
||||
checksum: 10c0/aaaafb3d5738150e4d63908b4516f712810ed9047dc69ba061eacb1c2aa2824bfc352a1dff596e9d81db8a75c2f27da1a3e5daaa88fffb658a3f5a68288a1d02
|
||||
checksum: 10c0/f0ef8cec7d2bead69060c5f1d45f9727d549e858f3132cf9e7ba4a8e9ae60bf30072fc7eb8a4269a8e5f293dca7bddd2b0261d7dc498e4a2cb9c0b66cbd46b16
|
||||
conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android)
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue