Skip to content

Commit

Permalink
🔀 Merge #1989 into deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Dec 27, 2024
2 parents 56edbe6 + 938ccdc commit 038a4d0
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 33 deletions.
16 changes: 5 additions & 11 deletions src/components/Icon/Info.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<template>
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0_2791_3213)">
<svg fill="none" viewBox="0 0 16 16">
<g clip-path="url(#a)">
<path
d="M7.33334 11.3333H8.66667V7.33334H7.33334V11.3333ZM8 1.33334C4.32 1.33334 1.33334 4.32001 1.33334 8.00001C1.33334 11.68 4.32 14.6667 8 14.6667C11.68 14.6667 14.6667 11.68 14.6667 8.00001C14.6667 4.32001 11.68 1.33334 8 1.33334ZM8 13.3333C5.06 13.3333 2.66667 10.94 2.66667 8.00001C2.66667 5.06001 5.06 2.66668 8 2.66668C10.94 2.66668 13.3333 5.06001 13.3333 8.00001C13.3333 10.94 10.94 13.3333 8 13.3333ZM7.33334 6.00001H8.66667V4.66668H7.33334V6.00001Z"
fill="currentColor"
d="M7.333 11.333h1.334v-4H7.333v4Zm.667-10A6.67 6.67 0 0 0 1.333 8 6.67 6.67 0 0 0 8 14.667 6.67 6.67 0 0 0 14.667 8 6.67 6.67 0 0 0 8 1.333Zm0 12A5.34 5.34 0 0 1 2.667 8 5.34 5.34 0 0 1 8 2.667 5.34 5.34 0 0 1 13.333 8 5.34 5.34 0 0 1 8 13.333ZM7.333 6h1.334V4.667H7.333V6Z"
/>
</g>
<defs>
<clipPath id="clip0_2791_3213">
<rect width="16" height="16" fill="white" />
<clipPath id="a">
<path fill="#fff" d="M0 0h16v16H0z" />
</clipPath>
</defs>
</svg>
Expand Down
1 change: 1 addition & 0 deletions src/components/NFTBook/ItemCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
<NFTBookSpecTableItemAccessMethod
:is-downloadable="!nftIsDownloadHidden"
:preset="preset"
@clickTooltip="$emit('clickTooltip')"
/>
</NFTBookSpecTable>
<div
Expand Down
5 changes: 3 additions & 2 deletions src/components/NFTBook/SpecTableItemAccessMethod.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:preset="preset"
:tooltip-title="tooltipsContent.title"
:tooltip-text="tooltipsContent.text"
@clickTooltip="$emit('clickTooltip')"
/>
</component>
</template>
Expand Down Expand Up @@ -41,15 +42,15 @@ export default {
'nft_details_page_label_access_methods_tooltips_title_drm_free'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltips_text_drm_free'
'nft_details_page_label_access_methods_tooltip_text_drm_free'
),
}
: {
title: this.$t(
'nft_details_page_label_access_methods_tooltips_title_drm'
),
text: this.$t(
'nft_details_page_label_access_methods_tooltips_text_drm'
'nft_details_page_label_access_methods_tooltip_text_drm'
),
};
},
Expand Down
31 changes: 16 additions & 15 deletions src/components/NFTBook/SpecTableValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div
v-if="tooltipText"
class="relative z-[300] hidden group laptop:block"
@mouseenter="hoverTooltips"
@mouseenter="hoverTooltip"
>
<IconInfo />
<NFTBookTooltips
<IconInfo class="w-[16px]" />
<NFTBookTooltip
class="hidden group-hover:block"
:tooltip-text="tooltipText"
:tooltip-title="tooltipTitle"
Expand All @@ -17,14 +17,14 @@
<div
v-if="tooltipText"
class="cursor-pointer laptop:hidden"
@click="onclickShowTooltips"
@click="onclickShowTooltip"
>
<IconInfo />
<IconInfo class="w-[16px]" />
</div>
<BottomDialog
v-if="showTooltips"
v-if="showTooltip"
:title="tooltipTitle"
@close="closeTooltips"
@close="closeTooltip"
>
<template #content>
{{ tooltipText }}
Expand Down Expand Up @@ -58,7 +58,7 @@ export default {
},
data() {
return {
showTooltips: false,
showTooltip: false,
};
},
computed: {
Expand All @@ -68,15 +68,16 @@ export default {
},
},
methods: {
hoverTooltips() {
logTrackerEvent(this, 'NFTBook', 'TooltipsHover', '', 1);
hoverTooltip() {
logTrackerEvent(this, 'NFTBook', 'TooltipHover', '', 1);
},
onclickShowTooltips() {
this.showTooltips = true;
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1);
onclickShowTooltip() {
this.showTooltip = true;
logTrackerEvent(this, 'NFTBook', 'TooltipClicked', '', 1);
this.$emit('clickTooltip');
},
closeTooltips() {
this.showTooltips = false;
closeTooltip() {
this.showTooltip = false;
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<script>
export default {
name: 'NFTBookTooltips',
name: 'NFTBookTooltip',
props: {
tooltipText: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/NFTCollection/ItemCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
/>
<NFTBookSpecTableItemAccessMethod
:is-downloadable="isDownloadable"
@clickTooltip="$emit('clickTooltip')"
/>
</NFTBookSpecTable>
<div
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,9 @@
"nft_details_page_errormessage_transfer_self": "You cannot send Writing NFT to yourself.",
"nft_details_page_label_access_methods": "Access Method",
"nft_details_page_label_access_methods_downloadable": "Read online / Download",
"nft_details_page_label_access_methods_tooltips_text_drm": "Refers to eBooks that have digital rights management technology, allowing readers to open and read the content on our site.",
"nft_details_page_label_access_methods_tooltip_text_drm": "Refers to eBooks that have digital rights management technology, allowing readers to open and read the content on our site.",
"nft_details_page_label_access_methods_tooltips_title_drm": "DRM Content",
"nft_details_page_label_access_methods_tooltips_text_drm_free": "Refers to eBooks without digital rights management technology, allowing readers to freely download and transfer the eBook to different devices.",
"nft_details_page_label_access_methods_tooltip_text_drm_free": "Refers to eBooks without digital rights management technology, allowing readers to freely download and transfer the eBook to different devices.",
"nft_details_page_label_access_methods_tooltips_title_drm_free": "DRM-Free Content",
"nft_details_page_label_access_methods_web_only": "Read Online",
"nft_details_page_label_ar_view_in_mobile": "Experience your NFT live",
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 @@ -673,9 +673,9 @@
"nft_details_page_errormessage_transfer_self": "不能發送給自己",
"nft_details_page_label_access_methods": "閱讀方式",
"nft_details_page_label_access_methods_downloadable": "站內閱讀 / 檔案下載",
"nft_details_page_label_access_methods_tooltips_text_drm": "指設有數位版權管理技術的電子書,讀者可以於我們的站內開啟及閱讀內容。",
"nft_details_page_label_access_methods_tooltip_text_drm": "指設有數位版權管理技術的電子書,讀者可以於我們的站內開啟及閱讀內容。",
"nft_details_page_label_access_methods_tooltips_title_drm": "DRM 內容",
"nft_details_page_label_access_methods_tooltips_text_drm_free": "指沒有數位版權管理技術的電子書,讀者可以自由下載和傳輸電子書到不同裝置。",
"nft_details_page_label_access_methods_tooltip_text_drm_free": "指沒有數位版權管理技術的電子書,讀者可以自由下載和傳輸電子書到不同裝置。",
"nft_details_page_label_access_methods_tooltips_title_drm_free": "不設 DRM 內容",
"nft_details_page_label_access_methods_web_only": "站內閱讀",
"nft_details_page_label_ar_view_in_mobile": "將你的 NFT 帶到現實",
Expand Down
10 changes: 10 additions & 0 deletions src/pages/nft/class/_classId/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
:class-id="classId"
preset="details"
@click-avatar="handleNFTCardClickAvatar"
@clickTooltip="handleNFTCardClickTooltip"
>
<template #column-left>
<ul
Expand Down Expand Up @@ -1921,6 +1922,15 @@ export default {
1
);
},
handleNFTCardClickTooltip() {
logTrackerEvent(
this,
'NFT',
'nft_class_details_card_tooltip_clicked',
this.classId,
1
);
},
},
};
</script>
10 changes: 10 additions & 0 deletions src/pages/nft/collection/_collectionId/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:collection-id="collectionId"
preset="details"
@click-avatar="handleNFTCardClickAvatar"
@clickTooltip="handleNFTCardClickTooltip"
>
<template #column-left>
<ButtonV2
Expand Down Expand Up @@ -792,6 +793,15 @@ export default {
1
);
},
handleNFTCardClickTooltip() {
logTrackerEvent(
this,
'NFT',
'nft_collection_details_card_tooltip_clicked',
this.collectionId,
1
);
},
},
};
</script>

0 comments on commit 038a4d0

Please sign in to comment.