mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
open game and grasscutter folders from launcher
This commit is contained in:
parent
1ecb69af38
commit
2ab0fb75f9
@ -130,14 +130,14 @@
|
|||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<button class="smolBtn" onclick="setGameExe()" id="gameExeSet">Set game folder</button>
|
<button class="smolBtn" onclick="setGameExe()" id="gameExeSet">Set game folder</button>
|
||||||
<img src="icons/folder.svg" class="openFolderIcon" id="openGameFolder()"/>
|
<img src="icons/folder.svg" class="openFolderIcon" onclick="openGameFolder()"/>
|
||||||
</div>
|
</div>
|
||||||
<span id="gamePath" style="margin-top: 4px;"></span>
|
<span id="gamePath" style="margin-top: 4px;"></span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<div>
|
<div>
|
||||||
<button class="smolBtn" onclick="setGrasscutterFolder()" id="grasscutterFileSet">Set "Grasscutter" .jar file</button>
|
<button class="smolBtn" onclick="setGrasscutterFolder()" id="grasscutterFileSet">Set "Grasscutter" .jar file</button>
|
||||||
<img src="icons/folder.svg" class="openFolderIcon" id="openGrasscutterFolder()"/>
|
<img src="icons/folder.svg" class="openFolderIcon" onclick="openGrasscutterFolder()"/>
|
||||||
</div>
|
</div>
|
||||||
<span id="serverPath" style="margin-top: 4px;"></span>
|
<span id="serverPath" style="margin-top: 4px;"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,6 +57,20 @@ async function proxyIsInstalled() {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function openGameFolder() {
|
||||||
|
const config = await getCfg()
|
||||||
|
const folder = config.gameexe.match(/.*\\/g, '')[0]
|
||||||
|
|
||||||
|
createCmdWindow(`explorer.exe "${folder}"`)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function openGrasscutterFolder() {
|
||||||
|
const config = await getCfg()
|
||||||
|
const folder = config.serverFolder.match(/.*\\/g, '')[0]
|
||||||
|
|
||||||
|
createCmdWindow(`explorer.exe "${folder}"`)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimize the window
|
* Minimize the window
|
||||||
*/
|
*/
|
||||||
|
@ -366,7 +366,7 @@ async function setGrasscutterFolder() {
|
|||||||
// Set the folder in our configuration
|
// Set the folder in our configuration
|
||||||
const config = await getCfg()
|
const config = await getCfg()
|
||||||
|
|
||||||
config.serverFolder = folder
|
config.serverFolder = folder[0]
|
||||||
Neutralino.storage.setData('config', JSON.stringify(config))
|
Neutralino.storage.setData('config', JSON.stringify(config))
|
||||||
|
|
||||||
displayServerFolder()
|
displayServerFolder()
|
||||||
|
Loading…
Reference in New Issue
Block a user