1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Going LIte

This commit is contained in:
Rokt33r
2015-10-30 14:53:09 +09:00
parent ba0daf4452
commit d9442aa23c
40 changed files with 978 additions and 853 deletions

33
browser/finder/actions.js Normal file
View File

@@ -0,0 +1,33 @@
export const SELECT_ARTICLE = 'SELECT_ARTICLE'
export const SEARCH_ARTICLE = 'SEARCH_ARTICLE'
export const REFRESH_DATA = 'REFRESH_DATA'
export function selectArticle (key) {
return {
type: SELECT_ARTICLE,
data: { key }
}
}
export function searchArticle (input) {
return {
type: SEARCH_ARTICLE,
data: { input }
}
}
export function refreshData () {
console.log('refreshing data')
let data = JSON.parse(localStorage.getItem('local'))
if (data == null) return null
let { folders, articles } = data
return {
type: REFRESH_DATA,
data: {
articles,
folders
}
}
}