mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-10 04:19:38 +02:00
added factorio_version to the ui
This commit is contained in:
parent
6b9639e927
commit
113fcc8b24
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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'
|
||||
|
@ -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>
|
||||
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user