Skip to content
Permalink
Browse files

wipe risa

  • Loading branch information...
Cookie-Kumano committed Feb 11, 2019
1 parent a99f02a commit e0348ce9d095f743e69e5c96ce5e696e48ae68e6
@@ -2,26 +2,10 @@ import { changeCompose } from '../actions/compose';



export const UTILBTNS_RISA = 'UTILBTNS_RISA';
export const UTILBTNS_GOJI = 'UTILBTNS_GOJI';
export const UTILBTNS_HARUKIN = 'UTILBTNS_HARUKIN';

export function submitRisa (textarea) {
return function (dispatch, getState) {
let text = `@RISA ${textarea.value}`;

dispatch(submitRisaRequest());
dispatch(changeCompose(text));

textarea.focus();
}
}

export function submitRisaRequest () {
return {
type: UTILBTNS_RISA
}
}

export function submitGoji (textarea) {
return function (dispatch, getState) {
@@ -28,7 +28,7 @@ const messages = defineMessages({
publish: { id: 'compose_form.publish', defaultMessage: 'Toot' },
publishLoud: { id: 'compose_form.publish_loud', defaultMessage: '{publish}!' },

utilBtns_risa: { id: 'compose_form.utilBtns_risa', defaultMessage: 'RISA' },

utilBtns_goji: { id: 'compose_form.utilBtns_goji', defaultMessage: 'Typo!!!' },
utilBtns_harukin: { id: 'compose_form.utilBtns_harukin', defaultMessage: 'Burn Harukin' }
});
@@ -65,7 +65,7 @@ class ComposeForm extends ImmutablePureComponent {
showSearch: PropTypes.bool,
anyMedia: PropTypes.bool,

onRisaSubmit: PropTypes.func.isRequired,

onGojiSubmit: PropTypes.func.isRequired,
onHarukinSubmit: PropTypes.func.isRequired
};
@@ -167,7 +167,7 @@ class ComposeForm extends ImmutablePureComponent {
this.props.onPickEmoji(position, data, needsSpace);
}

handleOnRisaSubmit = () => this.props.onRisaSubmit(this.autosuggestTextarea.textarea);

handleOnGojiSubmit = () => this.props.onGojiSubmit(this.autosuggestTextarea.textarea);
handleOnHarukinSubmit = () => this.props.onHarukinSubmit(this.autosuggestTextarea.textarea);

@@ -232,14 +232,15 @@ class ComposeForm extends ImmutablePureComponent {

<div className='compose-form__publish'>
<div className='compose-form__publish-button-wrapper'>
<Button className="compose-form__utilBtns-risa" text={intl.formatMessage(messages.utilBtns_risa)} onClick={this.handleOnRisaSubmit} />

<Button text={publishText} onClick={this.handleSubmit} disabled={disabledButton} block>
<span className="fa fa-send">{publishText}</span>
</Button>
</div>
</div>

<div className="compose-form__utilBtns">

<Button className="compose-form__utilBtns-goji" text={intl.formatMessage(messages.utilBtns_goji)} onClick={this.handleOnGojiSubmit} block />
<Button className="compose-form__utilBtns-harukin" text={intl.formatMessage(messages.utilBtns_harukin)} onClick={this.handleOnHarukinSubmit} block />
</div>
@@ -13,7 +13,6 @@ import {
} from '../../../actions/compose';

import {
submitRisa,
submitGoji,
submitHarukin
} from '../../../actions/UtilBtns';
@@ -80,7 +80,7 @@
"compose_form.spoiler.marked": "閲覧注意が設定されています",
"compose_form.spoiler.unmarked": "閲覧注意が設定されていません",
"compose_form.spoiler_placeholder": "ここに警告を書いてください",
"compose_form.utilBtns_risa": "りさ姉",

"compose_form.utilBtns_goji": "誤字盛!",
"compose_form.utilBtns_harukin": "はるきん焼却",
"confirmation_modal.cancel": "キャンセル",

0 comments on commit e0348ce

Please sign in to comment.
You can’t perform that action at this time.