Skip to content

Commit

Permalink
update icon
Browse files Browse the repository at this point in the history
  • Loading branch information
liaotonglang committed Nov 28, 2022
1 parent bfb761b commit 3af7ae6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sguala",
"productName": "sguala",
"version": "1.0.0",
"version": "1.0.1",
"description": "Monitor app for linux server.",
"main": ".webpack/main",
"scripts": {
Expand All @@ -21,12 +21,15 @@
"license": "GPL-3.0-or-later",
"config": {
"forge": {
"packagerConfig": {},
"packagerConfig": {
"icon": "src/main/icon.ico"
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "sguala"
"name": "sguala",
"setupIcon": "src/main/icon.ico"
}
},
{
Expand Down
Binary file added src/main/icon.ico
Binary file not shown.
Binary file added src/main/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 12 additions & 5 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ import { exportConfigToClipbard, mergeConfigFromClipbard } from './clipb';
import { ServerLogins } from './serverlogins';
import { SmtpConfig } from './smtpConfig';

import path from 'path';

const server = 'https://update.electronjs.org'
const feed = `${server}/OWNER/REPO/${process.platform}-${process.arch}/${app.getVersion()}`
const feed = `${server}/zltl/sguala/${process.platform}-${process.arch}/${app.getVersion()}`


autoUpdater.setFeedURL({url: feed});
autoUpdater.setFeedURL({ url: feed });
setInterval(() => {
autoUpdater.checkForUpdates()
}, 10 * 60 * 1000)



Expand Down Expand Up @@ -125,11 +130,13 @@ registerAllhandle();


const createWindow = async () => {
console.log("__dirname=", __dirname);
// Create the browser window.
const mainWindow = new BrowserWindow({
height: 600,
width: 800,
autoHideMenuBar: true,
icon: path.join(__dirname, 'icon.ico'),
webPreferences: {
contextIsolation: true, // must be set to true when contextBridge is enabled
nodeIntegrationInWorker: true, // must be set to true when contextBridge is enabled
Expand All @@ -140,7 +147,7 @@ const createWindow = async () => {
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);

// Open the DevTools.
mainWindow.webContents.openDevTools();
// mainWindow.webContents.openDevTools();
};

let shellCnt = 0;
Expand Down Expand Up @@ -171,9 +178,9 @@ const createShellWindow = async (uuid: string) => {
shellWindow.loadURL(SHELL_WINDOW_WEBPACK_ENTRY + `?uuid=${uuid}&shellCnt=${shellCnt}`);

// Open the DevTools.
shellWindow.webContents.openDevTools();
// shellWindow.webContents.openDevTools();

let s : ShellSession;
let s: ShellSession;
const scnt = shellCnt;
shellWindow.on('ready-to-show', () => {
s = ss.startShell(shellWindow, login, scnt);
Expand Down

0 comments on commit 3af7ae6

Please sign in to comment.