-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from gorilla-devs/develop
v0.9.3
- Loading branch information
Showing
19 changed files
with
185 additions
and
445 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/components/CurseModpackExplorerModal/CurseModpackExplorerModal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import ContentLoader from 'react-content-loader'; | ||
import axios from 'axios'; | ||
import Modal from '../Common/Modal/Modal'; | ||
import { CURSEMETA_API_URL } from '../../constants'; | ||
import styles from './CurseModpackExplorerModal.scss'; | ||
|
||
const Loader = () => <ContentLoader | ||
height="100%" | ||
width="100%" | ||
speed={0.6} | ||
primaryColor="var(--secondary-color-2)" | ||
secondaryColor="var(--secondary-color-3)" | ||
style={{ | ||
height: '100%', | ||
width: '100%' | ||
}} | ||
> | ||
<rect x="25%" y="50" rx="0" ry="0" width="55%" height="50" /> | ||
{[...Array(Math.round(window.innerHeight / 85))].map((v, i) => <rect x="15%" y={(i * 50) + 120} rx="0" ry="0" width="75%" height="30" />)} | ||
|
||
</ContentLoader>; | ||
|
||
export default props => { | ||
const { addonID } = props.match.params; | ||
const [unMount, setUnMount] = useState(false); | ||
const [packData, setPackData] = useState(null); | ||
|
||
useEffect(async () => { | ||
const { data } = await axios.get(`${CURSEMETA_API_URL}/direct/addon/${addonID}`); | ||
setPackData(data); | ||
}, []); | ||
|
||
return ( | ||
<Modal | ||
history={props.history} | ||
unMount={unMount} | ||
title="Modpack Explorer" | ||
style={{ height: '80vh', width: '80vw', left: '10%' }} | ||
> | ||
{packData !== null ? <div className={styles.container}> | ||
<h1>{packData.name}</h1> | ||
<div className={styles.description}> | ||
<span | ||
dangerouslySetInnerHTML={{ | ||
__html: packData.fullDescription | ||
}} | ||
/> | ||
</div> | ||
</div> : <Loader />} | ||
</Modal> | ||
) | ||
}; |
16 changes: 16 additions & 0 deletions
16
app/components/CurseModpackExplorerModal/CurseModpackExplorerModal.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.container { | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
text-align: center; | ||
overflow-y: auto; | ||
padding: 30px; | ||
} | ||
|
||
.description { | ||
margin-right: 20px; | ||
img { | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.