mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-07-14 00:43:14 +08:00
fix - dock icon is hidden for any flow
This commit is contained in:
@@ -2,13 +2,12 @@ import { app } from 'electron'
|
|||||||
import checkAndDownloadPuppeteer from './check-and-download-puppeteer'
|
import checkAndDownloadPuppeteer from './check-and-download-puppeteer'
|
||||||
import * as net from 'net'
|
import * as net from 'net'
|
||||||
|
|
||||||
app.dock.hide()
|
|
||||||
|
|
||||||
export enum DOWNLOAD_ERROR_EXIT_CODE {
|
export enum DOWNLOAD_ERROR_EXIT_CODE {
|
||||||
NO_ERROR = 0,
|
NO_ERROR = 0,
|
||||||
DOWNLOAD_ERROR = 1
|
DOWNLOAD_ERROR = 1
|
||||||
}
|
}
|
||||||
export const checkAndDownloadDependenciesForInit = async () => {
|
export const checkAndDownloadDependenciesForInit = async () => {
|
||||||
|
app.dock.hide()
|
||||||
let pipe: null | net.Socket = null
|
let pipe: null | net.Socket = null
|
||||||
try {
|
try {
|
||||||
pipe = new net.Socket({ fd: 3 })
|
pipe = new net.Socket({ fd: 3 })
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import {
|
|||||||
checkPuppeteerExecutable,
|
checkPuppeteerExecutable,
|
||||||
} from './CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer'
|
} from './CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer'
|
||||||
|
|
||||||
app.dock.hide()
|
|
||||||
|
|
||||||
const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json')
|
const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json')
|
||||||
|
|
||||||
const initPlugins = (hooks) => {
|
const initPlugins = (hooks) => {
|
||||||
@@ -16,6 +14,7 @@ const initPlugins = (hooks) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const runAutoChat = async () => {
|
export const runAutoChat = async () => {
|
||||||
|
app.dock.hide()
|
||||||
let pipe: null | net.Socket = null
|
let pipe: null | net.Socket = null
|
||||||
try {
|
try {
|
||||||
pipe = new net.Socket({ fd: 3 })
|
pipe = new net.Socket({ fd: 3 })
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
} from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer'
|
} from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer'
|
||||||
import * as JSONStream from 'JSONStream'
|
import * as JSONStream from 'JSONStream'
|
||||||
import { DOWNLOAD_ERROR_EXIT_CODE } from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES'
|
import { DOWNLOAD_ERROR_EXIT_CODE } from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES'
|
||||||
let mainWindow: BrowserWindow
|
let mainWindow: BrowserWindow = null
|
||||||
|
|
||||||
export function createMainWindow(): void {
|
export function createMainWindow(): void {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
@@ -196,4 +196,8 @@ export function createMainWindow(): void {
|
|||||||
activate: true
|
activate: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mainWindow!.once('closed', () => {
|
||||||
|
mainWindow = null
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user