mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 14:52:38 +00:00
got the changelog page working, yayyyyyyyyyy
This commit is contained in:
@@ -14,6 +14,7 @@ var Homebrew = React.createClass({
|
||||
return {
|
||||
url : "",
|
||||
welcomeText : "",
|
||||
changelog : "",
|
||||
brew : {
|
||||
text : "",
|
||||
shareId : null,
|
||||
@@ -28,9 +29,13 @@ var Homebrew = React.createClass({
|
||||
'/homebrew/edit/:id' : (args) => {
|
||||
return <EditPage id={args.id} entry={this.props.brew} />
|
||||
},
|
||||
|
||||
'/homebrew/share/:id' : (args) => {
|
||||
return <SharePage id={args.id} entry={this.props.brew} />
|
||||
},
|
||||
'/homebrew/changelog' : (args) => {
|
||||
return <SharePage entry={{text : this.props.changelog}} />
|
||||
},
|
||||
'/homebrew*' : <HomePage welcomeText={this.props.welcomeText} />,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -90,6 +90,14 @@ var Statusbar = React.createClass({
|
||||
</a>
|
||||
},
|
||||
|
||||
renderChangelogButton : function(){
|
||||
if(this.props.editId || this.props.shareId) return null;
|
||||
|
||||
return <a className='changelogButton' target='_blank' href='/homebrew/changelog'>
|
||||
Changelog <i className='fa fa-file-text-o' />
|
||||
</a>
|
||||
},
|
||||
|
||||
renderShare : function(){
|
||||
if(!this.props.shareId) return null;
|
||||
|
||||
@@ -138,6 +146,7 @@ var Statusbar = React.createClass({
|
||||
</a>
|
||||
</div>
|
||||
<div className='controls right'>
|
||||
{this.renderChangelogButton()}
|
||||
{this.renderStatus()}
|
||||
{this.renderInfo()}
|
||||
{this.renderSourceButton()}
|
||||
|
||||
@@ -58,6 +58,14 @@
|
||||
background-color : fade(@green, 70%);
|
||||
}
|
||||
}
|
||||
.changelogButton{
|
||||
.animate(background-color);
|
||||
color : white;
|
||||
text-decoration : none;
|
||||
&:hover{
|
||||
background-color : fade(@purple, 70%);
|
||||
}
|
||||
}
|
||||
.deleteButton{
|
||||
.animate(background-color);
|
||||
color : white;
|
||||
|
||||
@@ -18,13 +18,14 @@ var Router = CreateRouter({
|
||||
var NaturalCrit = React.createClass({
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
url : '/'
|
||||
url : '/',
|
||||
changelog : ''
|
||||
};
|
||||
},
|
||||
|
||||
render : function(){
|
||||
return <div className='naturalCrit'>
|
||||
<Router initialUrl={this.props.url} />
|
||||
<Router initialUrl={this.props.url} scope={this}/>
|
||||
</div>
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user