From 88721dbb1a9c9de9f0d37f3d9b305bfb5e360d40 Mon Sep 17 00:00:00 2001 From: Baghi Date: Sat, 19 Apr 2025 11:24:19 +0330 Subject: [PATCH] =?UTF-8?q?=D8=AD=D8=B0=D9=81=20=D8=A8=D9=88=DA=A9=D9=85?= =?UTF-8?q?=D8=A7=D8=B1=DA=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hadithaApi.js | 2 +- components/haditha/search-page/SearchList.vue | 59 +++++++++++++------ pages/haditha/search/[id]/[slug]/index.vue | 31 ++++++++++ 3 files changed, 74 insertions(+), 18 deletions(-) diff --git a/apis/hadithaApi.js b/apis/hadithaApi.js index c8c8d44..486f782 100644 --- a/apis/hadithaApi.js +++ b/apis/hadithaApi.js @@ -1,7 +1,7 @@ export default { search: { list: "repo/monir/search/@index_key/@search_type/@type_key/@listkey/@field_collapsed/@offset/@limit/@q=none", - show: "repo/public/get/byid/@index_key/@id", + show: "repo/public/get/byid/@index_key/@id/tbookmark", synonym: "synonym/get/words", prevNextHadith: "monir/next/@index_key/@vol_id/@parag_order/@step", getDataTree: "@appname/book/tree/@offset/@limit/@vol_id/@q" diff --git a/components/haditha/search-page/SearchList.vue b/components/haditha/search-page/SearchList.vue index edbba70..8f491b5 100644 --- a/components/haditha/search-page/SearchList.vue +++ b/components/haditha/search-page/SearchList.vue @@ -88,29 +88,30 @@ const removeFromFavorites = async (item = {}, index = 0) => { v-for="(item, index) in props.list" :key="index" > -
+ - - {{ - item?._source?.meta?.hadith_masoum ?? - item?._source?.meta?.hadith_sanad - }} - { .modal-overlay { background: #00000033; } +.copy-btn { + padding: 0.2em 1em; + + /* width: 44px; */ + /* height: 24px; */ + gap: 4px; + border-radius: 6px; + border-width: 0.5px; + padding-top: 4px; + padding-right: 12px; + padding-bottom: 4px; + padding-left: 12px; + /* background: #ffffff; */ + /* border: 0.5px solid #d9d9d9; */ + + font-family: IRANSansX; + font-weight: 300; + font-size: 12px; + line-height: 18px; + letter-spacing: 0%; + text-align: right; + + /* color: #a71111; */ +} diff --git a/pages/haditha/search/[id]/[slug]/index.vue b/pages/haditha/search/[id]/[slug]/index.vue index f3c943b..2220a3a 100644 --- a/pages/haditha/search/[id]/[slug]/index.vue +++ b/pages/haditha/search/[id]/[slug]/index.vue @@ -132,6 +132,7 @@ const route = useRoute(); const router = useRouter(); const loading = ref(false); const httpService = useNuxtApp()["$http"]; +const toast = useToast(); const state = reactive({ selectedItem: {} as HadithResponseShowModel, @@ -202,6 +203,21 @@ const addToFavorites = async (item = {}) => { }; httpService.postRequest(url, formData).then((res) => { // this.updateListAnswer(index, "tbookmark", 1); + + try { + toast.add({ + title: "انجام شد.", + description: "به نشان شده ها افزوده شد", + color: "success", + }); + } catch (err) { + console.log(err.message); + toast.add({ + title: "انجام شد.", + description: "خطایی رخ داد.لطفا دوباره امتحان کنید.", + color: "error", + }); + } }); }; @@ -217,6 +233,21 @@ const removeFromFavorites = async (item = {}, index = 0) => { }; httpService.postRequest(url, formData).then((res) => { // this.updateListAnswer(index, "tbookmark", 0); + + try { + toast.add({ + title: "انجام شد.", + description: "از لیست نشان شده ها حذف شد", + color: "success", + }); + } catch (err) { + console.log(err.message); + toast.add({ + title: "انجام شد.", + description: "خطایی رخ داد.لطفا دوباره امتحان کنید.", + color: "error", + }); + } }); };