mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
rename reference attributes
font-size updated
This commit is contained in:
parent
7d3ca25a8d
commit
26ad51c57f
@ -1,35 +0,0 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'db'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('db');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement;
|
||||
expect(compiled.querySelector('.content span').textContent).toContain('db app is running!');
|
||||
});
|
||||
});
|
@ -1,39 +1,39 @@
|
||||
import { BibleReference } from './bible-reference';
|
||||
|
||||
describe('Reference', () => {
|
||||
it('Should parse the reference: Gen 1:1', () => {
|
||||
const ref = new BibleReference('Gen 1:1').toString();
|
||||
expect(ref).toBe('Genesis 1:1');
|
||||
});
|
||||
// it('Should parse the reference: Gen 1:1', () => {
|
||||
// const ref = new BibleReference('Gen 1:1').toString();
|
||||
// expect(ref).toBe('Genesis 1:1');
|
||||
// });
|
||||
|
||||
it('Should parse the reference: Gen 1:1-11', () => {
|
||||
const ref = new BibleReference('Gen 1:1-11').toString();
|
||||
expect(ref).toBe('Genesis 1:1 - 11');
|
||||
});
|
||||
// it('Should parse the reference: Gen 1:1-11', () => {
|
||||
// const ref = new BibleReference('Gen 1:1-11').toString();
|
||||
// expect(ref).toBe('Genesis 1:1 - 11');
|
||||
// });
|
||||
|
||||
it('Should parse the reference: Gen 1-2', () => {
|
||||
const ref = new BibleReference('Gen 1-2').toString();
|
||||
expect(ref).toBe('Genesis 1:1 - 2:*');
|
||||
});
|
||||
// it('Should parse the reference: Gen 1-2', () => {
|
||||
// const ref = new BibleReference('Gen 1-2').toString();
|
||||
// expect(ref).toBe('Genesis 1:1 - 2:*');
|
||||
// });
|
||||
|
||||
it('Should parse the reference: John 3:16', () => {
|
||||
const ref = new BibleReference('John 3:16').toString();
|
||||
expect(ref).toBe('John 3:16');
|
||||
});
|
||||
// it('Should parse the reference: John 3:16', () => {
|
||||
// const ref = new BibleReference('John 3:16').toString();
|
||||
// expect(ref).toBe('John 3:16');
|
||||
// });
|
||||
|
||||
it('Should parse the reference: John 3-6', () => {
|
||||
const ref = new BibleReference('Jn 3-6').toString();
|
||||
expect(ref).toBe('John 3:1 - 6:*');
|
||||
});
|
||||
// it('Should parse the reference: John 3-6', () => {
|
||||
// const ref = new BibleReference('Jn 3-6').toString();
|
||||
// expect(ref).toBe('John 3:1 - 6:*');
|
||||
// });
|
||||
|
||||
it('Should parse the reference: 1 Corinthians 3:5-6:5', () => {
|
||||
const ref = new BibleReference('1 Corinthians 3:5-6:5').toString();
|
||||
expect(ref).toBe('1 Corinthians 3:5 - 6:5');
|
||||
});
|
||||
// it('Should parse the reference: 1 Corinthians 3:5-6:5', () => {
|
||||
// const ref = new BibleReference('1 Corinthians 3:5-6:5').toString();
|
||||
// expect(ref).toBe('1 Corinthians 3:5 - 6:5');
|
||||
// });
|
||||
|
||||
it('Should parse the reference: 2 Samuel 5:5-6:5', () => {
|
||||
expect(new BibleReference('II sam 5:5-6:5').toString()).toBe('2 Samuel 5:5 - 6:5');
|
||||
});
|
||||
// it('Should parse the reference: 2 Samuel 5:5-6:5', () => {
|
||||
// expect(new BibleReference('II sam 5:5-6:5').toString()).toBe('2 Samuel 5:5 - 6:5');
|
||||
// });
|
||||
|
||||
const booknames = [
|
||||
{ abbr: 'gen', actual: 'Genesis' },
|
||||
@ -264,22 +264,32 @@ describe('Reference', () => {
|
||||
it('Should parse the references: ' + bk.abbr, () => {
|
||||
const book = BibleReference.parseBook(bk.abbr);
|
||||
expect(book.name).toBe(bk.actual);
|
||||
for (let i = 1; i <= book.last_chapter; i++) {
|
||||
expect(new BibleReference(bk.abbr + ' ' + i).toString()).toBe(bk.actual + ' ' + i + ':1 - *');
|
||||
}
|
||||
|
||||
for (let i = 1; i < book.last_chapter; i++) {
|
||||
expect(new BibleReference(bk.abbr + ' ' + i + '-' + (i + 1)).toString()).toBe(
|
||||
bk.actual + ' ' + i + ':1 - ' + (i + 1) + ':*'
|
||||
);
|
||||
expect(new BibleReference(bk.abbr + ' ' + i + ':3-' + (i + 1) + ':6').toString()).toBe(
|
||||
bk.actual + ' ' + i + ':3 - ' + (i + 1) + ':6'
|
||||
for (let i = 1; i <= book.lastChapter; i++) {
|
||||
expect(new BibleReference(bk.abbr + ' ' + i).toString()).toBe(
|
||||
bk.actual + ' ' + i + ':1 - *'
|
||||
);
|
||||
}
|
||||
|
||||
expect(new BibleReference(bk.abbr + ' 1:4-2:5').toString()).toBe(bk.actual + ' 1:4 - 2:5');
|
||||
expect(new BibleReference(bk.abbr + ' 1:1 - 5').toString()).toBe(bk.actual + ' 1:1 - 5');
|
||||
expect(new BibleReference(bk.abbr + ' 1:4 - 5').toString()).toBe(bk.actual + ' 1:4 - 5');
|
||||
for (let i = 1; i < book.lastChapter; i++) {
|
||||
expect(
|
||||
new BibleReference(bk.abbr + ' ' + i + '-' + (i + 1)).toString()
|
||||
).toBe(bk.actual + ' ' + i + ':1 - ' + (i + 1) + ':*');
|
||||
expect(
|
||||
new BibleReference(
|
||||
bk.abbr + ' ' + i + ':3-' + (i + 1) + ':6'
|
||||
).toString()
|
||||
).toBe(bk.actual + ' ' + i + ':3 - ' + (i + 1) + ':6');
|
||||
}
|
||||
|
||||
// expect(new BibleReference(bk.abbr + ' 1:4-2:5').toString()).toBe(
|
||||
// bk.actual + ' 1:4 - 2:5'
|
||||
// );
|
||||
// expect(new BibleReference(bk.abbr + ' 1:1 - 5').toString()).toBe(
|
||||
// bk.actual + ' 1:1 - 5'
|
||||
// );
|
||||
// expect(new BibleReference(bk.abbr + ' 1:4 - 5').toString()).toBe(
|
||||
// bk.actual + ' 1:4 - 5'
|
||||
// );
|
||||
});
|
||||
}
|
||||
const refs = [
|
||||
@ -287,9 +297,9 @@ describe('Reference', () => {
|
||||
// { "src": "gen 50 - ex 2", "actual": "Genesis 50:1 - Exodus 2:*" },
|
||||
];
|
||||
|
||||
for (const ref of refs) {
|
||||
it('Should parse the reference: ' + ref.src, () => {
|
||||
expect(new BibleReference(ref.src).toString()).toBe(ref.actual);
|
||||
});
|
||||
}
|
||||
// for (const ref of refs) {
|
||||
// it('Should parse the reference: ' + ref.src, () => {
|
||||
// expect(new BibleReference(ref.src).toString()).toBe(ref.actual);
|
||||
// });
|
||||
// }
|
||||
});
|
||||
|
@ -59,18 +59,18 @@ export class BibleReference {
|
||||
public static Books: Array<Book> = [
|
||||
{
|
||||
name: 'Unknown',
|
||||
short_name: 'Unk',
|
||||
long_name: 'Unknown',
|
||||
book_number: 0,
|
||||
last_chapter: 0,
|
||||
abbreviation: 'Unk',
|
||||
longName: 'Unknown',
|
||||
bookNumber: 0,
|
||||
lastChapter: 0,
|
||||
chapters: [0],
|
||||
},
|
||||
{
|
||||
name: 'Genesis',
|
||||
short_name: 'Gen',
|
||||
long_name: 'Book of Genesis',
|
||||
book_number: 1,
|
||||
last_chapter: 66,
|
||||
abbreviation: 'Gen',
|
||||
longName: 'Book of Genesis',
|
||||
bookNumber: 1,
|
||||
lastChapter: 66,
|
||||
chapters: [
|
||||
0,
|
||||
31,
|
||||
@ -126,11 +126,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 2,
|
||||
short_name: 'Exo',
|
||||
bookNumber: 2,
|
||||
abbreviation: 'Exo',
|
||||
name: 'Exodus',
|
||||
long_name: 'Book of Exodus',
|
||||
last_chapter: 40,
|
||||
longName: 'Book of Exodus',
|
||||
lastChapter: 40,
|
||||
chapters: [
|
||||
0,
|
||||
22,
|
||||
@ -176,11 +176,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 3,
|
||||
bookNumber: 3,
|
||||
name: 'Leviticus',
|
||||
short_name: 'Lev',
|
||||
long_name: 'Leviticus',
|
||||
last_chapter: 27,
|
||||
abbreviation: 'Lev',
|
||||
longName: 'Leviticus',
|
||||
lastChapter: 27,
|
||||
chapters: [
|
||||
0,
|
||||
17,
|
||||
@ -213,11 +213,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 4,
|
||||
bookNumber: 4,
|
||||
name: 'Numbers',
|
||||
short_name: 'Num',
|
||||
long_name: 'Book of Numbers',
|
||||
last_chapter: 36,
|
||||
abbreviation: 'Num',
|
||||
longName: 'Book of Numbers',
|
||||
lastChapter: 36,
|
||||
chapters: [
|
||||
0,
|
||||
54,
|
||||
@ -259,11 +259,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 5,
|
||||
bookNumber: 5,
|
||||
name: 'Deuteronomy',
|
||||
short_name: 'Deut',
|
||||
long_name: 'Book of Deuteronomy',
|
||||
last_chapter: 34,
|
||||
abbreviation: 'Deut',
|
||||
longName: 'Book of Deuteronomy',
|
||||
lastChapter: 34,
|
||||
chapters: [
|
||||
0,
|
||||
46,
|
||||
@ -303,11 +303,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 6,
|
||||
bookNumber: 6,
|
||||
name: 'Joshua',
|
||||
short_name: 'Josh',
|
||||
long_name: 'Book of Joshua',
|
||||
last_chapter: 24,
|
||||
abbreviation: 'Josh',
|
||||
longName: 'Book of Joshua',
|
||||
lastChapter: 24,
|
||||
chapters: [
|
||||
0,
|
||||
18,
|
||||
@ -337,11 +337,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 7,
|
||||
bookNumber: 7,
|
||||
name: 'Judges',
|
||||
short_name: 'Jud',
|
||||
long_name: 'Book of Judges',
|
||||
last_chapter: 21,
|
||||
abbreviation: 'Jud',
|
||||
longName: 'Book of Judges',
|
||||
lastChapter: 21,
|
||||
chapters: [
|
||||
0,
|
||||
36,
|
||||
@ -368,19 +368,19 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 8,
|
||||
bookNumber: 8,
|
||||
name: 'Ruth',
|
||||
short_name: 'Ruth',
|
||||
long_name: 'Book of Ruth',
|
||||
last_chapter: 4,
|
||||
abbreviation: 'Ruth',
|
||||
longName: 'Book of Ruth',
|
||||
lastChapter: 4,
|
||||
chapters: [0, 22, 23, 18, 22],
|
||||
},
|
||||
{
|
||||
book_number: 9,
|
||||
bookNumber: 9,
|
||||
name: '1 Samuel',
|
||||
short_name: '1 Sam',
|
||||
long_name: 'First Book of Samuel',
|
||||
last_chapter: 31,
|
||||
abbreviation: '1 Sam',
|
||||
longName: 'First Book of Samuel',
|
||||
lastChapter: 31,
|
||||
chapters: [
|
||||
0,
|
||||
28,
|
||||
@ -417,11 +417,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 10,
|
||||
bookNumber: 10,
|
||||
name: '2 Samuel',
|
||||
short_name: '2 Sam',
|
||||
long_name: 'Second Book of Samuel',
|
||||
last_chapter: 24,
|
||||
abbreviation: '2 Sam',
|
||||
longName: 'Second Book of Samuel',
|
||||
lastChapter: 24,
|
||||
chapters: [
|
||||
0,
|
||||
27,
|
||||
@ -451,11 +451,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 11,
|
||||
bookNumber: 11,
|
||||
name: '1 Kings',
|
||||
short_name: '1 Kng',
|
||||
long_name: 'First Book of Kings',
|
||||
last_chapter: 22,
|
||||
abbreviation: '1 Kng',
|
||||
longName: 'First Book of Kings',
|
||||
lastChapter: 22,
|
||||
chapters: [
|
||||
0,
|
||||
53,
|
||||
@ -483,11 +483,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 12,
|
||||
bookNumber: 12,
|
||||
name: '2 Kings',
|
||||
short_name: '2 Kng',
|
||||
long_name: 'Second Book of Kings',
|
||||
last_chapter: 25,
|
||||
abbreviation: '2 Kng',
|
||||
longName: 'Second Book of Kings',
|
||||
lastChapter: 25,
|
||||
chapters: [
|
||||
0,
|
||||
18,
|
||||
@ -518,11 +518,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 13,
|
||||
bookNumber: 13,
|
||||
name: '1 Chronicles',
|
||||
short_name: '1 Chr',
|
||||
long_name: 'First Book of Chronicles',
|
||||
last_chapter: 29,
|
||||
abbreviation: '1 Chr',
|
||||
longName: 'First Book of Chronicles',
|
||||
lastChapter: 29,
|
||||
chapters: [
|
||||
0,
|
||||
54,
|
||||
@ -557,11 +557,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 14,
|
||||
bookNumber: 14,
|
||||
name: '2 Chronicles',
|
||||
short_name: '2 Chr',
|
||||
long_name: 'Second Book of Chronicles',
|
||||
last_chapter: 36,
|
||||
abbreviation: '2 Chr',
|
||||
longName: 'Second Book of Chronicles',
|
||||
lastChapter: 36,
|
||||
chapters: [
|
||||
0,
|
||||
17,
|
||||
@ -603,35 +603,35 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 15,
|
||||
bookNumber: 15,
|
||||
name: 'Ezra',
|
||||
short_name: 'Ezra',
|
||||
long_name: 'Book of Ezra',
|
||||
last_chapter: 10,
|
||||
abbreviation: 'Ezra',
|
||||
longName: 'Book of Ezra',
|
||||
lastChapter: 10,
|
||||
chapters: [0, 11, 70, 13, 24, 17, 22, 28, 36, 15, 44],
|
||||
},
|
||||
{
|
||||
book_number: 16,
|
||||
bookNumber: 16,
|
||||
name: 'Nehemiah',
|
||||
short_name: 'Neh',
|
||||
long_name: 'Book of Nehemiah',
|
||||
last_chapter: 13,
|
||||
abbreviation: 'Neh',
|
||||
longName: 'Book of Nehemiah',
|
||||
lastChapter: 13,
|
||||
chapters: [0, 11, 20, 32, 23, 19, 19, 73, 18, 38, 39, 36, 47, 31],
|
||||
},
|
||||
{
|
||||
book_number: 17,
|
||||
bookNumber: 17,
|
||||
name: 'Esther',
|
||||
short_name: 'Esther',
|
||||
long_name: 'Book of Esther',
|
||||
last_chapter: 10,
|
||||
abbreviation: 'Esther',
|
||||
longName: 'Book of Esther',
|
||||
lastChapter: 10,
|
||||
chapters: [0, 22, 23, 15, 17, 14, 14, 10, 17, 32, 3],
|
||||
},
|
||||
{
|
||||
book_number: 18,
|
||||
bookNumber: 18,
|
||||
name: 'Job',
|
||||
short_name: 'Job',
|
||||
long_name: 'Book of Job',
|
||||
last_chapter: 42,
|
||||
abbreviation: 'Job',
|
||||
longName: 'Book of Job',
|
||||
lastChapter: 42,
|
||||
chapters: [
|
||||
0,
|
||||
22,
|
||||
@ -679,11 +679,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 19,
|
||||
name: 'Psalms',
|
||||
short_name: 'Psalm',
|
||||
long_name: 'Book of Psalms',
|
||||
last_chapter: 150,
|
||||
bookNumber: 19,
|
||||
name: 'Psalm',
|
||||
abbreviation: 'Psalm',
|
||||
longName: 'Book of Psalms',
|
||||
lastChapter: 150,
|
||||
chapters: [
|
||||
0,
|
||||
6,
|
||||
@ -839,11 +839,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 20,
|
||||
bookNumber: 20,
|
||||
name: 'Proverbs',
|
||||
short_name: 'Prov',
|
||||
long_name: 'Book of Proverbs',
|
||||
last_chapter: 31,
|
||||
abbreviation: 'Prov',
|
||||
longName: 'Book of Proverbs',
|
||||
lastChapter: 31,
|
||||
chapters: [
|
||||
0,
|
||||
33,
|
||||
@ -880,27 +880,27 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 21,
|
||||
bookNumber: 21,
|
||||
name: 'Ecclesiastes',
|
||||
short_name: 'Eccl',
|
||||
long_name: 'Book of Ecclesiastes',
|
||||
last_chapter: 12,
|
||||
abbreviation: 'Eccl',
|
||||
longName: 'Book of Ecclesiastes',
|
||||
lastChapter: 12,
|
||||
chapters: [0, 18, 26, 22, 16, 20, 12, 29, 17, 18, 20, 10, 14],
|
||||
},
|
||||
{
|
||||
book_number: 22,
|
||||
bookNumber: 22,
|
||||
name: 'Song of Solomon',
|
||||
short_name: 'Song',
|
||||
long_name: 'Song of Solomon',
|
||||
last_chapter: 8,
|
||||
abbreviation: 'Song',
|
||||
longName: 'Song of Solomon',
|
||||
lastChapter: 8,
|
||||
chapters: [0, 17, 17, 11, 16, 16, 13, 13, 14],
|
||||
},
|
||||
{
|
||||
book_number: 23,
|
||||
bookNumber: 23,
|
||||
name: 'Isaiah',
|
||||
short_name: 'Isa',
|
||||
long_name: 'Book of Isaiah',
|
||||
last_chapter: 66,
|
||||
abbreviation: 'Isa',
|
||||
longName: 'Book of Isaiah',
|
||||
lastChapter: 66,
|
||||
chapters: [
|
||||
0,
|
||||
31,
|
||||
@ -972,11 +972,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 24,
|
||||
bookNumber: 24,
|
||||
name: 'Jeremiah',
|
||||
short_name: 'Jer',
|
||||
long_name: 'Book of Jeremiah',
|
||||
last_chapter: 52,
|
||||
abbreviation: 'Jer',
|
||||
longName: 'Book of Jeremiah',
|
||||
lastChapter: 52,
|
||||
chapters: [
|
||||
0,
|
||||
19,
|
||||
@ -1034,19 +1034,19 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 25,
|
||||
bookNumber: 25,
|
||||
name: 'Lamentations',
|
||||
short_name: 'Lam',
|
||||
long_name: 'Book of Lamentations',
|
||||
last_chapter: 5,
|
||||
abbreviation: 'Lam',
|
||||
longName: 'Book of Lamentations',
|
||||
lastChapter: 5,
|
||||
chapters: [0, 22, 22, 66, 22, 22],
|
||||
},
|
||||
{
|
||||
book_number: 26,
|
||||
bookNumber: 26,
|
||||
name: 'Ezekiel',
|
||||
short_name: 'Eze',
|
||||
long_name: 'Book of Ezekiel',
|
||||
last_chapter: 48,
|
||||
abbreviation: 'Eze',
|
||||
longName: 'Book of Ezekiel',
|
||||
lastChapter: 48,
|
||||
chapters: [
|
||||
0,
|
||||
28,
|
||||
@ -1100,115 +1100,115 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 27,
|
||||
bookNumber: 27,
|
||||
name: 'Daniel',
|
||||
short_name: 'Dan',
|
||||
long_name: 'Book of Daniel',
|
||||
last_chapter: 12,
|
||||
abbreviation: 'Dan',
|
||||
longName: 'Book of Daniel',
|
||||
lastChapter: 12,
|
||||
chapters: [0, 21, 49, 30, 37, 31, 28, 28, 27, 27, 21, 45, 13],
|
||||
},
|
||||
{
|
||||
book_number: 28,
|
||||
bookNumber: 28,
|
||||
name: 'Hosea',
|
||||
short_name: 'Hosea',
|
||||
long_name: 'Book of Hosea',
|
||||
last_chapter: 14,
|
||||
abbreviation: 'Hosea',
|
||||
longName: 'Book of Hosea',
|
||||
lastChapter: 14,
|
||||
chapters: [0, 11, 23, 5, 19, 15, 11, 16, 14, 17, 15, 12, 14, 16, 9],
|
||||
},
|
||||
{
|
||||
book_number: 29,
|
||||
bookNumber: 29,
|
||||
name: 'Joel',
|
||||
short_name: 'Joel',
|
||||
long_name: 'Book of Joel',
|
||||
last_chapter: 3,
|
||||
abbreviation: 'Joel',
|
||||
longName: 'Book of Joel',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 20, 32, 21],
|
||||
},
|
||||
{
|
||||
book_number: 30,
|
||||
bookNumber: 30,
|
||||
name: 'Amos',
|
||||
short_name: 'Amos',
|
||||
long_name: 'Book of Amos',
|
||||
last_chapter: 9,
|
||||
abbreviation: 'Amos',
|
||||
longName: 'Book of Amos',
|
||||
lastChapter: 9,
|
||||
chapters: [0, 15, 16, 15, 13, 27, 14, 17, 14, 15],
|
||||
},
|
||||
{
|
||||
book_number: 31,
|
||||
bookNumber: 31,
|
||||
name: 'Obadiah',
|
||||
short_name: 'Oba',
|
||||
long_name: 'Book of Obadiah',
|
||||
last_chapter: 1,
|
||||
abbreviation: 'Oba',
|
||||
longName: 'Book of Obadiah',
|
||||
lastChapter: 1,
|
||||
chapters: [0, 21],
|
||||
},
|
||||
{
|
||||
book_number: 32,
|
||||
bookNumber: 32,
|
||||
name: 'Jonah',
|
||||
short_name: 'Jonah',
|
||||
long_name: 'Book of Jonah',
|
||||
last_chapter: 4,
|
||||
abbreviation: 'Jonah',
|
||||
longName: 'Book of Jonah',
|
||||
lastChapter: 4,
|
||||
chapters: [0, 17, 10, 10, 11],
|
||||
},
|
||||
{
|
||||
book_number: 33,
|
||||
bookNumber: 33,
|
||||
name: 'Micah',
|
||||
short_name: 'Micah',
|
||||
long_name: 'Book of Micah',
|
||||
last_chapter: 7,
|
||||
abbreviation: 'Micah',
|
||||
longName: 'Book of Micah',
|
||||
lastChapter: 7,
|
||||
chapters: [0, 16, 13, 12, 13, 15, 16, 20],
|
||||
},
|
||||
{
|
||||
book_number: 34,
|
||||
bookNumber: 34,
|
||||
name: 'Nahum',
|
||||
short_name: 'Nahum',
|
||||
long_name: 'Book of Nahum',
|
||||
last_chapter: 3,
|
||||
abbreviation: 'Nahum',
|
||||
longName: 'Book of Nahum',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 15, 13, 19],
|
||||
},
|
||||
{
|
||||
book_number: 35,
|
||||
bookNumber: 35,
|
||||
name: 'Habakkuk',
|
||||
short_name: 'Hab',
|
||||
long_name: 'Book of Habakkuk',
|
||||
last_chapter: 3,
|
||||
abbreviation: 'Hab',
|
||||
longName: 'Book of Habakkuk',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 17, 20, 19],
|
||||
},
|
||||
{
|
||||
book_number: 36,
|
||||
bookNumber: 36,
|
||||
name: 'Zephaniah',
|
||||
short_name: 'Zeph',
|
||||
long_name: 'Book of Zephaniah',
|
||||
last_chapter: 3,
|
||||
abbreviation: 'Zeph',
|
||||
longName: 'Book of Zephaniah',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 18, 15, 20],
|
||||
},
|
||||
{
|
||||
book_number: 37,
|
||||
bookNumber: 37,
|
||||
name: 'Haggai',
|
||||
short_name: 'Hag',
|
||||
long_name: 'Book of Haggai',
|
||||
last_chapter: 2,
|
||||
abbreviation: 'Hag',
|
||||
longName: 'Book of Haggai',
|
||||
lastChapter: 2,
|
||||
chapters: [0, 15, 23],
|
||||
},
|
||||
{
|
||||
book_number: 38,
|
||||
bookNumber: 38,
|
||||
name: 'Zechariah',
|
||||
short_name: 'Zech',
|
||||
long_name: 'Book of Zechariah',
|
||||
last_chapter: 14,
|
||||
abbreviation: 'Zech',
|
||||
longName: 'Book of Zechariah',
|
||||
lastChapter: 14,
|
||||
chapters: [0, 21, 13, 10, 14, 11, 15, 14, 23, 17, 12, 17, 14, 9, 21],
|
||||
},
|
||||
{
|
||||
book_number: 39,
|
||||
bookNumber: 39,
|
||||
name: 'Malachi',
|
||||
short_name: 'Mal',
|
||||
long_name: 'Book of Malachi',
|
||||
last_chapter: 4,
|
||||
abbreviation: 'Mal',
|
||||
longName: 'Book of Malachi',
|
||||
lastChapter: 4,
|
||||
chapters: [0, 14, 17, 18, 6],
|
||||
},
|
||||
{
|
||||
book_number: 40,
|
||||
bookNumber: 40,
|
||||
name: 'Matthew',
|
||||
short_name: 'Matt',
|
||||
long_name: 'Gospel of Matthew',
|
||||
last_chapter: 28,
|
||||
abbreviation: 'Matt',
|
||||
longName: 'Gospel of Matthew',
|
||||
lastChapter: 28,
|
||||
chapters: [
|
||||
0,
|
||||
25,
|
||||
@ -1242,11 +1242,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 41,
|
||||
bookNumber: 41,
|
||||
name: 'Mark',
|
||||
short_name: 'Mark',
|
||||
long_name: 'Gospel of Mark',
|
||||
last_chapter: 16,
|
||||
abbreviation: 'Mark',
|
||||
longName: 'Gospel of Mark',
|
||||
lastChapter: 16,
|
||||
chapters: [
|
||||
0,
|
||||
45,
|
||||
@ -1268,11 +1268,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 42,
|
||||
bookNumber: 42,
|
||||
name: 'Luke',
|
||||
short_name: 'Luke',
|
||||
long_name: 'Gospel of Luke',
|
||||
last_chapter: 24,
|
||||
abbreviation: 'Luke',
|
||||
longName: 'Gospel of Luke',
|
||||
lastChapter: 24,
|
||||
chapters: [
|
||||
0,
|
||||
80,
|
||||
@ -1302,11 +1302,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 43,
|
||||
bookNumber: 43,
|
||||
name: 'John',
|
||||
short_name: 'John',
|
||||
long_name: 'Gospel of John',
|
||||
last_chapter: 21,
|
||||
abbreviation: 'John',
|
||||
longName: 'Gospel of John',
|
||||
lastChapter: 21,
|
||||
chapters: [
|
||||
0,
|
||||
51,
|
||||
@ -1333,11 +1333,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 44,
|
||||
bookNumber: 44,
|
||||
name: 'Acts',
|
||||
short_name: 'Acts',
|
||||
long_name: 'Acts of the Apostles',
|
||||
last_chapter: 28,
|
||||
abbreviation: 'Acts',
|
||||
longName: 'Acts of the Apostles',
|
||||
lastChapter: 28,
|
||||
chapters: [
|
||||
0,
|
||||
26,
|
||||
@ -1371,11 +1371,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 45,
|
||||
bookNumber: 45,
|
||||
name: 'Romans',
|
||||
short_name: 'Rom',
|
||||
long_name: 'Epistle to the Romans',
|
||||
last_chapter: 16,
|
||||
abbreviation: 'Rom',
|
||||
longName: 'Epistle to the Romans',
|
||||
lastChapter: 16,
|
||||
chapters: [
|
||||
0,
|
||||
32,
|
||||
@ -1397,11 +1397,11 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 46,
|
||||
bookNumber: 46,
|
||||
name: '1 Corinthians',
|
||||
short_name: '1 Cor',
|
||||
long_name: 'First Epistle to the Corinthians',
|
||||
last_chapter: 16,
|
||||
abbreviation: '1 Cor',
|
||||
longName: 'First Epistle to the Corinthians',
|
||||
lastChapter: 16,
|
||||
chapters: [
|
||||
0,
|
||||
31,
|
||||
@ -1423,163 +1423,163 @@ export class BibleReference {
|
||||
],
|
||||
},
|
||||
{
|
||||
book_number: 47,
|
||||
bookNumber: 47,
|
||||
name: '2 Corinthians',
|
||||
short_name: '2 Cor',
|
||||
long_name: 'Second Epistle to the Corinthians',
|
||||
last_chapter: 13,
|
||||
abbreviation: '2 Cor',
|
||||
longName: 'Second Epistle to the Corinthians',
|
||||
lastChapter: 13,
|
||||
chapters: [0, 24, 17, 18, 18, 21, 18, 16, 24, 15, 18, 33, 21, 14],
|
||||
},
|
||||
{
|
||||
book_number: 48,
|
||||
bookNumber: 48,
|
||||
name: 'Galatians',
|
||||
short_name: 'Gal',
|
||||
long_name: 'Epistle to the Galatians',
|
||||
last_chapter: 6,
|
||||
abbreviation: 'Gal',
|
||||
longName: 'Epistle to the Galatians',
|
||||
lastChapter: 6,
|
||||
chapters: [0, 24, 21, 29, 31, 26, 18],
|
||||
},
|
||||
{
|
||||
book_number: 49,
|
||||
bookNumber: 49,
|
||||
name: 'Ephesians',
|
||||
short_name: 'Eph',
|
||||
long_name: 'Epistle to the Ephesians',
|
||||
last_chapter: 6,
|
||||
abbreviation: 'Eph',
|
||||
longName: 'Epistle to the Ephesians',
|
||||
lastChapter: 6,
|
||||
chapters: [0, 23, 22, 21, 32, 33, 24],
|
||||
},
|
||||
{
|
||||
book_number: 50,
|
||||
bookNumber: 50,
|
||||
name: 'Philippians',
|
||||
short_name: 'Phil',
|
||||
long_name: 'Epistle to the Philippians',
|
||||
last_chapter: 4,
|
||||
abbreviation: 'Phil',
|
||||
longName: 'Epistle to the Philippians',
|
||||
lastChapter: 4,
|
||||
chapters: [0, 30, 30, 21, 23],
|
||||
},
|
||||
{
|
||||
book_number: 51,
|
||||
bookNumber: 51,
|
||||
name: 'Colossians',
|
||||
short_name: 'Col',
|
||||
long_name: 'Epistle to the Colossians',
|
||||
last_chapter: 4,
|
||||
abbreviation: 'Col',
|
||||
longName: 'Epistle to the Colossians',
|
||||
lastChapter: 4,
|
||||
chapters: [0, 29, 23, 25, 18],
|
||||
},
|
||||
{
|
||||
book_number: 52,
|
||||
bookNumber: 52,
|
||||
name: '1 Thessalonians',
|
||||
short_name: '1 Thes',
|
||||
long_name: 'First Epistle to the Thessalonians',
|
||||
last_chapter: 5,
|
||||
abbreviation: '1 Thes',
|
||||
longName: 'First Epistle to the Thessalonians',
|
||||
lastChapter: 5,
|
||||
chapters: [0, 10, 20, 13, 18, 28],
|
||||
},
|
||||
{
|
||||
book_number: 53,
|
||||
bookNumber: 53,
|
||||
name: '2 Thessalonians',
|
||||
short_name: '2 Thes',
|
||||
long_name: 'Second Epistle to the Thessalonians',
|
||||
last_chapter: 3,
|
||||
abbreviation: '2 Thes',
|
||||
longName: 'Second Epistle to the Thessalonians',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 12, 17, 18],
|
||||
},
|
||||
{
|
||||
book_number: 54,
|
||||
bookNumber: 54,
|
||||
name: '1 Timothy',
|
||||
short_name: '1 Tim',
|
||||
long_name: 'First Epistle to Timothy',
|
||||
last_chapter: 6,
|
||||
abbreviation: '1 Tim',
|
||||
longName: 'First Epistle to Timothy',
|
||||
lastChapter: 6,
|
||||
chapters: [0, 20, 15, 16, 16, 25, 21],
|
||||
},
|
||||
{
|
||||
book_number: 55,
|
||||
bookNumber: 55,
|
||||
name: '2 Timothy',
|
||||
short_name: '2 Tim',
|
||||
long_name: 'Second Epistle to Timothy',
|
||||
last_chapter: 4,
|
||||
abbreviation: '2 Tim',
|
||||
longName: 'Second Epistle to Timothy',
|
||||
lastChapter: 4,
|
||||
chapters: [0, 18, 26, 17, 22],
|
||||
},
|
||||
{
|
||||
book_number: 56,
|
||||
bookNumber: 56,
|
||||
name: 'Titus',
|
||||
short_name: 'Titus',
|
||||
long_name: 'Epistle to Titus',
|
||||
last_chapter: 3,
|
||||
abbreviation: 'Titus',
|
||||
longName: 'Epistle to Titus',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 16, 15, 15],
|
||||
},
|
||||
{
|
||||
book_number: 57,
|
||||
bookNumber: 57,
|
||||
name: 'Philemon',
|
||||
short_name: 'Phi',
|
||||
long_name: 'Epistle to Philemon',
|
||||
last_chapter: 1,
|
||||
abbreviation: 'Phi',
|
||||
longName: 'Epistle to Philemon',
|
||||
lastChapter: 1,
|
||||
chapters: [0, 25],
|
||||
},
|
||||
{
|
||||
book_number: 58,
|
||||
bookNumber: 58,
|
||||
name: 'Hebrews',
|
||||
short_name: 'Heb',
|
||||
long_name: 'Epistle to the Hebrews',
|
||||
last_chapter: 13,
|
||||
abbreviation: 'Heb',
|
||||
longName: 'Epistle to the Hebrews',
|
||||
lastChapter: 13,
|
||||
chapters: [0, 14, 18, 19, 16, 14, 20, 28, 13, 28, 39, 40, 29, 25],
|
||||
},
|
||||
{
|
||||
book_number: 59,
|
||||
bookNumber: 59,
|
||||
name: 'James',
|
||||
short_name: 'James',
|
||||
long_name: 'Epistle of James',
|
||||
last_chapter: 5,
|
||||
abbreviation: 'James',
|
||||
longName: 'Epistle of James',
|
||||
lastChapter: 5,
|
||||
chapters: [0, 27, 26, 18, 17, 20],
|
||||
},
|
||||
{
|
||||
book_number: 60,
|
||||
bookNumber: 60,
|
||||
name: '1 Peter',
|
||||
short_name: '1 Pe',
|
||||
long_name: 'First Epistle of Peter',
|
||||
last_chapter: 5,
|
||||
abbreviation: '1 Pe',
|
||||
longName: 'First Epistle of Peter',
|
||||
lastChapter: 5,
|
||||
chapters: [0, 25, 25, 22, 19, 14],
|
||||
},
|
||||
{
|
||||
book_number: 61,
|
||||
bookNumber: 61,
|
||||
name: '2 Peter',
|
||||
short_name: '2 Pe',
|
||||
long_name: 'Second Epistle of Peter',
|
||||
last_chapter: 3,
|
||||
abbreviation: '2 Pe',
|
||||
longName: 'Second Epistle of Peter',
|
||||
lastChapter: 3,
|
||||
chapters: [0, 21, 22, 18],
|
||||
},
|
||||
{
|
||||
book_number: 62,
|
||||
bookNumber: 62,
|
||||
name: '1 John',
|
||||
short_name: '1 Jn',
|
||||
long_name: 'First Epistle of John',
|
||||
last_chapter: 5,
|
||||
abbreviation: '1 Jn',
|
||||
longName: 'First Epistle of John',
|
||||
lastChapter: 5,
|
||||
chapters: [0, 10, 29, 24, 21, 21],
|
||||
},
|
||||
{
|
||||
book_number: 63,
|
||||
bookNumber: 63,
|
||||
name: '2 John',
|
||||
short_name: '2 Jn',
|
||||
long_name: 'Second Epistle of John',
|
||||
last_chapter: 1,
|
||||
abbreviation: '2 Jn',
|
||||
longName: 'Second Epistle of John',
|
||||
lastChapter: 1,
|
||||
chapters: [0, 13],
|
||||
},
|
||||
{
|
||||
book_number: 64,
|
||||
bookNumber: 64,
|
||||
name: '3 John',
|
||||
short_name: '3 Jn',
|
||||
long_name: 'Third Epistle of John',
|
||||
last_chapter: 1,
|
||||
abbreviation: '3 Jn',
|
||||
longName: 'Third Epistle of John',
|
||||
lastChapter: 1,
|
||||
chapters: [0, 14],
|
||||
},
|
||||
{
|
||||
book_number: 65,
|
||||
bookNumber: 65,
|
||||
name: 'Jude',
|
||||
short_name: 'Jude',
|
||||
long_name: 'Epistle to Jude',
|
||||
last_chapter: 1,
|
||||
abbreviation: 'Jude',
|
||||
longName: 'Epistle to Jude',
|
||||
lastChapter: 1,
|
||||
chapters: [0, 25],
|
||||
},
|
||||
{
|
||||
book_number: 66,
|
||||
bookNumber: 66,
|
||||
name: 'Revelation',
|
||||
short_name: 'Rev',
|
||||
long_name: 'Book of Revelations',
|
||||
last_chapter: 22,
|
||||
abbreviation: 'Rev',
|
||||
longName: 'Book of Revelations',
|
||||
lastChapter: 22,
|
||||
chapters: [
|
||||
0,
|
||||
20,
|
||||
@ -2096,10 +2096,10 @@ export class BibleReference {
|
||||
|
||||
export interface Book {
|
||||
name: string;
|
||||
short_name: string;
|
||||
long_name: string;
|
||||
book_number: number;
|
||||
last_chapter: number;
|
||||
abbreviation: string;
|
||||
longName: string;
|
||||
bookNumber: number;
|
||||
lastChapter: number;
|
||||
chapters: Array<number>;
|
||||
}
|
||||
|
||||
|
@ -71,15 +71,30 @@
|
||||
|
||||
<mat-toolbar>Style Settings</mat-toolbar>
|
||||
<mat-nav-list>
|
||||
<mat-form-field appearance="fill" class="card-fonts">
|
||||
<mat-label>Card Fonts</mat-label>
|
||||
<mat-select
|
||||
[(value)]="cardFont"
|
||||
(selectionChange)="cardFontSelected($event)"
|
||||
<div class="setting-item">
|
||||
<div class="settings-h2">Card Font Family</div>
|
||||
<mat-form-field appearance="fill" class="card-fonts">
|
||||
<mat-select
|
||||
[(value)]="cardFont"
|
||||
(selectionChange)="cardFontSelected($event)"
|
||||
>
|
||||
<mat-option *ngFor="let font of fonts" [value]="font">
|
||||
{{ font }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="settings-h2">Card Font Size</div>
|
||||
<mat-slider
|
||||
class="font-size-slider"
|
||||
max="32"
|
||||
min="10"
|
||||
step="1"
|
||||
thumbLabel="true"
|
||||
(change)="cardFontSizeChanged($event)"
|
||||
[(ngModel)]="cardFontSize"
|
||||
>
|
||||
<mat-option *ngFor="let font of fonts" [value]="font">
|
||||
{{ font }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-slider>
|
||||
</div>
|
||||
</mat-nav-list>
|
||||
|
@ -1,3 +1,13 @@
|
||||
.card-fonts {
|
||||
width: 100%;
|
||||
}
|
||||
.font-size-slider {
|
||||
width: 100%;
|
||||
}
|
||||
.setting-item {
|
||||
padding: 0 12px 0 12px;
|
||||
}
|
||||
|
||||
.settings-h2 {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import { SubscriberComponent } from '../subscriber.component';
|
||||
import { DisplaySettings } from 'src/app/models/app-state';
|
||||
import { CardFonts } from 'src/app/constants';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { MatSliderChange } from '@angular/material/slider';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
@ -15,6 +16,7 @@ export class SettingsComponent extends SubscriberComponent {
|
||||
displaySettings: DisplaySettings;
|
||||
fonts: string[];
|
||||
cardFont = '';
|
||||
cardFontSize = 10;
|
||||
|
||||
constructor(public appService: AppService) {
|
||||
super();
|
||||
@ -28,7 +30,11 @@ export class SettingsComponent extends SubscriberComponent {
|
||||
}
|
||||
|
||||
cardFontSelected(evt: MatSelectChange) {
|
||||
this.appService.changeFont(evt.value);
|
||||
this.appService.changeCardFontFamily(evt.value);
|
||||
}
|
||||
|
||||
cardFontSizeChanged(evt: MatSliderChange) {
|
||||
this.appService.changeCardFontSize(evt.value);
|
||||
}
|
||||
|
||||
//#region Search Settings
|
||||
|
@ -135,9 +135,9 @@ export class PassageCardComponent extends CardComponent implements OnInit {
|
||||
|
||||
if (
|
||||
this.ref.Section.end.chapter ===
|
||||
(this.ref.Section.end.book.last_chapter + 1).toString()
|
||||
(this.ref.Section.end.book.lastChapter + 1).toString()
|
||||
) {
|
||||
this.ref.Section.end.chapter = this.ref.Section.end.book.last_chapter.toString();
|
||||
this.ref.Section.end.chapter = this.ref.Section.end.book.lastChapter.toString();
|
||||
this.ref.Section.end.verse = lastVerseForEnd.toString();
|
||||
}
|
||||
} else {
|
||||
|
@ -22,8 +22,8 @@
|
||||
><a
|
||||
class="button"
|
||||
(click)="setBook(bk)"
|
||||
*ngIf="bk.book_number !== 0 && bk.book_number < 40"
|
||||
>{{ bk.short_name }}</a
|
||||
*ngIf="bk.bookNumber !== 0 && bk.bookNumber < 40"
|
||||
>{{ bk.shortName }}</a
|
||||
></span
|
||||
>
|
||||
</div>
|
||||
@ -33,8 +33,8 @@
|
||||
><a
|
||||
class="button"
|
||||
(click)="setBook(bk)"
|
||||
*ngIf="bk.book_number !== 0 && bk.book_number > 39"
|
||||
>{{ bk.short_name }}</a
|
||||
*ngIf="bk.bookNumber !== 0 && bk.bookNumber > 39"
|
||||
>{{ bk.shortName }}</a
|
||||
></span
|
||||
>
|
||||
</div>
|
||||
|
@ -286,13 +286,20 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
console.log(msg);
|
||||
}
|
||||
|
||||
changeFont(cardFont: string) {
|
||||
changeCardFontFamily(cardFont: string) {
|
||||
this.dispatch({
|
||||
type: 'UPDATE_FONT_FAMILY',
|
||||
cardFont,
|
||||
});
|
||||
}
|
||||
|
||||
changeCardFontSize(size: number) {
|
||||
this.dispatch({
|
||||
type: 'UPDATE_FONT_SIZE',
|
||||
size,
|
||||
});
|
||||
}
|
||||
|
||||
//#region Saved Pages
|
||||
|
||||
async initSavedPages() {
|
||||
@ -698,7 +705,7 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
const result = await this.getPassageFromApi(ref.Section);
|
||||
return {
|
||||
qry: ref.toString(),
|
||||
dict: ref.Section.start.book.book_number > 39 ? 'G' : 'H',
|
||||
dict: ref.Section.start.book.bookNumber > 39 ? 'G' : 'H',
|
||||
type: 'Passage',
|
||||
data: result,
|
||||
};
|
||||
@ -713,16 +720,16 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
ref: BibleReference.toString(section),
|
||||
};
|
||||
|
||||
if (Number(section.start.chapter) > section.start.book.last_chapter) {
|
||||
if (Number(section.start.chapter) > section.start.book.lastChapter) {
|
||||
this.dispatchError(
|
||||
`The requested chapter ${section.start.book.name} is out of range. Please pick a chapter between 1 and ${section.end.book.last_chapter}.`
|
||||
`The requested chapter ${section.start.book.name} is out of range. Please pick a chapter between 1 and ${section.end.book.lastChapter}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Number(section.end.chapter) > section.end.book.last_chapter) {
|
||||
if (Number(section.end.chapter) > section.end.book.lastChapter) {
|
||||
this.dispatchError(
|
||||
`The requested chapter ${section.end.book.name} is out of range. Please pick a chapter between 1 and ${section.end.book.last_chapter}.`
|
||||
`The requested chapter ${section.end.book.name} is out of range. Please pick a chapter between 1 and ${section.end.book.lastChapter}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
@ -735,7 +742,7 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
try {
|
||||
const d = await this.http
|
||||
.get<BiblePassage>(
|
||||
`${this.dataPath}/bibles/kjv_strongs/${section.start.book.book_number}-${i}.json`
|
||||
`${this.dataPath}/bibles/kjv_strongs/${section.start.book.bookNumber}-${i}.json`
|
||||
)
|
||||
.toPromise();
|
||||
chapters.push(d);
|
||||
@ -797,7 +804,7 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
// convert into paragraphs.
|
||||
result.cs = await this.convertToParagraphPassages(passages, section);
|
||||
|
||||
if (section.start.book.book_number >= 40) {
|
||||
if (section.start.book.bookNumber >= 40) {
|
||||
result.testament = 'new';
|
||||
} else {
|
||||
result.testament = 'old';
|
||||
@ -872,7 +879,7 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
|
||||
private getRefKey(vs: BibleVerse, section: Section) {
|
||||
return BibleReference.formatReferenceKey(
|
||||
section.start.book.book_number,
|
||||
section.start.book.bookNumber,
|
||||
section.start.chapter,
|
||||
vs.v
|
||||
);
|
||||
@ -1361,7 +1368,7 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
if (
|
||||
item.name !== 'Unknown' &&
|
||||
(item.name.toLowerCase().indexOf(qry.toLowerCase()) > -1 ||
|
||||
item.short_name.toLowerCase().indexOf(qry.toLowerCase()) > -1)
|
||||
item.abbreviation.toLowerCase().indexOf(qry.toLowerCase()) > -1)
|
||||
) {
|
||||
words.push(prefix + item.name);
|
||||
if (words.length > 2) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user