mirror of
https://github.com/getbible/app.git
synced 2024-12-22 15:58:55 +00:00
added and debugged search mutation & action
This commit is contained in:
parent
466f9a8489
commit
a2ee1d4d5e
@ -77,7 +77,7 @@ export default {
|
|||||||
async initialise({commit}){
|
async initialise({commit}){
|
||||||
commit('toggle_loading', true)
|
commit('toggle_loading', true)
|
||||||
let saved_translations = await idb.getAll('saved_translations').catch(err => console.log(err));
|
let saved_translations = await idb.getAll('saved_translations').catch(err => console.log(err));
|
||||||
|
console.log(saved_translations);
|
||||||
if(!saved_translations) saved_translations = [];
|
if(!saved_translations) saved_translations = [];
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +93,9 @@ export default {
|
|||||||
set_chapter({commit}, payload) {
|
set_chapter({commit}, payload) {
|
||||||
commit('set_chapter', payload)
|
commit('set_chapter', payload)
|
||||||
},
|
},
|
||||||
|
message({commit}, payload){
|
||||||
|
commit('message', payload)
|
||||||
|
},
|
||||||
set_book({commit}, payload) {
|
set_book({commit}, payload) {
|
||||||
commit('set_book', payload)
|
commit('set_book', payload)
|
||||||
},
|
},
|
||||||
@ -107,5 +110,8 @@ export default {
|
|||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
commit('toggle_loading', false)
|
commit('toggle_loading', false)
|
||||||
}, 2500)
|
}, 2500)
|
||||||
|
},
|
||||||
|
search({commit}, payload){
|
||||||
|
commit('search', payload)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -46,16 +46,17 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// save_settings(state, settings){
|
save_settings(state, settings){
|
||||||
// state.settings = settings;
|
state.settings = settings;
|
||||||
// localStorage.setItem('settings', JSON.stringify(settings))
|
localStorage.setItem('settings', JSON.stringify(settings))
|
||||||
// },
|
},
|
||||||
// add_search(state, search){
|
add_search(state, search){
|
||||||
// state.search = search
|
state.search = search
|
||||||
// }
|
},
|
||||||
initialise(state, payload){
|
initialise(state, payload){
|
||||||
state.saved_translations = payload.saved_translations
|
state.saved_translations = payload.saved_translations
|
||||||
state.in_memory_translation = payload.translation
|
state.in_memory_translation = payload.translation
|
||||||
|
console.log(state.saved_translations);
|
||||||
},
|
},
|
||||||
set_chapter(state, payload){
|
set_chapter(state, payload){
|
||||||
state.selected.chapter = payload;
|
state.selected.chapter = payload;
|
||||||
@ -72,5 +73,8 @@ export default {
|
|||||||
},
|
},
|
||||||
toggle_loading(state, payload){
|
toggle_loading(state, payload){
|
||||||
state.loading = payload;
|
state.loading = payload;
|
||||||
|
},
|
||||||
|
search(state, payload){
|
||||||
|
state.search = payload;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user