From 45d67f01cab4f8732672bbdc928606a0efa9a4eb Mon Sep 17 00:00:00 2001 From: anwolosz Date: Sat, 24 Aug 2024 13:22:55 +0200 Subject: [PATCH] Refactor store fields to current --- src/components/Citation.vue | 20 +++++------ src/components/FunctionButtons.vue | 12 +++---- src/components/Header.vue | 32 +++++++++--------- src/components/IndexRecord.vue | 10 +++--- src/components/Section.vue | 4 +-- src/components/TitleChangeTableSZIT.vue | 4 +-- src/components/en/AboutEn.vue | 4 +-- src/components/hu/AboutHu.vue | 4 +-- src/stores/SynopsisStore.ts | 44 ++++++++++++------------- src/views/AboutView.vue | 6 ++-- src/views/ContactView.vue | 6 ++-- src/views/IndexView.vue | 14 ++++---- src/views/NotFoundView.vue | 2 +- src/views/SourcesView.vue | 6 ++-- src/views/SynopsisView.vue | 8 ++--- 15 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/components/Citation.vue b/src/components/Citation.vue index 900fc4c0..4683fdff 100644 --- a/src/components/Citation.vue +++ b/src/components/Citation.vue @@ -25,9 +25,9 @@ export default { }, methods: { redirectToLeadingCitation(chapterLocation: string, verseLocation: string): void { - for (let i = 0; i < useSynopsisStore().synopsis.chapters.length; i++) { + for (let i = 0; i < useSynopsisStore().currentSynopsis.chapters.length; i++) { //TODO: think about better name than chapter in .json - const chapter = useSynopsisStore().synopsis.chapters[i] + const chapter = useSynopsisStore().currentSynopsis.chapters[i] for (let j = 0; j < chapter.subchapters.length; j++) { const subchapter = chapter.subchapters[j] for (let k = 0; k < subchapter.sections.length; k++) { @@ -53,9 +53,9 @@ export default { }, redirectToPreviousLeadingCitation() { let previousSectionId; - for (let i = 0; i < useSynopsisStore().synopsis.chapters.length; i++) { + for (let i = 0; i < useSynopsisStore().currentSynopsis.chapters.length; i++) { //TODO: think about better name than chapter in .json - const chapter = useSynopsisStore().synopsis.chapters[i] + const chapter = useSynopsisStore().currentSynopsis.chapters[i] for (let j = 0; j < chapter.subchapters.length; j++) { const subchapter = chapter.subchapters[j] for (let k = 0; k < subchapter.sections.length; k++) { @@ -78,9 +78,9 @@ export default { } }, redirectToNextLeadingCitation() { - for (let i = 0; i < useSynopsisStore().synopsis.chapters.length; i++) { + for (let i = 0; i < useSynopsisStore().currentSynopsis.chapters.length; i++) { //TODO: think about better name than chapter in .json - const chapter = useSynopsisStore().synopsis.chapters[i] + const chapter = useSynopsisStore().currentSynopsis.chapters[i] for (let j = 0; j < chapter.subchapters.length; j++) { const subchapter = chapter.subchapters[j] for (let k = 0; k < subchapter.sections.length; k++) { @@ -123,11 +123,11 @@ export default {
- {{ synopsisStore.dictionary.evangelists[evangelist] }} {{ citation?.citation }} + {{ synopsisStore.currentDictionary.evangelists[evangelist] }} {{ citation?.citation }} diff --git a/src/components/FunctionButtons.vue b/src/components/FunctionButtons.vue index e6d3a8c6..e3f2663f 100644 --- a/src/components/FunctionButtons.vue +++ b/src/components/FunctionButtons.vue @@ -44,26 +44,26 @@ export default { \ No newline at end of file diff --git a/src/components/Header.vue b/src/components/Header.vue index 7f39b2ee..e6487b54 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -25,7 +25,7 @@ export default {