@@ -143,6 +143,7 @@ export const ModList = (props: {selected: string, searchQuery: string, setSearch
143143
144144 let availableList = new Array < React . ReactNode > ( )
145145 let installedList = new Array < React . ReactNode > ( )
146+ let modLoaderList = new Array < React . ReactNode > ( )
146147
147148 const app = context ! . state
148149
@@ -192,17 +193,34 @@ export const ModList = (props: {selected: string, searchQuery: string, setSearch
192193 } return
193194 } ) . filter ( x => x ) // remove null
194195 }
196+
197+ if ( modList . findIndex ( mod => mod . ModGUID == "hacktix.winch" ) == - 1 ) {
198+ const filteredMods = filterSortMods ( database ! , props . searchQuery , props . sortField , props . sortDirection ) ;
199+ modLoaderList = filteredMods . map ( ( mod ) => {
200+ if ( ! info ! . has ( mod . ModGUID ) && mod . ModGUID == "hacktix.winch" ) {
201+ return < AvailableMod
202+ key = { mod . ModGUID }
203+ data = { mod }
204+ installMod = { installMod } />
205+ } return
206+ } ) . filter ( x => x ) // remove null
207+ }
195208 }
196209
197210 let shownList = availableList
198211
199- if ( props . selected === "Installed" ) {
200- // #6 Prompt user to install Winch if it is not installed
201- if ( modList . findIndex ( mod => mod . ModGUID == "hacktix.winch" ) == - 1 ) {
202- return < div className = "mods-not-found" >
203- All mods require the Winch modloader to be installed. Download it in the "Available" tab.
212+ // #6 Prompt user to install Winch if it is not installed
213+ if ( modList . findIndex ( mod => mod . ModGUID == "hacktix.winch" ) == - 1 ) {
214+ return < div className = "center" >
215+ < div className = "mods-not-found" >
216+ < h3 className = "warning" > All mods require the Winch modloader to be installed!</ h3 >
217+ < h2 className = "warning" > Install it now!</ h2 >
218+ { modLoaderList }
204219 </ div >
205- }
220+ </ div >
221+ }
222+
223+ if ( props . selected === "Installed" ) {
206224 shownList = installedList ;
207225 }
208226
0 commit comments