Add basics of Help page
This commit is contained in:
parent
5f64e0dbae
commit
b5fcb77e22
4 changed files with 31 additions and 3 deletions
1
dist/index.html
vendored
1
dist/index.html
vendored
|
@ -26,6 +26,7 @@
|
||||||
<script src="./js/component/splash.js"></script>
|
<script src="./js/component/splash.js"></script>
|
||||||
<script src="./js/page/home.js"></script>
|
<script src="./js/page/home.js"></script>
|
||||||
<script src="./js/page/settings.js"></script>
|
<script src="./js/page/settings.js"></script>
|
||||||
|
<script src="./js/page/help.js"></script>
|
||||||
<script src="./js/app.js"></script>
|
<script src="./js/app.js"></script>
|
||||||
<script src="./js/main.js"></script>
|
<script src="./js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
13
js/app.js
13
js/app.js
|
@ -5,9 +5,16 @@ var appStyles = {
|
||||||
};
|
};
|
||||||
var App = React.createClass({
|
var App = React.createClass({
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
var query = window.location.search.slice(1);
|
||||||
viewingPage: window.location.search === '?settings' ? 'settings' : 'home'
|
if (query == 'settings' || query == 'help') {
|
||||||
|
var viewingPage = query;
|
||||||
|
} else {
|
||||||
|
var viewingPage = 'home';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
viewingPage: viewingPage
|
||||||
|
};
|
||||||
},
|
},
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
lbry.checkNewVersionAvailable(function(isAvailable) {
|
lbry.checkNewVersionAvailable(function(isAvailable) {
|
||||||
|
@ -45,6 +52,8 @@ var App = React.createClass({
|
||||||
var content = <HomePage />;
|
var content = <HomePage />;
|
||||||
} else if (this.state.viewingPage == 'settings') {
|
} else if (this.state.viewingPage == 'settings') {
|
||||||
var content = <SettingsPage />;
|
var content = <SettingsPage />;
|
||||||
|
} else if (this.state.viewingPage == 'help') {
|
||||||
|
var content = <HelpPage />;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={appStyles}>
|
<div style={appStyles}>
|
||||||
|
|
16
js/page/help.js
Normal file
16
js/page/help.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
var HelpPage = React.createClass({
|
||||||
|
render: function() {
|
||||||
|
return (
|
||||||
|
<main>
|
||||||
|
<h1>Help</h1>
|
||||||
|
<p>Content will go here</p>
|
||||||
|
<h3>Subsection</h3>
|
||||||
|
<p>More content</p>
|
||||||
|
<p>Even more content</p>
|
||||||
|
<section>
|
||||||
|
<Link href="/" label="<< Return"/>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
|
@ -238,7 +238,9 @@ var TopBar = React.createClass({
|
||||||
<span style={balanceStyle}>
|
<span style={balanceStyle}>
|
||||||
<CreditAmount amount={this.state.balance}/>
|
<CreditAmount amount={this.state.balance}/>
|
||||||
</span>
|
</span>
|
||||||
<Link href='/?settings' icon="icon-gear" />
|
<Link href='/?settings' icon='icon-gear' />
|
||||||
|
{ ' ' }
|
||||||
|
<Link href='/?help' icon='icon-question-circle' />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue