Add download menu translations

Update download menu formatting
Better error logging
This commit is contained in:
Thoronium
2023-02-26 00:15:42 -07:00
committed by GitHub
parent 08d9db05a5
commit 7f71549831
18 changed files with 80 additions and 26 deletions

View File

@@ -44,11 +44,16 @@ export async function getGameVersion() {
return null
}
const settings = JSON.parse(
await invoke('read_file', {
path: GameData + '\\StreamingAssets\\asb_settings.json',
})
)
try {
const settings = JSON.parse(
await invoke('read_file', {
path: GameData + '\\StreamingAssets\\asb_settings.json',
})
)
} catch (e) {
console.log(`Game config at ${path} not found or invalid. Missing game files?`)
return 0.0
}
const versionRaw = settings.variance.split('.')
const version = {

View File

@@ -10,7 +10,7 @@ export async function toggleEncryption(path: string) {
})
)
} catch (e) {
console.log(`Server config at ${path} not found or invalid`)
console.log(`Server config at ${path} not found or invalid. Be sure to run the server at least once to generate it`)
return
}
@@ -36,7 +36,7 @@ export async function encryptionEnabled(path: string) {
})
)
} catch (e) {
console.log(`Server config at ${path} not found or invalid`)
console.log(`Server config at ${path} not found or invalid. Be sure to run the server at least once to generate it`)
return false
}