From 9feb248255db2757bc4dd1030e4c50ffab47e160 Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Sat, 7 Dec 2024 00:46:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20latest=20book=20sortin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/store/index.vue b/src/pages/store/index.vue index 023755115..35f1cbe9a 100644 --- a/src/pages/store/index.vue +++ b/src/pages/store/index.vue @@ -850,7 +850,7 @@ export default { return this.nftGetBookstoreCMSProductsByTagId(this.selectedTagId); } - if (this.selectedSorting === SORTING_OPTIONS.LATEST) { + if (this.selectedTagId === 'latest') { // Return the latest 100 published books & fill up with recommended books from CMS return this.nftBookstoreLatestItems .map(item => ({ From e005d955d8c225051b29966f43d5da8b1533c28e Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Sat, 7 Dec 2024 01:08:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=92=84=20Add=20active=20tag=20title?= =?UTF-8?q?=20in=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.json | 4 ++-- src/locales/zh-Hant.json | 4 ++-- src/pages/store/index.vue | 16 +++++++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index aead55f04..b68551432 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1019,7 +1019,7 @@ "stepper": "Step {step} / {totalStep}", "store_articles_button": "Browse Articles", "store_books_page_description": "Merge technology and humanity. Drive blockchain publishing to preserve and distribute great stories. Liker Land bridges the new world and old, reshaping reading and media culture.", - "store_index_page_title": "All Books - Ebook Store x Digital Publishing - Liker Land", + "store_index_page_title": "{name} Items - Ebook Store x Digital Publishing - Liker Land", "store_nft_book_more_button": "More Books", "substack_button_loading": "Loading...", "substack_button_submit": "Subscribe Newsletter", @@ -1030,9 +1030,9 @@ "View the weekly, daily statistics of your LikeCoin bonus, down to each workpiece.", "Stake your LikeCoin to gain extra reward, and participate in community governance." ], - "tag_all_title": "All", "tag_all_featured": "Featured", "tag_all_latest": "Latest Arrivals", + "tag_all_title": "All", "tooltip_coming_soon": "Coming Soon", "tooltip_no_nft": "No owned NFTs to transfer", "tooltip_share": "Copy URL", diff --git a/src/locales/zh-Hant.json b/src/locales/zh-Hant.json index 95d0ae542..39dba9b42 100644 --- a/src/locales/zh-Hant.json +++ b/src/locales/zh-Hant.json @@ -1019,7 +1019,7 @@ "stepper": "步驟 {step} / {totalStep}", "store_articles_button": "瀏覽文章", "store_books_page_description": "融合科技與人文。推動區塊鏈出版,讓好故事繼續流傳。Liker Land 連接新世界和舊產業,重塑閱讀和傳播文化。", - "store_index_page_title": "所有書目 - 電子書店 x 數位出版 - Liker Land", + "store_index_page_title": "{name}書目 - 電子書店 x 數位出版 - Liker Land", "store_nft_book_more_button": "更多書目", "substack_button_loading": "請稍候...", "substack_button_submit": "訂閱電子報", @@ -1030,9 +1030,9 @@ "每週、每天、每篇文章所獲賺賞,一目了然", "委託 LikeCoin 獲得額外回報,同時參與社群決策" ], - "tag_all_title": "全部", "tag_all_featured": "精選", "tag_all_latest": "最新上架", + "tag_all_title": "全部", "tooltip_coming_soon": "快將推出", "tooltip_no_nft": "沒有可發送的 NFT", "tooltip_share": "複製網址", diff --git a/src/pages/store/index.vue b/src/pages/store/index.vue index 35f1cbe9a..9ded013ec 100644 --- a/src/pages/store/index.vue +++ b/src/pages/store/index.vue @@ -591,10 +591,9 @@ export default { }; }, head() { - let title = this.$t('store_index_page_title'); - if (this.selectedTagTitle) { - title = `${this.selectedTagTitle} - ${title}`; - } + const title = this.$t('store_index_page_title', { + name: this.selectedTagTitle, + }); const description = this.selectedTagDescription || this.$t('store_books_page_description'); @@ -1029,7 +1028,14 @@ export default { ); }, selectedTagTitle() { - return this.selectedTag?.name; + switch (this.selectedTagId) { + case 'featured': + return this.$t('tag_all_featured'); + case 'latest': + return this.$t('tag_all_latest'); + default: + return this.selectedTag?.name; + } }, selectedTagDescription() { return this.selectedTag?.description;