mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-22 07:07:53 +00:00
fix(shell): fix chrononeko/bugtracker#76
This commit is contained in:
parent
2fd93dfb88
commit
660c7d5a7e
14
packages/docs/docs/code/2151/index.mdx
Normal file
14
packages/docs/docs/code/2151/index.mdx
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
title: 2151:启动了其他应用
|
||||
sidebar_position: 2151
|
||||
---
|
||||
|
||||
import { ErrorScope } from '@site/src/components/ErrorScope'
|
||||
|
||||
<ErrorScope scope="user" />
|
||||
|
||||
启动的应用并非 QQ,而是其他应用。
|
||||
|
||||
一般情况下,当 QQ 在下列情况下启动时,Chronocat 不会启动:
|
||||
|
||||
1. 小程序
|
@ -1,4 +1,5 @@
|
||||
import h from '@satorijs/element'
|
||||
import { app } from 'electron'
|
||||
import { initServers } from './server'
|
||||
import { api } from './services/api'
|
||||
import { getAuthData } from './services/authData'
|
||||
@ -28,6 +29,11 @@ export const chronocat = () => {
|
||||
l.info(`${cyan('Chronocat')} ${bold(__DEFINE_CHRONO_VERSION__)}`)
|
||||
l.info(grey('当左侧错误指示灯亮起时,点击错误码以检查说明。'))
|
||||
|
||||
if (app.commandLine.hasSwitch('loadapp')) {
|
||||
l.warn('启动的应用并非 QQ,Chronocat 不会启用。', { code: 2151 })
|
||||
return
|
||||
}
|
||||
|
||||
let ready: () => void
|
||||
const readyPromise = new Promise<void>((res) => {
|
||||
ready = res
|
||||
|
Loading…
Reference in New Issue
Block a user