Update files.
This commit is contained in:
parent
0db2ba3f38
commit
30cad3040c
|
@ -16,6 +16,9 @@ const props = defineProps({
|
||||||
noDataIcon: {
|
noDataIcon: {
|
||||||
default: "/img/haditha/no-data.png",
|
default: "/img/haditha/no-data.png",
|
||||||
},
|
},
|
||||||
|
searchTerm: {
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -23,7 +26,7 @@ const route = useRoute();
|
||||||
// const modal = useModal();
|
// const modal = useModal();
|
||||||
// const isModalOpen = ref(false);
|
// const isModalOpen = ref(false);
|
||||||
|
|
||||||
function openModal(selectedItem) {
|
function goToSearchShowPage(selectedItem) {
|
||||||
// modal.open(SearchShow, { title: "Welcome" });
|
// modal.open(SearchShow, { title: "Welcome" });
|
||||||
// isModalOpen.value = true;
|
// isModalOpen.value = true;
|
||||||
|
|
||||||
|
@ -39,8 +42,7 @@ function openModal(selectedItem) {
|
||||||
slug: slug,
|
slug: slug,
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
firstPage: 1,
|
q: props.searchTerm,
|
||||||
page_count: props.total,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -87,7 +89,7 @@ const removeFromFavorites = async (item = {}, index = 0) => {
|
||||||
item?._source?.meta?.hadith_masoum ??
|
item?._source?.meta?.hadith_masoum ??
|
||||||
item?._source?.meta?.hadith_sanad
|
item?._source?.meta?.hadith_sanad
|
||||||
}`"
|
}`"
|
||||||
@click.prevent="openModal(item)"
|
@click.prevent="goToSearchShowPage(item)"
|
||||||
class="from-person block"
|
class="from-person block"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
|
@ -106,14 +108,14 @@ const removeFromFavorites = async (item = {}, index = 0) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@click.prevent="openModal(item)"
|
@click.prevent="goToSearchShowPage(item)"
|
||||||
class="arabic-text block"
|
class="arabic-text block"
|
||||||
:href="`/haditha/search/${item?._source?.id}/${item?._source?.content_ar}`"
|
:href="`/haditha/search/${item?._source?.id}/${item?._source?.content_ar}`"
|
||||||
>
|
>
|
||||||
{{ item?._source?.content_ar }}
|
{{ item?._source?.content_ar }}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
@click.prevent="openModal(item)"
|
@click.prevent="goToSearchShowPage(item)"
|
||||||
:href="`/haditha/search/${item?._source?.id}/${item?._source?.content}`"
|
:href="`/haditha/search/${item?._source?.id}/${item?._source?.content}`"
|
||||||
class="persian-text block"
|
class="persian-text block"
|
||||||
v-html="item?.highlight?.['content.fa'] ?? item?._source?.content"
|
v-html="item?.highlight?.['content.fa'] ?? item?._source?.content"
|
||||||
|
|
|
@ -195,7 +195,17 @@ const SearchList = defineAsyncComponent(() =>
|
||||||
<navigation-menu></navigation-menu>
|
<navigation-menu></navigation-menu>
|
||||||
|
|
||||||
<div class="text-logo">
|
<div class="text-logo">
|
||||||
<div class="search-box-container pb-0 flex justify-center">
|
<div
|
||||||
|
v-if="state.list?.length"
|
||||||
|
class="search-box-container pb-0 flex justify-center"
|
||||||
|
>
|
||||||
|
<div class="search-list-contianer">
|
||||||
|
<div class="total">
|
||||||
|
<span>{{ total }}</span>
|
||||||
|
نتیجه
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ref="el" class="search-list firefox-scrollbar hadithaFavorites">
|
||||||
<search-list
|
<search-list
|
||||||
no-data-text="هنوز چیزی ذخیره نکردهاید!"
|
no-data-text="هنوز چیزی ذخیره نکردهاید!"
|
||||||
no-data-icon="/img/haditha/save.png"
|
no-data-icon="/img/haditha/save.png"
|
||||||
|
@ -205,6 +215,15 @@ const SearchList = defineAsyncComponent(() =>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<no-data
|
||||||
|
v-else
|
||||||
|
class="h-full w-full flex flex-col justify-center items-center"
|
||||||
|
>
|
||||||
|
<img fit="auto" quality="80" src="/img/haditha/save.png" />
|
||||||
|
<p class="no-data-text">هنوز چیزی ذخیره نکردهاید!</p>
|
||||||
|
</no-data>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</HadithaLayout>
|
</HadithaLayout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -231,4 +250,35 @@ const SearchList = defineAsyncComponent(() =>
|
||||||
padding-bottom: 0 !important;
|
padding-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-list-contianer {
|
||||||
|
max-width: 41em; /*656px*/
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 1em;
|
||||||
|
|
||||||
|
.total {
|
||||||
|
padding: 0.5em 1.8em;
|
||||||
|
|
||||||
|
font-family: IRANSansX;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 0.68rem; /*11px*/
|
||||||
|
line-height: 1rem;
|
||||||
|
letter-spacing: 0%;
|
||||||
|
text-align: right;
|
||||||
|
color: #b4c2cf;
|
||||||
|
}
|
||||||
|
.search-list {
|
||||||
|
padding: 1em 1.3em;
|
||||||
|
height: calc(100dvh - 16em);
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
&.hadithaFavorites {
|
||||||
|
height: calc(100dvh - 8em);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom: 0.3px solid #d9d9d9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -86,6 +86,9 @@ fetchData();
|
||||||
const goToTheSearch = (type: string) => {
|
const goToTheSearch = (type: string) => {
|
||||||
router.push({
|
router.push({
|
||||||
name: "hadithaSearch",
|
name: "hadithaSearch",
|
||||||
|
query: {
|
||||||
|
q: route.query.q ?? "",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const goToTheChatbot = () => {
|
const goToTheChatbot = () => {
|
||||||
|
|
|
@ -769,6 +769,7 @@ const SearchList = defineAsyncComponent(
|
||||||
no-data-icon="/img/haditha/no-data.png"
|
no-data-icon="/img/haditha/no-data.png"
|
||||||
:total="total"
|
:total="total"
|
||||||
:list="loadedItems"
|
:list="loadedItems"
|
||||||
|
:searchTerm="searchTerm"
|
||||||
></search-list>
|
></search-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user