Update files.
This commit is contained in:
parent
0db2ba3f38
commit
30cad3040c
|
@ -16,6 +16,9 @@ const props = defineProps({
|
|||
noDataIcon: {
|
||||
default: "/img/haditha/no-data.png",
|
||||
},
|
||||
searchTerm: {
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
@ -23,7 +26,7 @@ const route = useRoute();
|
|||
// const modal = useModal();
|
||||
// const isModalOpen = ref(false);
|
||||
|
||||
function openModal(selectedItem) {
|
||||
function goToSearchShowPage(selectedItem) {
|
||||
// modal.open(SearchShow, { title: "Welcome" });
|
||||
// isModalOpen.value = true;
|
||||
|
||||
|
@ -39,8 +42,7 @@ function openModal(selectedItem) {
|
|||
slug: slug,
|
||||
},
|
||||
query: {
|
||||
firstPage: 1,
|
||||
page_count: props.total,
|
||||
q: props.searchTerm,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -87,7 +89,7 @@ const removeFromFavorites = async (item = {}, index = 0) => {
|
|||
item?._source?.meta?.hadith_masoum ??
|
||||
item?._source?.meta?.hadith_sanad
|
||||
}`"
|
||||
@click.prevent="openModal(item)"
|
||||
@click.prevent="goToSearchShowPage(item)"
|
||||
class="from-person block"
|
||||
>
|
||||
{{
|
||||
|
@ -106,14 +108,14 @@ const removeFromFavorites = async (item = {}, index = 0) => {
|
|||
</div>
|
||||
|
||||
<a
|
||||
@click.prevent="openModal(item)"
|
||||
@click.prevent="goToSearchShowPage(item)"
|
||||
class="arabic-text block"
|
||||
:href="`/haditha/search/${item?._source?.id}/${item?._source?.content_ar}`"
|
||||
>
|
||||
{{ item?._source?.content_ar }}
|
||||
</a>
|
||||
<a
|
||||
@click.prevent="openModal(item)"
|
||||
@click.prevent="goToSearchShowPage(item)"
|
||||
:href="`/haditha/search/${item?._source?.id}/${item?._source?.content}`"
|
||||
class="persian-text block"
|
||||
v-html="item?.highlight?.['content.fa'] ?? item?._source?.content"
|
||||
|
|
|
@ -195,14 +195,33 @@ const SearchList = defineAsyncComponent(() =>
|
|||
<navigation-menu></navigation-menu>
|
||||
|
||||
<div class="text-logo">
|
||||
<div class="search-box-container pb-0 flex justify-center">
|
||||
<search-list
|
||||
no-data-text="هنوز چیزی ذخیره نکردهاید!"
|
||||
no-data-icon="/img/haditha/save.png"
|
||||
:list="state.list"
|
||||
:total="state.totalCounts"
|
||||
></search-list>
|
||||
<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
|
||||
no-data-text="هنوز چیزی ذخیره نکردهاید!"
|
||||
no-data-icon="/img/haditha/save.png"
|
||||
:list="state.list"
|
||||
:total="state.totalCounts"
|
||||
></search-list>
|
||||
</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>
|
||||
|
@ -231,4 +250,35 @@ const SearchList = defineAsyncComponent(() =>
|
|||
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>
|
||||
|
|
|
@ -86,6 +86,9 @@ fetchData();
|
|||
const goToTheSearch = (type: string) => {
|
||||
router.push({
|
||||
name: "hadithaSearch",
|
||||
query: {
|
||||
q: route.query.q ?? "",
|
||||
},
|
||||
});
|
||||
};
|
||||
const goToTheChatbot = () => {
|
||||
|
|
|
@ -769,6 +769,7 @@ const SearchList = defineAsyncComponent(
|
|||
no-data-icon="/img/haditha/no-data.png"
|
||||
:total="total"
|
||||
:list="loadedItems"
|
||||
:searchTerm="searchTerm"
|
||||
></search-list>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user