mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
potentially fix opening game/gc folders
This commit is contained in:
parent
c5af2666ae
commit
223790b0bd
@ -91,23 +91,22 @@ async function openLatestDownload() {
|
|||||||
|
|
||||||
async function openGameFolder() {
|
async function openGameFolder() {
|
||||||
const config = await getCfg()
|
const config = await getCfg()
|
||||||
const folder = config.gameexe.match(/.*\\/g, '')[0]
|
const folder = config.gameexe.match(/.*\\|.*\//g, '')
|
||||||
|
|
||||||
openInExplorer(folder)
|
if (folder.length > 0) openInExplorer(folder[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openGrasscutterFolder() {
|
async function openGrasscutterFolder() {
|
||||||
const config = await getCfg()
|
const config = await getCfg()
|
||||||
const folder = config.serverFolder.match(/.*\\|.*\//g, '')[0]
|
const folder = config.serverFolder.match(/.*\\|.*\//g, '')
|
||||||
|
|
||||||
openInExplorer(folder)
|
if (folder.length > 0) openInExplorer(folder[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimize the window
|
* Minimize the window
|
||||||
*/
|
*/
|
||||||
function minimizeWin() {
|
function minimizeWin() {
|
||||||
console.log('min')
|
|
||||||
Neutralino.window.minimize()
|
Neutralino.window.minimize()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +114,6 @@ function minimizeWin() {
|
|||||||
* Close the window
|
* Close the window
|
||||||
*/
|
*/
|
||||||
function closeWin() {
|
function closeWin() {
|
||||||
console.log('close')
|
|
||||||
Neutralino.app.exit()
|
Neutralino.app.exit()
|
||||||
|
|
||||||
window.close()
|
window.close()
|
||||||
|
@ -7,7 +7,6 @@ const createCmdWindow = async (command) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const openInExplorer = async (path) => {
|
const openInExplorer = async (path) => {
|
||||||
console.log(`explorer.exe "${path}"`)
|
|
||||||
createCmdWindow(`explorer.exe "${path}"`)
|
createCmdWindow(`explorer.exe "${path}"`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user