Fix text that says publishing for v1 (#2831)
* Fix text that says publishing for v1 * Remove currently in beta text in settings
This commit is contained in:
parent
209f796c8d
commit
3f7ef59d23
3 changed files with 10 additions and 7 deletions
|
|
@ -212,10 +212,11 @@ export default class ArticleForm extends Component {
|
|||
|
||||
onClearChanges = e => {
|
||||
e.preventDefault();
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
const revert = confirm(
|
||||
'Are you sure you want to revert to the previous save?',
|
||||
);
|
||||
if (!revert) return;
|
||||
if (!revert && navigator.userAgent !== 'DEV-Native-ios') return;
|
||||
this.setState({
|
||||
title: this.article.title || '',
|
||||
tagList: this.article.cached_tag_list || '',
|
||||
|
|
@ -276,7 +277,7 @@ export default class ArticleForm extends Component {
|
|||
errors,
|
||||
version
|
||||
} = this.state;
|
||||
const notice = submitting ? <Notice published={published} /> : '';
|
||||
const notice = submitting ? <Notice published={published} version={version} /> : '';
|
||||
const imageArea = (mainImage && !previewShowing && version === 'v2') ? (
|
||||
<MainImage mainImage={mainImage} onEdit={this.toggleImageManagement} />
|
||||
) : (
|
||||
|
|
@ -343,9 +344,11 @@ export default class ArticleForm extends Component {
|
|||
)
|
||||
controls = (
|
||||
<div className={title.length > 128 ? 'articleform__titleTooLong' : ''}>
|
||||
<Title defaultValue={title}
|
||||
<Title
|
||||
defaultValue={title}
|
||||
onKeyDown={this.handleTitleKeyDown}
|
||||
onChange={linkState(this, 'title')} />
|
||||
onChange={linkState(this, 'title')}
|
||||
/>
|
||||
<div className="articleform__detailfields">
|
||||
<Tags defaultValue={tagList} onInput={linkState(this, 'tagList')} />
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
import { h } from 'preact';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const Notice = ({ published }) => (
|
||||
const Notice = ({ published, version }) => (
|
||||
<div
|
||||
className={`articleform__notice articleform__notice--${
|
||||
published ? 'publishing' : 'draft'
|
||||
}`}
|
||||
>
|
||||
{published ? 'Publishing...' : 'Saving Draft...'}
|
||||
{(published && version === 'v2') ? 'Publishing...' : `Saving ${ version === 'v2' ? 'Draft' : ''}...`}
|
||||
</div>
|
||||
);
|
||||
|
||||
Notice.propTypes = {
|
||||
published: PropTypes.bool.isRequired,
|
||||
version: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default Notice;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
<div class="sub-field">
|
||||
<%= f.label :editor_version, "Editor version: v1 or v2" %>
|
||||
<%= f.select :editor_version, options_for_select(%w[v1 v2], @user.editor_version) %>
|
||||
<sub><em>v2 is currently in beta</em></sub>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label></label>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue