From a483264c39d40b0324cda421c15b21dc0632d37d Mon Sep 17 00:00:00 2001 From: optrader Date: Mon, 6 Oct 2025 17:28:33 +0900 Subject: [PATCH] [251006] feat: views - PlayerPanel.jsx, ShopNowContainer.jsx, ShopNowC... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit πŸ• 컀밋 μ‹œκ°„: 2025. 10. 06. 17:28:31 πŸ“Š λ³€κ²½ 톡계: β€’ 총 파일: 7개 β€’ μΆ”κ°€: +86쀄 β€’ μ‚­μ œ: -30쀄 πŸ“ μΆ”κ°€λœ 파일: + com.twin.app.shoptime/assets/images/player/icon_tabcontainer_shopnow.png + com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.jsx + com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.module.less + com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShowNowContainer.figma.jsx πŸ“ μˆ˜μ •λœ 파일: ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.module.less πŸ”§ ν•¨μˆ˜ λ³€κ²½ λ‚΄μš©: πŸ“„ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.module.less (unknown): βœ… Added: gradient(), position() ❌ Deleted: gradient(), position() πŸ“„ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.module.less (unknown): βœ… Added: focused() --- .../player/icon_tabcontainer_shopnow.png | Bin 0 -> 1544 bytes .../src/views/PlayerPanel/PlayerPanel.jsx | 11 +- .../PlayerTabContents/v2/ShopNowContainer.jsx | 31 +- .../v2/ShopNowContainer.module.less | 74 +- .../PlayerTabContents/v2/ShopNowItem.jsx | 32 + .../v2/ShopNowItem.module.less | 78 +++ .../v2/ShowNowContainer.figma.jsx | 640 ++++++++++++++++++ 7 files changed, 836 insertions(+), 30 deletions(-) create mode 100644 com.twin.app.shoptime/assets/images/player/icon_tabcontainer_shopnow.png create mode 100644 com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.jsx create mode 100644 com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.module.less create mode 100644 com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShowNowContainer.figma.jsx diff --git a/com.twin.app.shoptime/assets/images/player/icon_tabcontainer_shopnow.png b/com.twin.app.shoptime/assets/images/player/icon_tabcontainer_shopnow.png new file mode 100644 index 0000000000000000000000000000000000000000..51f40b5d990e891ed42008a09a65f93e9be5d18b GIT binary patch literal 1544 zcmV+j2KV`iP)ph9i!2)!P`mTVmK<>?D52Uzv=hE=b=mSH`-A*k#*UL#OR zr!KGwmu~Q-O=+Yb%R>ZAPK#(gf#voX|0hA9}W|%VsArgrjmtn)2h4^a9XXxVDk6J#&}%$pMkk4|n-D&@_#l}fGA(cKl{bAvEr`sc8> zSK(nnAvSIP5lpMug0~Ea0%dV|>|_Sm5ekBUai98;H@|?5O!^l2SHm)z6C5}mQzndo zAPBgA;|`7<&oDUzM1hv5pW;;dc`okh;g0EFjwMLhD;gs`nN*62{a z>Qde})`$Yl&3lA9_wu+$d_NipH&Yz~A&>O6R zxgSUJszRwiEonV_R%w!qC{PN{22skI4Slg4i6DU$B?h+6)XQHKsI9F6GP-UmE2~ld ztb*-hmX(&3)77M*(2;_9*Ax*`LAjQTixb@3T%gftk#plV2NLQ7Fdno z+};uH9b8RXE()|;S5HcZow)FCY3HDRTE_cgnxdi-oX)sNQKU!ru3qqZkzS2yhyrcz zB&d$1(IPJoqx%u@EJA~&yqYxwyLf-`9v6nODa6sRBw7~?+z zy?S)x9yvgzTXM=_Xbr%Yl~-VA@n696p^tY@ywlZ#-U(ZYGb^dh)`!S3021heKvA!$bnPqD13&&4q;C@JmTMGY? z!(nZ0jT(&x$4;i>?)`k|bahP9sF?*Skw_?3haf8A8}z0yV7uIZP=MWg4UEK zA$-|-gfCx@CDHM?n0XDhbiqd~_?p%Y=0~4#HWOhHaricT4YIE0FbRWZ7ARA+vXX%1 z`;=YrShZ{}h7Ib64sOomAsy7}GOz-M-M2-QB3V_h(Q3i2qnH)*5lF?1Egd`a=vk`% zZ{E&jk_OFe(3h$#&L&bt6t`*t;$s$JZFCrUIuub$LJ>>-*cIPlR`3MM?a!+$mC6=j zp@CSpdJ+6a48ptJykJjbFZJH`-C|HCETP-Lm6Ab!irs+GzL+*C0MjN1VC*M87&zd4 zxHvmCdb=6yDBmI2nh=fD1KSZW+K0&)v{nH%xI-&FYy)j2M>fc`d9=Y5t<-7k(Ykt2 zp$L6VmBkqJ&ofse(E5U0XpZiK=9grPFm3A3sDJo888iabSCpadW;W_>T(u0ll?{DG uIS-zH0RRC1|CeFVHUIzs21!IgR09Cdv+YT{grVX90000 { return ( - sideContentsVisible && + belowContentsVisible && playListInfo && panelInfo?.shptmBanrTpNm !== 'MEDIA' && !panelInfo?.modal && isOnTop ); - }, [sideContentsVisible, playListInfo, panelInfo, isOnTop]); + }, [belowContentsVisible, playListInfo, panelInfo, isOnTop]); const qrCurrentItem = useMemo(() => { if (shopNowInfo?.length && panelInfo?.shptmBanrTpNm === 'LIVE') { @@ -1961,6 +1963,11 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props spotlightRestrict="self-only" spotlightId="spotlightId-video-contaienr" onKeyDown={onKeyDown} + onClick={() => { + if (!panelInfo?.modal && isOnTop && panelInfo?.shptmBanrTpNm !== 'MEDIA') { + setBelowContentsVisible((prev) => !prev); + } + }} > {isReadyToPlay && ( {/* λ‚˜μ€‘μ— μ½˜ν…μΈ  μΆ”κ°€ μ˜ˆμ • */}; +export default function ShopNowContainer({ shopNowInfo }) { + // μž„μ‹œ 더미 데이터 (λ‚˜μ€‘μ— μ‹€μ œ λ°μ΄ν„°λ‘œ ꡐ체) + const dummyProducts = Array(6).fill({ + name: 'New Shark Vacuum! Your pet Hair Solution!', + salePrice: '32.98', + originalPrice: '150.00', + imageUrl: 'https://placehold.co/274x274', + }); + + const products = shopNowInfo || dummyProducts; + + return ( +
+
+
+ shop now icon +
+
SHOP NOW
+
+ +
+ {products.map((product, index) => ( + + ))} +
+
+ ); } diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.module.less b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.module.less index e9153322..01c07187 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.module.less +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowContainer.module.less @@ -2,38 +2,60 @@ @import "../../../../style/utils.module.less"; .container { - .size(@w: 100%, @h: 365px); + .size(@w: 100%, @h: 675px); .position(@position: fixed, @bottom: 0, @left: 0); padding: 60px; - background: linear-gradient( - to top, - rgba(0, 0, 0, 0.95) 0%, - rgba(0, 0, 0, 0.85) 40%, - rgba(0, 0, 0, 0.6) 70%, - rgba(0, 0, 0, 0) 100% - ); - border-top: 1px solid rgba(234, 234, 234, 0.3); + background: linear-gradient(270deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.62) 30%, rgba(0, 0, 0, 0) 65%), + linear-gradient(0deg, rgba(0, 0, 0, 0.53) 0%, rgba(20.56, 4.68, 32.71, 0.53) 60%, rgba(199, 32, 84, 0) 98%), + linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, black 45%, black 100%), + rgba(0, 0, 0, 0.56); + border-top: 1px solid rgba(234, 234, 234, 0.8); overflow: hidden; .flex(@display: flex, @justifyCenter: flex-start, @alignCenter: flex-start, @direction: column); + gap: 40px; z-index: 5; +} + +.header { + width: 300px; + height: 70px; + padding: 20px 0; + overflow: hidden; + border-radius: 100px; + .flex(@display: flex, @justifyCenter: flex-start, @alignCenter: center); + gap: 15px; +} + +.iconWrapper { + .size(@w: 40px, @h: 40px); + .position(@position: relative); + background: white; + border-radius: 100px; + .flex(@display: flex, @justifyCenter: center, @alignCenter: center); +} + +.icon { + .size(@w: 20.67px, @h: 20.67px); + object-fit: contain; +} + +.headerText { + color: #EAEAEA; + font-size: 24px; + font-family: @baseFont; + font-weight: 700; + line-height: 31px; + word-wrap: break-word; +} + +.productList { + align-self: stretch; + .flex(@display: flex, @justifyCenter: flex-start, @alignCenter: flex-start); + gap: 30px; + overflow-x: auto; + overflow-y: hidden; > * + * { - margin-top: 20px; - } - - &::before { - content: ""; - .position(@position: absolute, @top: 0, @left: 0); - .size(@w: 100%, @h: 100%); - background: linear-gradient( - 90deg, - rgba(30, 30, 30, 0.4) 0%, - rgba(50, 50, 50, 0.25) 30%, - transparent 50%, - rgba(50, 50, 50, 0.25) 70%, - rgba(30, 30, 30, 0.4) 100% - ); - pointer-events: none; - z-index: -1; + margin-left: 0; } } diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.jsx new file mode 100644 index 00000000..1a5be990 --- /dev/null +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.jsx @@ -0,0 +1,32 @@ +import React from 'react'; + +import Spottable from '@enact/spotlight/Spottable'; + +import css from './ShopNowItem.module.less'; + +const SpottableDiv = Spottable('div'); + +export default function ShopNowItem({ product, isFocused }) { + return ( + + {product?.name} +
+
+ {product?.name || 'New Shark Vacuum! Your pet Hair Solution!'} +
+
+
+
${product?.salePrice || '32.98'}
+ {product?.originalPrice && ( +
${product?.originalPrice || '150.00'}
+ )} +
+
+
+
+ ); +} diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.module.less b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.module.less new file mode 100644 index 00000000..5129332a --- /dev/null +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowItem.module.less @@ -0,0 +1,78 @@ +@import "../../../../style/CommonStyle.module.less"; +@import "../../../../style/utils.module.less"; + +.item { + width: 310px; + padding: 18px; + background: rgba(51, 51, 51, 0.95); + border-radius: 12px; + border: 1px solid transparent; + .flex(@display: flex, @justifyCenter: flex-start, @alignCenter: flex-start, @direction: column); + gap: 15px; + flex-shrink: 0; + transition: all 0.3s ease; + + &:focus { + border-color: @PRIMARY_COLOR_RED; + outline: 4px @PRIMARY_COLOR_RED solid; + outline-offset: -4px; + + &::after { + .focused(@boxShadow: 22px, @borderRadius: 12px); + } + } +} + +.productImage { + align-self: stretch; + height: 274px; + padding: 5px 4px; + object-fit: contain; +} + +.productInfo { + align-self: stretch; + .flex(@display: flex, @justifyCenter: center, @alignCenter: flex-start, @direction: column); + gap: 15px; +} + +.productName { + align-self: stretch; + color: #EAEAEA; + font-size: 24px; + font-family: @baseFont; + font-weight: 700; + line-height: 31px; + word-wrap: break-word; +} + +.priceWrapper { + align-self: stretch; + .flex(@display: flex, @justifyCenter: flex-start, @alignCenter: flex-start); + gap: 10px; +} + +.priceContainer { + padding: 4px 0; + .flex(@display: flex, @justifyCenter: flex-start, @alignCenter: center); + gap: 11px; +} + +.salePrice { + color: @PRIMARY_COLOR_RED; + font-size: 30px; + font-family: @baseFont; + font-weight: 700; + line-height: 35px; + word-wrap: break-word; +} + +.originalPrice { + color: #808080; + font-size: 24px; + font-family: @baseFont; + font-weight: 400; + text-decoration: line-through; + line-height: 18px; + word-wrap: break-word; +} diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShowNowContainer.figma.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShowNowContainer.figma.jsx new file mode 100644 index 00000000..672860ed --- /dev/null +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShowNowContainer.figma.jsx @@ -0,0 +1,640 @@ +
+
+
+ +
+
+ SHOP NOW +
+
+
+
+ +
+
+ New Shark Vacuum! Your pet Hair Solution! +
+
+
+
+ $32.98 +
+
+ $150.00 +
+
+
+
+
+
+ +
+
+ New Shark Vacuum! Your pet Hair Solution! +
+
+
+
+ $32.98 +
+
+ $150.00 +
+
+
+
+
+
+ +
+
+ New Shark Vacuum! Your pet Hair Solution! +
+
+
+
+ $32.98 +
+
+ $150.00 +
+
+
+
+
+
+ +
+
+ New Shark Vacuum! Your pet Hair Solution! +
+
+
+
+ $32.98 +
+
+ $150.00 +
+
+
+
+
+
+ +
+
+ New Shark Vacuum! Your pet Hair Solution! +
+
+
+
+ $32.98 +
+
+ $150.00 +
+
+
+
+
+
+ +
+
+ New Shark Vacuum! Your pet Hair Solution! +
+
+
+
+ $32.98 +
+
+ $150.00 +
+
+
+
+
+
+
;