mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-08 04:04:53 +02:00
added error screen, if no mods are in the save
This commit is contained in:
parent
597d7b3b23
commit
0886920356
2
src/vendor/factorioSave/factorioSave.go
vendored
2
src/vendor/factorioSave/factorioSave.go
vendored
@ -54,6 +54,7 @@ var constraintGreaterThan0_16 *semver.Constraints
|
||||
|
||||
func ReadHeader(filePath string) (Header, error) {
|
||||
var err error
|
||||
data = Header{}
|
||||
|
||||
constraintGreaterThan0_16, _ = semver.NewConstraint(">= 0.16.0")
|
||||
|
||||
@ -201,7 +202,6 @@ func ReadHeader(filePath string) (Header, error) {
|
||||
data.Mods = append(data.Mods, SingleMod)
|
||||
}
|
||||
|
||||
log.Println(data)
|
||||
return data, nil
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,14 @@ class ModLoadSave extends React.Component {
|
||||
checkboxes.push(singleCheckbox);
|
||||
});
|
||||
|
||||
if(checkboxes.length == 0) {
|
||||
swal({
|
||||
title: "No mods in this save!",
|
||||
type: "error"
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let table = <div>
|
||||
All Mods will be installed
|
||||
<div style={{display: "flex", width: "100%", justifyContent: "center"}}>
|
||||
|
Loading…
Reference in New Issue
Block a user