Skip to content

Commit

Permalink
💄 Add active tag title in header
Browse files Browse the repository at this point in the history
  • Loading branch information
nwingt committed Dec 6, 2024
1 parent 9feb248 commit e005d95
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/locales/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "訂閱電子報",
Expand All @@ -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": "複製網址",
Expand Down
16 changes: 11 additions & 5 deletions src/pages/store/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e005d95

Please sign in to comment.