mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
Add download menu translations
Update download menu formatting Better error logging
This commit is contained in:
@@ -17,6 +17,12 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.HeaderText {
|
||||
text-decoration: underline;
|
||||
text-decoration: rgb(1, 37, 37);
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.DownloadValue .BigButton {
|
||||
height: 100%;
|
||||
min-height: 30px;
|
||||
|
||||
@@ -212,7 +212,10 @@ export default class Downloads extends React.Component<IProps, IState> {
|
||||
render() {
|
||||
return (
|
||||
<Menu closeFn={this.props.closeFn} className="Downloads" heading="Downloads">
|
||||
<div className="DownloadMenuSection" id="downloadMenuAIOHeader">
|
||||
|
||||
<Divider />
|
||||
|
||||
<div className="HeaderText" id="downloadMenuAIOHeader">
|
||||
<Tr text = "downloads.aio_header" />
|
||||
</div>
|
||||
<div className="DownloadMenuSection" id="downloadMenuContainerGCFullBuild">
|
||||
@@ -252,8 +255,8 @@ export default class Downloads extends React.Component<IProps, IState> {
|
||||
</BigButton>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="DownloadMenuSection" id="downloadMenuIndividualHeader">
|
||||
<Tr text = "downloads.individual_header" />
|
||||
<div className="HeaderText" id="downloadMenuIndividualHeader">
|
||||
<HeaderText text = "downloads.individual_header" />
|
||||
</div>
|
||||
<div className="DownloadMenuSection" id="downloadMenuContainerGCDev">
|
||||
<div className="DownloadLabel" id="downloadMenuLabelGCDev">
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user