improve config panel and file saving/export/delete

This commit is contained in:
2026-01-16 23:50:27 +01:00
parent b69a0c1b2d
commit 0b5ee51ebd
5 changed files with 74 additions and 11 deletions

View File

@@ -10,9 +10,10 @@ const versionText = HomeTemplate.content.getElementById("version-text")
navigate("home")
let savePath
files.userSavePath().then(path => {
path = `${path}\\config.json`
files.fileExists(path).then(result => {
savePath = `${path}\\config.json`
files.fileExists(savePath).then(result => {
if(!result) {
autoDetectGamePath()
}
@@ -69,4 +70,12 @@ async function autoDetectGamePath() {
document.getElementById("silksong-path-input").value = await save.loadSilksongPath()
}
}
}
async function deleteData() {
await files.delete(savePath)
}
async function exportData() {
await files.export()
}