mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
disable private launcher when proxy server is not found
This commit is contained in:
parent
ebe014bd72
commit
b8cf13badd
@ -15,8 +15,7 @@ Grasscutter launcher for easily switching between Official and Private servers
|
||||
|
||||
1. Download the zip file
|
||||
2. Extract the zip file somewhere
|
||||
3. Run `install.cmd` as administrator. This will install the proxy server.
|
||||
4. Run `GrassClipper.exe` and set your `Genshin Impact` folder!
|
||||
3. Run `GrassClipper.exe`, install the proxy server, and set your `Genshin Impact` folder!
|
||||
|
||||
# Setup (for Development)
|
||||
|
||||
|
@ -22,8 +22,23 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
document.querySelector('#star').src = 'icons/star_filled.svg'
|
||||
}
|
||||
|
||||
// Disable private game launch if proxy IP or proxy server is not found
|
||||
const playPriv = document.querySelector('#playPrivate')
|
||||
const curDirList = await Neutralino.filesystem.readDirectory(NL_CWD)
|
||||
|
||||
if (!curDirList.find(f => f.entry === 'ext')) {
|
||||
playPriv.classList.add('disabled')
|
||||
playPriv.disabled = true
|
||||
}
|
||||
|
||||
// Exit favorites list when clicking outside of it
|
||||
const extFiles = await Neutralino.filesystem.readDirectory(NL_CWD + '/ext')
|
||||
|
||||
if (!extFiles.find(f => f.entry === 'mitmdump.exe')) {
|
||||
playPriv.classList.add('disabled')
|
||||
playPriv.disabled = true
|
||||
}
|
||||
|
||||
// Exit favorites list and settings panel when clicking outside of it
|
||||
window.addEventListener("click", function(e) {
|
||||
const favList = document.querySelector('#ipList')
|
||||
const settingsPanel = document.querySelector('#settingsPanel')
|
||||
|
Loading…
Reference in New Issue
Block a user