added factorio_version to the ui

This commit is contained in:
knoxfighter 2017-11-16 08:51:19 +01:00
parent 6b9639e927
commit 113fcc8b24
5 changed files with 5 additions and 1 deletions

View File

@ -57,6 +57,7 @@ func (mods *Mods) listInstalledMods() ModsResultList {
mods_result.Author = mod_info.Author
mods_result.Title = mod_info.Title
mods_result.Version = mod_info.Version
mods_result.FactorioVersion = mod_info.FactorioVersion
for _, simple_mod := range mods.ModSimpleList.Mods {
if simple_mod.Name == mods_result.Name {

View File

@ -22,6 +22,7 @@ type ModInfo struct {
Title string `json:"title"`
Author string `json:"author"`
FileName string `json:"file_name"`
FactorioVersion string `json:"factorio_version"`
}
func newModInfoList(destination string) (ModInfoList, error) {

View File

@ -120,6 +120,7 @@ class Mod extends React.Component {
<td>{this.props.mod.title}</td>
<td>{modStatus}</td>
<td>{version}</td>
<td>{this.props.mod.factorio_version}</td>
<td>
<input className='btn btn-default btn-sm'
ref='modName'

View File

@ -18,6 +18,7 @@ class ModManager extends React.Component {
<th>Name</th>
<th>Status</th>
<th>Version</th>
<th>Factorio Version</th>
<th>Toggle/Remove</th>
</tr>
</thead>

View File

@ -46,7 +46,7 @@ class ModsContent extends React.Component {
this.setState({installedMods: data.data})
},
error: (xhr, status, err) => {
console.log('api/mods/list', status, err.toString());
console.log('api/mods/list/installed', status, err.toString());
}
});
}