diff --git a/apis/hadithaApi.js b/apis/hadithaApi.js index b935e4f..9866e85 100644 --- a/apis/hadithaApi.js +++ b/apis/hadithaApi.js @@ -17,10 +17,11 @@ export default { setCategories: "favorite/tags/@data_type/set", getCounts: "favorite/tags/@data_type/counts", - getList: "favorite/list/@data_type/@offset/@limit/@filter", + getList: "favorite/list/@data_type/@offset/@limit", }, library: { list: "monir/book/volume/@field_collapsed/@offset/@limit/@q", show: "@appname/book/page/@page_start/@page_end/@vol_id", + prevNextHadith: "monir/nextpage/@index_key/@vol_id/@page_num/@step", }, }; diff --git a/components/haditha/AutoComplation.vue b/components/haditha/AutoComplation.vue index 048285c..fb8cea3 100644 --- a/components/haditha/AutoComplation.vue +++ b/components/haditha/AutoComplation.vue @@ -82,7 +82,6 @@ const state = reactive({ value: "normal", class: "", onSelect(e: Event) { - console.info(e); search_type.value = "normal"; state.type.label = e.explicitOriginalTarget?.innerText; sendQuery(); @@ -98,7 +97,6 @@ const state = reactive({ onSelect(e: Event) { search_type.value = "arabic"; state.type.label = e.explicitOriginalTarget?.innerText; - console.info(e); state.type.items[0].class = "active"; sendQuery(); @@ -112,7 +110,6 @@ const state = reactive({ onSelect(e: Event) { search_type.value = "translations"; state.type.label = e.explicitOriginalTarget?.innerText; - console.info(e); state.type.items[0].class = "active"; sendQuery(); @@ -127,8 +124,6 @@ const state = reactive({ search_type.value = "descriptions"; state.type.label = e.explicitOriginalTarget?.innerText; state.type.items[0].class = "active"; - console.info(e); - sendQuery(); }, }, @@ -155,7 +150,6 @@ const state = reactive({ // watch( // () => route, // (newRoute, oldRoute) => { -// console.info(newRoute.query); // if (newRoute.query) searchTerm.value = newRoute.query.q; // }, // { immediate: true } @@ -282,15 +276,12 @@ const onClearSynonymClear = () => { async function openSynonymPopup(type: string) { search_type.value = type; - console.info("openSynonymPopup"); getSynonyms().then(() => { isSynonymPopupOpen.value = true; }); } const onTypeSelectChanged = (value: string) => { - console.info(value); - if (value == "translations") typeModelValueFa.value = "ترجمه"; else if (value == "arabic") typeModelValueFa.value = "عربی"; else if (value == "descriptions") typeModelValueFa.value = "شروح"; @@ -332,11 +323,7 @@ const prepareSynonym = () => { const enabledSwitches = state.synonym.items.filter((i) => i.enable); const res = {}; - console.info(enabledSwitches); - enabledSwitches.forEach((item) => { - console.info(item); - if (item.subTitles.length) res[item.title] = item.subTitles .filter((i) => i.active) @@ -344,8 +331,6 @@ const prepareSynonym = () => { .join(","); }); - console.info(res); - return { synonym: res, }; diff --git a/components/haditha/CardList.vue b/components/haditha/CardList.vue index 03821d8..b63e54c 100644 --- a/components/haditha/CardList.vue +++ b/components/haditha/CardList.vue @@ -12,6 +12,21 @@ const props = defineProps({ default: "/img/haditha/no-data.png", }, }); + +const router = useRouter(); + +const goToLibraryShow = (item) => { + router.push({ + name: "hadithaLibraryShow", + params: { + id: item?._source?.id, + slug: item?._source?.title, + }, + query: { + firstPage: item._source.page_first, + }, + }); +};