1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

行動データ, contact form, default articleに英語文追加, Intro fix

This commit is contained in:
Rokt33r
2015-11-09 15:07:17 +09:00
parent 8428588a4c
commit 746df9277c
12 changed files with 356 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ import _ from 'lodash'
import { SWITCH_FOLDER, SWITCH_MODE, SWITCH_ARTICLE, SET_SEARCH_FILTER, SET_TAG_FILTER, CLEAR_SEARCH, ARTICLE_UPDATE, ARTICLE_DESTROY, FOLDER_CREATE, FOLDER_UPDATE, FOLDER_DESTROY, IDLE_MODE, CREATE_MODE } from './actions'
import dataStore from 'boost/dataStore'
import keygen from 'boost/keygen'
import activityRecord from 'boost/activityRecord'
const initialStatus = {
mode: IDLE_MODE,
@@ -36,6 +37,7 @@ function folders (state = initialFolders, action) {
state.push(newFolder)
dataStore.setFolders(null, state)
activityRecord.emit('FOLDER_CREATE')
return state
}
case FOLDER_UPDATE:
@@ -54,7 +56,6 @@ function folders (state = initialFolders, action) {
let conflictFolder = _.find(state, _folder => {
return folder.name === _folder.name && folder.key !== _folder.key
})
console.log(conflictFolder)
if (conflictFolder != null) throw new Error('Name conflicted')
}
Object.assign(targetFolder, folder, {
@@ -62,6 +63,7 @@ function folders (state = initialFolders, action) {
})
dataStore.setFolders(null, state)
activityRecord.emit('FOLDER_UPDATE')
return state
}
case FOLDER_DESTROY:
@@ -74,6 +76,7 @@ function folders (state = initialFolders, action) {
state.splice(targetIndex, 1)
}
dataStore.setFolders(null, state)
activityRecord.emit('FOLDER_DESTROY')
return state
}
default: