-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add info to home page, more explicit repo selector on home
- Loading branch information
Showing
12 changed files
with
154 additions
and
88 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import React, { Component } from 'react'; | ||
import React, { Component, Fragment } from 'react'; | ||
import AppCard from './AppCard'; | ||
import LibGet from './LibGet'; | ||
import loader from './img/loader.gif'; | ||
import Sidebar from './Sidebar'; | ||
import { getParams, Spacer, Mobile, stringDateToTimestamp } from './Utils'; | ||
import PlatformPicker from './PlatformPicker'; | ||
import icon from './img/icon.png'; | ||
|
||
let sorts = [{ | ||
flavor: "by most recent", | ||
|
@@ -107,24 +109,43 @@ class AppList extends Component { | |
let fdbk = () => { | ||
window.location.href = ("mailto:[email protected]?subject=[HBAS] App Store Feedback"); // temp link | ||
} | ||
let help = () => { | ||
window.location.href = (`https://discord.gg/F2PKpEj`); // temp link | ||
} | ||
|
||
let { flavor: sortFlavor } = sorts[curSort]; | ||
|
||
let headerText = ( | ||
const isOnHome = window.location.pathname === "" || window.location.pathname === "/"; | ||
|
||
const platformPicker = isOnHome ? <div id="homeBlurb" style={{ | ||
marginBottom: 10, | ||
marginLeft: 50, | ||
marginRight: 50, | ||
marginTop: 10, | ||
maxWidth: 1100}}> | ||
<div style={{padding: 10, textAlign: "center"}}> | ||
<img src={icon} alt="AppStore Logo" style={{ width: 64, verticalAlign: "middle" }} /> | ||
<span style={{ | ||
fontSize: 40, | ||
verticalAlign: "middle", | ||
padding: 10 | ||
}}>Homebrew App Store</span> | ||
</div> | ||
<p>Homebrew App Store is a free and open-source repository of <a href="https://en.wikipedia.org/wiki/Homebrew_(video_games)">homebrew apps</a> for the Wii U and Switch consoles. The apps, tools, and games distributed here are all made by independent software developers within the community.</p> | ||
<p>If you would like to list your own open-source app here, or request an existing one to add to this index, please see the <a href="/submit-or-request">Submit</a> page. For other info about the team and project, see our <a href="/about">About</a> page.</p> | ||
<PlatformPicker /> | ||
</div> : null; | ||
|
||
let headerText = (<Fragment> | ||
{platformPicker} | ||
<div className="catTitle"> | ||
<div className="menuspan"> | ||
{name} <br className="mobilebr"></br><span className="sort">{sortFlavor}</span> | ||
</div> | ||
<div className="menu"> | ||
<button onClick={() => this.adjustSort(this)}>Adjust Sort</button> | ||
<button id="feedback" onClick={fdbk}>Feedback</button> | ||
<button onClick={help}>Help!</button> | ||
<button id="feedback" onClick={fdbk}>Leave Feedback</button> | ||
{/* <button onClick={help}>Help!</button> */} | ||
</div> | ||
</div> | ||
); | ||
</Fragment>); | ||
|
||
const updateURL = async (event) => { | ||
this.query = event.target.value; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React, { Component } from 'react'; | ||
import { Spacer, Mobile } from './Utils'; | ||
|
||
class InfoPage extends Component { | ||
render() { | ||
// temporary, until pages are implemented | ||
const location = window.location.pathname; | ||
|
||
if (location === "/about") { | ||
window.location.href = "https://fortheusers.org"; | ||
} else if (location === "/api-info") { | ||
window.location.href = "https://github.com/fortheusers/libget/wiki/Overview-&-Glossary#repos"; | ||
} else if (location === "/submit-or-request") { | ||
window.location.href = "https://submit.fortheusers.org/"; | ||
} | ||
|
||
const pageText = <div> | ||
This page intentionally left blank. | ||
</div>; | ||
|
||
return ( | ||
<div className="AppList"> | ||
<Mobile /> | ||
{ pageText } | ||
<Spacer /> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default InfoPage; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { Fragment } from 'react'; | ||
import { platformIcons } from "./Utils"; | ||
|
||
export const plats = { | ||
"wiiu": "Wii U", | ||
"switch": "Switch", | ||
"all": "Both", | ||
}; | ||
|
||
const PlatformPicker = ({path = ""}) => { | ||
const platformSelect = (Object.keys(plats)).map(plat => { | ||
return ( | ||
<a href={`/${plat}${path}`} className="platChooser"> | ||
<div> | ||
<img style={{width: 100}} src={platformIcons[plat]} alt={plats[plat]} /> | ||
<h3>{plats[plat]}</h3> | ||
</div> | ||
</a> | ||
); | ||
}); | ||
return (<div style={{width: 500, margin: "0 auto", marginTop: 40}}> | ||
<h2 style={{fontSize: 18, padding: 5, backgroundColor: "unset", textAlign: "center"}}>Choose a Platform</h2> | ||
<div style={{display: "flex"}}>{ platformSelect }</div> | ||
</div>); | ||
}; | ||
|
||
export default PlatformPicker; |
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.