Add floodgate fabric back to downloads page
This commit is contained in:
2 files changed
+23
-1
No files matched your search
@@ -12,10 +12,13 @@ interface ProjectDownloadProps {
|
|||||||
downloadsInfo: {
|
downloadsInfo: {
|
||||||
[key: string]: string | React.ReactNode;
|
[key: string]: string | React.ReactNode;
|
||||||
};
|
};
|
||||||
|
additionalDownloads?: {
|
||||||
|
[key: string]: { url: string, file: string };
|
||||||
|
};
|
||||||
gridColumns?: number;
|
gridColumns?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ProjectDownload: React.FC<ProjectDownloadProps> = ({ projectId, description, setup, downloadsInfo, gridColumns }) => {
|
export const ProjectDownload: React.FC<ProjectDownloadProps> = ({ projectId, description, setup, downloadsInfo, additionalDownloads, gridColumns }) => {
|
||||||
const [platformInfo, setPlatformInfo] = useState<Downloads.Builds>({
|
const [platformInfo, setPlatformInfo] = useState<Downloads.Builds>({
|
||||||
project_id: '',
|
project_id: '',
|
||||||
project_name: '',
|
project_name: '',
|
||||||
@@ -93,6 +96,18 @@ export const ProjectDownload: React.FC<ProjectDownloadProps> = ({ projectId, des
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
additionalDownloads && Object.keys(additionalDownloads).map((platformId, i) => {
|
||||||
|
return (
|
||||||
|
<a href={additionalDownloads[platformId].url} key={i} className='no-underline download-button large-button'>
|
||||||
|
<b>{downloadsInfo[platformId]}</b>
|
||||||
|
<div>
|
||||||
|
<FontAwesomeIcon icon={faFileArrowDown}/> {additionalDownloads[platformId].file}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Column>
|
</Column>
|
||||||
<Column>
|
<Column>
|
||||||
|
|||||||
@@ -52,6 +52,13 @@ const DownloadPage: React.FC = () => (
|
|||||||
bungee: <PlatformIcon svg={WaterfallBungeeCordIcon} text="BungeeCord" />,
|
bungee: <PlatformIcon svg={WaterfallBungeeCordIcon} text="BungeeCord" />,
|
||||||
spigot: <PlatformIcon img={PaperSpigotIcon} text="Spigot/Paper" />,
|
spigot: <PlatformIcon img={PaperSpigotIcon} text="Spigot/Paper" />,
|
||||||
velocity: <PlatformIcon img={VelocityIcon} text="Velocity" />,
|
velocity: <PlatformIcon img={VelocityIcon} text="Velocity" />,
|
||||||
|
fabric: <PlatformIcon img={FabricIcon} text="Fabric" />,
|
||||||
|
}}
|
||||||
|
additionalDownloads={{
|
||||||
|
fabric: {
|
||||||
|
url: "https://modrinth.com/mod/floodgate",
|
||||||
|
file: "floodgate-fabric.jar"
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
Reference in new issue
Block a user