pdf open test

This commit is contained in:
dongyoungKo
2025-06-24 17:56:53 +09:00
parent 23f687606b
commit 19ba64462f

View File

@@ -157,10 +157,10 @@ export default function MainView({ className, initService }) {
deviceId, deviceId,
} = useSelector((state) => state.common.appStatus); } = useSelector((state) => state.common.appStatus);
const skipEndOfServicePopup = useSelector( const skipEndOfServicePopup = useSelector(
(state) => state.localSettings.skipEndOfServicePopup, (state) => state.localSettings.skipEndOfServicePopup
); );
const isInternetConnected = useSelector( const isInternetConnected = useSelector(
(state) => state.common.appStatus.isInternetConnected, (state) => state.common.appStatus.isInternetConnected
); );
const deviceCountryCode = httpHeader?.["X-Device-Country"] || ""; const deviceCountryCode = httpHeader?.["X-Device-Country"] || "";
@@ -316,8 +316,8 @@ export default function MainView({ className, initService }) {
mandatoryIncludeYn: "Y", mandatoryIncludeYn: "Y",
termsList: ["MST00401", "MST00402"], termsList: ["MST00401", "MST00402"],
}, },
reload, reload
), )
); );
} }
}, [dispatch, activePopup]); }, [dispatch, activePopup]);
@@ -369,12 +369,15 @@ export default function MainView({ className, initService }) {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
cursorVisible: ev.visibility || ev.detail.visibility, cursorVisible: ev.visibility || ev.detail.visibility,
}), })
); );
}, },
[dispatch], [dispatch]
); );
const openPdfPopup = (pdfUrl) => {
window.open(pdfUrl, "_blank", "width=800,height=600");
};
useEffect(() => { useEffect(() => {
document.addEventListener("cursorStateChange", cursorStateChange, false); document.addEventListener("cursorStateChange", cursorStateChange, false);
if (platform.platformName !== "webos") { if (platform.platformName !== "webos") {
@@ -384,7 +387,7 @@ export default function MainView({ className, initService }) {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
cursorVisible: window.cursorEvent && window.cursorEvent.visibility, cursorVisible: window.cursorEvent && window.cursorEvent.visibility,
}), })
); );
} }
return () => { return () => {
@@ -397,7 +400,7 @@ export default function MainView({ className, initService }) {
const popupTimerRef = useRef(null); // 타이머 ID를 저장할 상태 변수 const popupTimerRef = useRef(null); // 타이머 ID를 저장할 상태 변수
const { upComingAlertShow } = useSelector( const { upComingAlertShow } = useSelector(
(state) => state.myPage.upComingData, (state) => state.myPage.upComingData
); );
useEffect(() => { useEffect(() => {
@@ -430,7 +433,7 @@ export default function MainView({ className, initService }) {
patnrId: patnrId.toString(), patnrId: patnrId.toString(),
showId, showId,
showNm, showNm,
}), })
); );
} }
}, [activePopup, alertItems, popupVisible]); }, [activePopup, alertItems, popupVisible]);
@@ -472,7 +475,7 @@ export default function MainView({ className, initService }) {
upComingAlertShow.alertShows?.length > 0 upComingAlertShow.alertShows?.length > 0
) { ) {
const alertList = upComingAlertShow.alertShows.filter((show) => const alertList = upComingAlertShow.alertShows.filter((show) =>
isSameDateTime(show.strtDt), isSameDateTime(show.strtDt)
); );
if (alertList.length > 0) { if (alertList.length > 0) {
@@ -525,7 +528,7 @@ export default function MainView({ className, initService }) {
patnrId: patnrId.toString(), patnrId: patnrId.toString(),
showId, showId,
showNm, showNm,
}), })
); );
dispatch(resetPanels()); dispatch(resetPanels());
@@ -533,7 +536,7 @@ export default function MainView({ className, initService }) {
pushPanel({ pushPanel({
name: panel_names.FEATURED_BRANDS_PANEL, name: panel_names.FEATURED_BRANDS_PANEL,
panelInfo: { from: "upcoming", patnrId: patnrId.toString() }, panelInfo: { from: "upcoming", patnrId: patnrId.toString() },
}), })
); );
dispatch(setHidePopup()); dispatch(setHidePopup());
setIntervalActive((prev) => !prev); setIntervalActive((prev) => !prev);
@@ -582,7 +585,7 @@ export default function MainView({ className, initService }) {
patnrId: patnrId.toString(), patnrId: patnrId.toString(),
showId, showId,
showNm, showNm,
}), })
); );
setIntervalActive((prev) => !prev); setIntervalActive((prev) => !prev);
@@ -650,7 +653,7 @@ export default function MainView({ className, initService }) {
"handleErrorPopupClose 호출됨! activePopup:", "handleErrorPopupClose 호출됨! activePopup:",
activePopup, activePopup,
"popupData:", "popupData:",
popupData, popupData
); );
if (popupData?.shouldPopPanel) { if (popupData?.shouldPopPanel) {
dispatch(popPanel()); dispatch(popPanel());
@@ -690,7 +693,7 @@ export default function MainView({ className, initService }) {
loadingComplete && ( loadingComplete && (
<div <div
className={classNames( className={classNames(
css.container, css.container
// showLoadingPanel.type === "launching" ? css.transparent : null // showLoadingPanel.type === "launching" ? css.transparent : null
)} )}
> >
@@ -743,7 +746,7 @@ export default function MainView({ className, initService }) {
popupData.errorCode, popupData.errorCode,
popupData.errorMsg, popupData.errorMsg,
popupData.retDetailCode, popupData.retDetailCode,
popupData.returnBindStrings, popupData.returnBindStrings
)} )}
</p>{" "} </p>{" "}
<TButton className={css.popupBtn} onClick={handleErrorPopupClose}> <TButton className={css.popupBtn} onClick={handleErrorPopupClose}>
@@ -829,6 +832,24 @@ export default function MainView({ className, initService }) {
onClick={handleAgree} onClick={handleAgree}
/> />
)} */} )} */}
<button
style={{
position: "fixed",
left: "0",
bottom: "0",
color: "#fff",
fontSize: "13px",
opacity: ".5",
zIndex: "999",
}}
onClick={() =>
openPdfPopup(
"https://www.lg.com/de/lgecs.downloadFile.ldwf?DOC_ID=20240131210092&ORIGINAL_NAME_b1_a1=F4WR703YB.pdf&FILE_NAME=F4WR703YB[20240131210092].pdf&TC=DwnCmd&GSRI_DOC=GSRI&SPEC_DOWNLOAD=N"
)
}
>
button
</button>
</div> </div>
); );
} }