Renamed "save" into "publish"

This commit is contained in:
Jori Lallo
2017-02-09 20:47:02 -08:00
parent 14f3ad00a1
commit 7319e69192
2 changed files with 9 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ class SaveAction extends React.Component {
static propTypes = {
onClick: React.PropTypes.func.isRequired,
disabled: React.PropTypes.bool,
isNew: React.PropTypes.bool,
}
onClick = (event) => {
@@ -16,14 +17,18 @@ class SaveAction extends React.Component {
}
render() {
const { disabled, isNew } = this.props;
return (
<div>
<a
href
onClick={ this.onClick }
style={ { opacity: this.props.disabled ? 0.5 : 1 } }
style={{ opacity: disabled ? 0.5 : 1 }}
title="Save changes (Cmd+Enter)"
>Save</a>
>
{ isNew ? 'Publish' : 'Save' }
</a>
</div>
);
}

View File

@@ -126,6 +126,7 @@ class DocumentEdit extends Component {
);
let titleText = this.store.title;
let isNew = this.props.route.newDocument || this.props.route.newChildDocument;
const actions = (
<Flex>
@@ -133,6 +134,7 @@ class DocumentEdit extends Component {
<SaveAction
onClick={ this.onSave }
disabled={ this.store.isSaving }
isNew={ isNew }
/>
</HeaderAction>
<DropdownMenu label={ <MoreIcon /> }>