-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TAS-2734]💄 Display DRM information on product page #1989
[TAS-2734]💄 Display DRM information on product page #1989
Conversation
AuroraHuang22
commented
Dec 18, 2024
src/components/NFTBook/Tooltips.vue
Outdated
'shadow-md', | ||
]" | ||
> | ||
<h4 class="font-600 text-dark-gray">{{ tooltipTitle }}</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to use h* tag on hover tooltips
src/components/Icon/Info.vue
Outdated
<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)"> | ||
<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" | ||
/> | ||
</g> | ||
<defs> | ||
<clipPath id="clip0_2791_3213"> | ||
<rect width="16" height="16" fill="white" /> | ||
</clipPath> | ||
</defs> | ||
</svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try optimize the SVG with https://jakearchibald.github.io/svgomg/ and also remove width & height attribute
tooltipsContent() { | ||
return this.isDownloadable | ||
? { | ||
title: this.$t( | ||
'nft_details_page_label_access_methods_tooltips_title_drm_free' | ||
), | ||
text: this.$t( | ||
'nft_details_page_label_access_methods_tooltips_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' | ||
), | ||
}; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tooltipsContent() { | |
return this.isDownloadable | |
? { | |
title: this.$t( | |
'nft_details_page_label_access_methods_tooltips_title_drm_free' | |
), | |
text: this.$t( | |
'nft_details_page_label_access_methods_tooltips_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' | |
), | |
}; | |
}, | |
tooltipContent() { | |
return this.isDownloadable | |
? { | |
title: this.$t( | |
'nft_details_page_label_access_methods_tooltip_title_drm_free' | |
), | |
text: this.$t( | |
'nft_details_page_label_access_methods_tooltip_text_drm_free' | |
), | |
} | |
: { | |
title: this.$t( | |
'nft_details_page_label_access_methods_tooltip_title_drm' | |
), | |
text: this.$t( | |
'nft_details_page_label_access_methods_tooltip_text_drm' | |
), | |
}; | |
}, |
@mouseenter="hoverTooltips" | ||
> | ||
<IconInfo /> | ||
<NFTBookTooltips |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<NFTBookTooltips | |
<NFTBookTooltip |
src/components/NFTBook/Tooltips.vue
Outdated
|
||
<script> | ||
export default { | ||
name: 'NFTBookTooltips', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: 'NFTBookTooltips', | |
name: 'NFTBookTooltip', |
onclickShowTooltips() { | ||
this.showTooltips = true; | ||
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also emit an event for the outermost page to log event
<div | ||
v-if="tooltipText" | ||
class="cursor-pointer laptop:hidden" | ||
@click="onclickShowTooltips" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@click="onclickShowTooltips" | |
@click="onclickShowTooltip" |
hoverTooltips() { | ||
logTrackerEvent(this, 'NFTBook', 'TooltipsHover', '', 1); | ||
}, | ||
onclickShowTooltips() { | ||
this.showTooltips = true; | ||
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hoverTooltips() { | |
logTrackerEvent(this, 'NFTBook', 'TooltipsHover', '', 1); | |
}, | |
onclickShowTooltips() { | |
this.showTooltips = true; | |
logTrackerEvent(this, 'NFTBook', 'TooltipsClicked', '', 1); | |
hoverTooltip() { | |
logTrackerEvent(this, 'NFTBook', 'TooltipHover', '', 1); | |
}, | |
onclickShowTooltip() { | |
this.showTooltip = true; | |
logTrackerEvent(this, 'NFTBook', 'TooltipClicked', '', 1); |
closeTooltips() { | ||
this.showTooltips = false; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closeTooltips() { | |
this.showTooltips = false; | |
}, | |
closeTooltip() { | |
this.showTooltip = false; | |
}, |
src/locales/en.json
Outdated
"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_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_tooltips_title_drm_free": "DRM-Free Content", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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_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_tooltips_title_drm_free": "DRM-Free Content", | |
"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_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_tooltip_title_drm_free": "DRM-Free Content", | |
<div | ||
v-if="tooltipText" | ||
class="relative z-[300] hidden group laptop:block" | ||
@mouseenter="hoverTooltips" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mouseenter="hoverTooltips" | |
@mouseenter="hoverTooltip" |
src/components/Icon/Info.vue
Outdated
<template> | ||
<svg fill="none" viewBox="0 0 16 16"> | ||
<g clip-path="url(#a)"> | ||
<path | ||
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="a"> | ||
<path fill="#fff" d="M0 0h16v16H0z" /> | ||
</clipPath> | ||
</defs> | ||
</svg> | ||
</template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<template> | |
<svg fill="none" viewBox="0 0 16 16"> | |
<g clip-path="url(#a)"> | |
<path | |
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="a"> | |
<path fill="#fff" d="M0 0h16v16H0z" /> | |
</clipPath> | |
</defs> | |
</svg> | |
</template> | |
<template> | |
<svg xmlns="http://www.w3.org/2000/svg" fill="none"> | |
<path | |
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" | |
/> | |
</svg> | |
</template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.