mirror of
https://github.com/getbible/app.git
synced 2024-12-22 15:58:55 +00:00
Merge branch 'main' of github.com:getbible/app into main
Please enter a commit message to explain why this merge is necessary,
This commit is contained in:
commit
1b5c327508
@ -84,11 +84,11 @@ export default {
|
|||||||
return this.filteredChapters
|
return this.filteredChapters
|
||||||
},
|
},
|
||||||
filteredChapters() {
|
filteredChapters() {
|
||||||
return _.orderBy(this.chapter.verses.filter((item) => item.verse.toString().toLowerCase()
|
return _.orderBy(this.chapter.verses.filter((item) =>
|
||||||
.includes(this.search.toLowerCase())
|
item.verse.toString().toLowerCase().includes(this.search.toLowerCase())
|
||||||
|| item.chapter.toString().toLowerCase().includes(this.search.toLowerCase())
|
|| item.chapter.toString().toLowerCase().includes(this.search.toLowerCase())
|
||||||
|| item.name.toString().toLowerCase().includes(this.search.toLowerCase())
|
|| item.name.toString().toLowerCase().includes(this.search.toLowerCase())
|
||||||
|| item.text.toLowerCase().includes(this.search.toLowerCase())), 'verse');
|
|| item.text.toLowerCase().includes(this.search.toLowerCase())), 'verse');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@ -97,24 +97,32 @@ export default {
|
|||||||
this.progress = 95
|
this.progress = 95
|
||||||
let config = {
|
let config = {
|
||||||
headers: {'Access-Control-Allow-Origin': '*'}
|
headers: {'Access-Control-Allow-Origin': '*'}
|
||||||
};
|
};
|
||||||
|
|
||||||
fetch(`https://getbible.net/v2/${this.translation}/${this.book}/${this.chapter_num}.json`, config)
|
let url = `https://getbible.net/v2/${this.translation}/${this.book}/${this.chapter_num}.json`
|
||||||
.then(response => {
|
|
||||||
this.progress = 99
|
|
||||||
return response.json()})
|
|
||||||
.then(data => {
|
|
||||||
this.loading =false
|
|
||||||
|
|
||||||
// console.log(data)
|
let response = fetch(url, config).catch(function(err) {
|
||||||
|
this.chapter = err
|
||||||
|
this.loading =false
|
||||||
|
this.message = 'Error'
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response) return;
|
||||||
|
|
||||||
|
this.progress = 99
|
||||||
|
let data = response.json().catch(err => {
|
||||||
|
this.chapter = err
|
||||||
|
this.loading =false
|
||||||
|
this.message = 'Error'
|
||||||
|
})
|
||||||
|
this.loading =false
|
||||||
|
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
this.chapter = data
|
this.chapter = data
|
||||||
this.progress =0
|
this.progress =0
|
||||||
}).catch(function(err) {
|
|
||||||
this.chapter = err
|
|
||||||
this.loading =false
|
|
||||||
this.message = 'Error'
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
async update_tr(){
|
async update_tr(){
|
||||||
|
|
||||||
@ -126,7 +134,8 @@ export default {
|
|||||||
this.loading =true
|
this.loading =true
|
||||||
this.progress =25
|
this.progress =25
|
||||||
this.message = 'Loading...'
|
this.message = 'Loading...'
|
||||||
fetch(`https://getbible.net/v2/${this.translation}/books.json`,config)
|
let url = `https://getbible.net/v2/${this.translation}/books.json`
|
||||||
|
fetch(url,config)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user