From a440999e9b14a940d26815fd72d54310c3a200c1 Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Wed, 21 Aug 2024 14:17:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EC=B9=B4=EB=93=9C=EB=B7=B0=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=20alert=EB=A9=94=EC=8B=9C=EC=A7=80=20?= =?UTF-8?q?=EC=A4=84=EB=B0=94=EA=BF=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/entry/scss/popup.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/entry/scss/popup.scss b/src/assets/entry/scss/popup.scss index bd673f6a..02a5a42d 100644 --- a/src/assets/entry/scss/popup.scss +++ b/src/assets/entry/scss/popup.scss @@ -917,7 +917,8 @@ font-size: 14px; color: #000; letter-spacing: -0.32px; - line-height: 16px; + line-height: 1.29; + white-space: pre-line; } .caution_dsc:before { position: absolute; From ba5ffb1e3189541a58444be71a7cd3d49a088d38 Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Wed, 21 Aug 2024 14:21:44 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor,=20feat:=20alertMsg=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EA=B8=B0=20=EB=A1=9C=EC=A7=81=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81,=20hw=5Flite=EC=8B=9C=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EB=AA=85=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../popup/Contents/Select/BigICON/index.jsx | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/components/popup/Contents/Select/BigICON/index.jsx b/src/components/popup/Contents/Select/BigICON/index.jsx index de54e263..e8d764c0 100644 --- a/src/components/popup/Contents/Select/BigICON/index.jsx +++ b/src/components/popup/Contents/Select/BigICON/index.jsx @@ -8,9 +8,23 @@ import { connect } from 'react-redux'; import { triggerEvent } from '@actions/index'; import { EMIT_TYPES as Types } from '@constants'; +const ALERT_MSG_KEY = { + aiUtilize: 'template.aiUtilize_block_descriptions', + hw_lite: 'template.hardware_lite_descriptions', + 'entry-js': 'template.expansion_block_descriptions', +}; + const Index = (props) => { const theme = Theme.getStyle('popup'); - const { data = [], imageBaseUrl, applySelected, submit, selected, HeaderButtonPortal, popupAlertMessage } = props; + const { + data = [], + imageBaseUrl, + applySelected, + submit, + selected, + HeaderButtonPortal, + popupAlertMessage, + } = props; useEffect(() => { applySelected(data.filter((item) => item.active)); @@ -23,13 +37,13 @@ const Index = (props) => { return false; }); - const alertMsgKey = useMemo(() => { + const popupType = useMemo(() => { if (imageBaseUrl.includes('aiUtilize')) { - return 'template.aiUtilize_block_descriptions'; + return 'aiUtilize'; } else if (imageBaseUrl.includes('hw_lite')) { - return 'template.hardware_lite_descriptions'; + return 'hw_lite'; } else if (imageBaseUrl.includes('entry-js')) { - return 'template.expansion_block_descriptions'; + return 'entry-js'; } else { console.error('Error, incorrect imageBaseUrl : ', imageBaseUrl); } @@ -38,7 +52,9 @@ const Index = (props) => { return (

BIG ICON LIST

-

{popupAlertMessage || CommonUtils.getLang(alertMsgKey)}

+

+ {popupAlertMessage || CommonUtils.getLang(ALERT_MSG_KEY[popupType])} +

    {data.map((item) => ( @@ -57,7 +73,9 @@ const Index = (props) => { role="button" onClick={CommonUtils.handleClick(() => submit({ selected }))} > - {CommonUtils.getLang('Buttons.load')} + {CommonUtils.getLang( + popupType === 'hw_lite' ? 'Buttons.select' : 'Buttons.load' + )}
From 581154a5fd63351374a2248fe0e13946b0fb1390 Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Wed, 21 Aug 2024 16:23:18 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=EB=B8=8C=EB=9D=BC=EC=9A=B0?= =?UTF-8?q?=EC=A0=80=EB=A1=9C=20=EC=97=B0=EA=B2=B0=ED=95=98=EA=B8=B0?= =?UTF-8?q?=EC=8B=9C=20=EC=A4=91=EB=B3=B5=EC=84=A0=ED=83=9D=20=EB=B6=88?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../popup/Contents/Select/BigICON/Item.jsx | 4 ++++ .../popup/Contents/Select/BigICON/index.jsx | 21 +++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/popup/Contents/Select/BigICON/Item.jsx b/src/components/popup/Contents/Select/BigICON/Item.jsx index 98d7c61f..6e41dbe0 100644 --- a/src/components/popup/Contents/Select/BigICON/Item.jsx +++ b/src/components/popup/Contents/Select/BigICON/Item.jsx @@ -16,6 +16,7 @@ const Index = ({ select, deselect, useLangKey = true, + allowDuplicate = true, }) => { const theme = Theme.getStyle('popup'); const { imageName, sponserText, linkBox } = item; @@ -31,6 +32,9 @@ const Index = ({ selected.splice(index, 1); } } else { + if (!allowDuplicate && selected.length >= 0) { + selected = []; + } selected.push(item, () => select(item)); } applySelected(selected); diff --git a/src/components/popup/Contents/Select/BigICON/index.jsx b/src/components/popup/Contents/Select/BigICON/index.jsx index e8d764c0..2094da67 100644 --- a/src/components/popup/Contents/Select/BigICON/index.jsx +++ b/src/components/popup/Contents/Select/BigICON/index.jsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import Item from './Item'; import { CommonUtils } from '@utils/Common'; import Theme from '@utils/Theme'; @@ -25,6 +25,7 @@ const Index = (props) => { HeaderButtonPortal, popupAlertMessage, } = props; + const [itemSelected, setItemSelected] = useState(true); useEffect(() => { applySelected(data.filter((item) => item.active)); @@ -49,6 +50,8 @@ const Index = (props) => { } }, [imageBaseUrl]); + const isHwLite = popupType === 'hw_lite'; + return (

BIG ICON LIST

@@ -63,19 +66,25 @@ const Index = (props) => { item={item} imageBaseUrl={imageBaseUrl} useLangKey={useLangKey} + allowDuplicate={isHwLite ? false : true} // 수정 /> ))}
submit({ selected }))} + onClick={CommonUtils.handleClick(() => { + if (itemSelected) { + submit({ selected }); + setItemSelected(false); + } + })} > - {CommonUtils.getLang( - popupType === 'hw_lite' ? 'Buttons.select' : 'Buttons.load' - )} + {CommonUtils.getLang(isHwLite ? 'Buttons.select' : 'Buttons.load')}