postingInitialState.js 980 Bytes
/**
 * # postingInitialState.js
 *
 *
 */
'use strict';
/**
 * ## Import immutable record
 */
import Immutable, {List, Record} from 'immutable';

/**
 * ## InitialState
 *
 * The fields we're concerned with
 */
let InitialState = Record({
	canSubmit: false,	// 是否可以点击发送button
	boards: new (Record({
		isFetching: false,
		error: null,
		list: List(),
	})),
	userState: new (Record({
		isFetching: false,
		error: null,
		forbidNickname: 'N',
		forbidSpeaking: 'N',
	})),
	post: new (Record({
		title: '',
		content: '',
		sectionId: 0,
		sectionName: '',
		assets: List(),
	})),
	postState: new (Record({
		isPosting: false,	// 是否正在上传
		error: null,
		showProcess: false,
		status: 0,	// 0 - 未发布,1 - 发布中,2 - 发布成功,3 - 发布失败
		stage: 0,	// 0 - 图片上传,1 - 帖子上传
		uploadedImageCount: 0, // 已上传图片数量
		uploadedImagePercent: 0, // 已上传图片百分比
	})),
});

export default InitialState;