Revert "deeplink 디버그 재수정"

This reverts commit 44d3c05678.
This commit is contained in:
opacity@t-win.kr
2025-08-28 15:29:50 +09:00
parent a62c892ab8
commit 14d2bff882
7 changed files with 85 additions and 257 deletions

View File

@@ -71,6 +71,8 @@ import { sendLogTotalRecommend } from "../actions/logActions";
// } from "../utils/focus-monitor"; // } from "../utils/focus-monitor";
// import { PanelHoc } from "../components/TPanel/TPanel"; // import { PanelHoc } from "../components/TPanel/TPanel";
let foreGroundChangeTimer = null; let foreGroundChangeTimer = null;
// 기존 콘솔 메서드를 백업 // 기존 콘솔 메서드를 백업
@@ -147,15 +149,15 @@ function AppBase(props) {
(state) => state.common.appStatus.cursorVisible (state) => state.common.appStatus.cursorVisible
); );
const introTermsAgree = useSelector((state) => state.common.introTermsAgree); const introTermsAgree = useSelector((state) => state.common.introTermsAgree);
const deviceRegistered = useSelector( const deviceRegistered = useSelector((state) => state.common.deviceRegistered);
(state) => state.common.deviceRegistered
);
// const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree); // const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree);
const termsLoading = useSelector((state) => state.common.termsLoading); const termsLoading = useSelector((state) => state.common.termsLoading);
// termsFlag 전체 상태 확인 // termsFlag 전체 상태 확인
// const termsFlag = useSelector((state) => state.common.termsFlag); // const termsFlag = useSelector((state) => state.common.termsFlag);
const termsData = useSelector((state) => state.home.termsData); const termsData = useSelector((state) => state.home.termsData);
useEffect(() => { useEffect(() => {
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
if (termsData && termsData.data && termsData.data.terms) { if (termsData && termsData.data && termsData.data.terms) {
@@ -171,8 +173,7 @@ function AppBase(props) {
// const macAddress = useSelector((state) => state.common.macAddress); // const macAddress = useSelector((state) => state.common.macAddress);
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
const deviceCountryCode = const deviceCountryCode = httpHeader && httpHeader["X-Device-Country"] || "";
(httpHeader && httpHeader["X-Device-Country"]) || "";
useEffect(() => { useEffect(() => {
if (!cursorVisible && !Spotlight.getCurrent()) { if (!cursorVisible && !Spotlight.getCurrent()) {
@@ -220,7 +221,9 @@ function AppBase(props) {
// called by [receive httpHeader, launch, relaunch] // called by [receive httpHeader, launch, relaunch]
const initService = useCallback( const initService = useCallback(
(haveyInit = true) => { (haveyInit = true) => {
// console.log( // console.log(
// "<<<<<<<<<<<<< appinfo >>>>>>>>>>>>{heavyInit, appinfo} ", // "<<<<<<<<<<<<< appinfo >>>>>>>>>>>>{heavyInit, appinfo} ",
// haveyInit, // haveyInit,
@@ -237,22 +240,19 @@ function AppBase(props) {
if (haveyInit) { if (haveyInit) {
dispatch(changeAppStatus({ connectionFailed: false })); dispatch(changeAppStatus({ connectionFailed: false }));
if (typeof window === "object" && window.PalmSystem) { if (typeof window === "object" && window.PalmSystem) {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible: cursorVisible: window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility,
window.PalmSystem && })
window.PalmSystem.cursor && );
window.PalmSystem.cursor.visibility,
})
);
} }
dispatch(getHomeMenu()); dispatch(getHomeMenu());
dispatch(getMyRecommandedKeyword()); dispatch(getMyRecommandedKeyword());
dispatch(getMyUpcomingAlertShow()); dispatch(getMyUpcomingAlertShow());
} }
const launchParams = getLaunchParams(dispatch); const launchParams = getLaunchParams();
console.log( console.log(
"initService...{haveyInit, launchParams}", "initService...{haveyInit, launchParams}",
@@ -311,15 +311,11 @@ function AppBase(props) {
// set foreground flag using delay time. // set foreground flag using delay time.
clearTimeout(foreGroundChangeTimer); clearTimeout(foreGroundChangeTimer);
foreGroundChangeTimer = setTimeout(() => { foreGroundChangeTimer = setTimeout(() => {
console.log( console.log(
"visibility changed !!! ==> set to foreground cursorVisible", "visibility changed !!! ==> set to foreground cursorVisible",
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
JSON.stringify( JSON.stringify(window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility)
window.PalmSystem && ); // eslint-disable-line no-console
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility
)
); // eslint-disable-line no-console
if (platform.platformName !== "webos") { if (platform.platformName !== "webos") {
//for debug //for debug
dispatch( dispatch(
@@ -333,10 +329,7 @@ function AppBase(props) {
changeAppStatus({ changeAppStatus({
isAppForeground: true, isAppForeground: true,
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible: cursorVisible: window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility,
window.PalmSystem &&
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility,
}) })
); );
} }
@@ -457,7 +450,7 @@ function AppBase(props) {
}, [introTermsAgree, deviceRegistered, dispatch, initService, termsLoading]); }, [introTermsAgree, deviceRegistered, dispatch, initService, termsLoading]);
useEffect(() => { useEffect(() => {
const launchParmas = getLaunchParams(dispatch); const launchParmas = getLaunchParams();
const linkTpNm = launchParmas.contentTarget const linkTpNm = launchParmas.contentTarget
? launchParmas.contentTarget.split("_")[2] || "" ? launchParmas.contentTarget.split("_")[2] || ""
: Config.LOG_MENU.APP; : Config.LOG_MENU.APP;

View File

@@ -68,7 +68,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
expsOrd = tokens[6]; // 노출순번 expsOrd = tokens[6]; // 노출순번
curationId = tokens[7]; // 큐레이션아이디 curationId = tokens[7]; // 큐레이션아이디
panelName = panel_names.DETAIL_PANEL; panelName = panel_names.DETAIL_PANEL;
deeplinkPanel = "Product Detail"; deeplinkPanel = "Product Detaoil";
panelInfo = { panelInfo = {
patnrId: patnrId, patnrId: patnrId,
prdtId: prdtId, prdtId: prdtId,

View File

@@ -20,8 +20,7 @@ export const types = {
CHANGE_APP_STATUS: "CHANGE_APP_STATUS", CHANGE_APP_STATUS: "CHANGE_APP_STATUS",
SEND_BROADCAST: "SEND_BROADCAST", SEND_BROADCAST: "SEND_BROADCAST",
CHANGE_LOCAL_SETTINGS: "CHANGE_LOCAL_SETTINGS", CHANGE_LOCAL_SETTINGS: "CHANGE_LOCAL_SETTINGS",
GNB_OPENED: "GNB_OPENED", GNB_OPENED: "GNB_OPENED", SET_SHOW_POPUP: "SET_SHOW_POPUP",
SET_SHOW_POPUP: "SET_SHOW_POPUP",
SET_SHOW_SECONDARY_POPUP: "SET_SHOW_SECONDARY_POPUP", SET_SHOW_SECONDARY_POPUP: "SET_SHOW_SECONDARY_POPUP",
SET_HIDE_POPUP: "SET_HIDE_POPUP", SET_HIDE_POPUP: "SET_HIDE_POPUP",
SET_HIDE_SECONDARY_POPUP: "SET_HIDE_SECONDARY_POPUP", SET_HIDE_SECONDARY_POPUP: "SET_HIDE_SECONDARY_POPUP",
@@ -44,7 +43,6 @@ export const types = {
SET_SYSTEM_NOTICE: "SET_SYSTEM_NOTICE", SET_SYSTEM_NOTICE: "SET_SYSTEM_NOTICE",
SET_SYSTEM_TERMINATION: "SET_SYSTEM_TERMINATION", SET_SYSTEM_TERMINATION: "SET_SYSTEM_TERMINATION",
SET_DEEP_LINK: "SET_DEEP_LINK", SET_DEEP_LINK: "SET_DEEP_LINK",
SET_DEEP_LINK_DEBUG: "SET_DEEP_LINK_DEBUG",
SET_SECOND_LAYER_INFO: "SET_SECOND_LAYER_INFO", SET_SECOND_LAYER_INFO: "SET_SECOND_LAYER_INFO",
SET_ERROR_MESSAGE: "SET_ERROR_MESSAGE", SET_ERROR_MESSAGE: "SET_ERROR_MESSAGE",
CLEAR_ERROR_MESSAGE: "CLEAR_ERROR_MESSAGE", CLEAR_ERROR_MESSAGE: "CLEAR_ERROR_MESSAGE",
@@ -67,7 +65,7 @@ export const types = {
// home actions // home actions
GET_HOME_TERMS: "GET_HOME_TERMS", GET_HOME_TERMS: "GET_HOME_TERMS",
SET_TERMS_ID_MAP: "SET_TERMS_ID_MAP", SET_TERMS_ID_MAP: "SET_TERMS_ID_MAP",
SET_OPTIONAL_TERMS_AVAILABILITY: "SET_OPTIONAL_TERMS_AVAILABILITY", SET_OPTIONAL_TERMS_AVAILABILITY: "SET_OPTIONAL_TERMS_AVAILABILITY",
GET_HOME_MENU: "GET_HOME_MENU", GET_HOME_MENU: "GET_HOME_MENU",
GET_HOME_LAYOUT: "GET_HOME_LAYOUT", GET_HOME_LAYOUT: "GET_HOME_LAYOUT",
@@ -237,9 +235,9 @@ export const types = {
// new actions // new actions
CANCEL_FOCUS_ELEMENT: "CANCEL_FOCUS_ELEMENT", CANCEL_FOCUS_ELEMENT: "CANCEL_FOCUS_ELEMENT",
// 약관동의 여부 확인 상태 // 약관동의 여부 확인 상태
GET_TERMS_AGREE_YN_START: "GET_TERMS_AGREE_YN_START", GET_TERMS_AGREE_YN_START: "GET_TERMS_AGREE_YN_START",
GET_TERMS_AGREE_YN_SUCCESS: "GET_TERMS_AGREE_YN_SUCCESS", GET_TERMS_AGREE_YN_SUCCESS: "GET_TERMS_AGREE_YN_SUCCESS",
GET_TERMS_AGREE_YN_FAILURE: "GET_TERMS_AGREE_YN_FAILURE", GET_TERMS_AGREE_YN_FAILURE: "GET_TERMS_AGREE_YN_FAILURE",
// device // device

View File

@@ -32,7 +32,7 @@ export const gnbOpened = (status) => ({
}); });
export const setShowPopup = (config) => { export const setShowPopup = (config) => {
const payload = typeof config === "string" ? { activePopup: config } : config; const payload = typeof config === 'string' ? { activePopup: config } : config;
return { return {
type: types.SET_SHOW_POPUP, type: types.SET_SHOW_POPUP,
payload, payload,
@@ -289,28 +289,25 @@ export const getDeviceId = (onComplete) => (dispatch, getState) => {
export const getTermsAgreeYn = () => (dispatch, getState) => { export const getTermsAgreeYn = () => (dispatch, getState) => {
dispatch({ type: types.GET_TERMS_AGREE_YN_START }); dispatch({ type: types.GET_TERMS_AGREE_YN_START });
try { try {
const { terms } = getState().home.termsData.data; const { terms } = getState().home.termsData.data;
console.log( console.log("getTermsAgreeYn", terms.map(term => ({
"getTermsAgreeYn", trmsId: term.trmsId,
terms.map((term) => ({ trmsTpCd: term.trmsTpCd,
trmsId: term.trmsId, trmsAgrFlag: term.trmsAgrFlag,
trmsTpCd: term.trmsTpCd, trmsPopFlag: term.trmsPopFlag,
trmsAgrFlag: term.trmsAgrFlag, })));
trmsPopFlag: term.trmsPopFlag,
}))
);
// MST00405 선택약관 정보만 따로 출력 // MST00405 선택약관 정보만 따로 출력
const optionalTerm = terms.find((term) => term.trmsTpCd === "MST00405"); const optionalTerm = terms.find(term => term.trmsTpCd === 'MST00405');
if (optionalTerm) { if (optionalTerm) {
console.log("getTermsAgreeYn MST00405 선택약관:", { console.log("getTermsAgreeYn MST00405 선택약관:", {
trmsId: optionalTerm.trmsId, trmsId: optionalTerm.trmsId,
trmsTpCd: optionalTerm.trmsTpCd, trmsTpCd: optionalTerm.trmsTpCd,
trmsAgrFlag: optionalTerm.trmsAgrFlag, trmsAgrFlag: optionalTerm.trmsAgrFlag,
trmsPopFlag: optionalTerm.trmsPopFlag, trmsPopFlag: optionalTerm.trmsPopFlag
}); });
} else { } else {
console.log("getTermsAgreeYn MST00405 선택약관을 찾을 수 없습니다."); console.log("getTermsAgreeYn MST00405 선택약관을 찾을 수 없습니다.");
@@ -337,7 +334,7 @@ export const getTermsAgreeYn = () => (dispatch, getState) => {
break; break;
} }
return acc; return acc;
}, {}); }, {});
dispatch({ dispatch({
type: types.GET_TERMS_AGREE_YN_SUCCESS, type: types.GET_TERMS_AGREE_YN_SUCCESS,
@@ -564,11 +561,6 @@ export const setDeepLink = (deepLinkInfo) => ({
payload: deepLinkInfo, payload: deepLinkInfo,
}); });
export const setDeepLinkDebug = (debugInfo) => ({
type: types.SET_DEEP_LINK_DEBUG,
payload: debugInfo,
});
export const setSecondLayerInfo = (secondLayerInfo) => ({ export const setSecondLayerInfo = (secondLayerInfo) => ({
type: types.SET_SECOND_LAYER_INFO, type: types.SET_SECOND_LAYER_INFO,
payload: secondLayerInfo, payload: secondLayerInfo,
@@ -766,37 +758,35 @@ export const resetOptionalTermsSession = () => ({
// 선택약관 동의 처리를 위한 헬퍼 함수 // 선택약관 동의 처리를 위한 헬퍼 함수
export const handleOptionalTermsAgree = () => (dispatch) => { export const handleOptionalTermsAgree = () => (dispatch) => {
console.log("[CommonActions] 선택약관 동의 처리"); console.log('[CommonActions] 선택약관 동의 처리');
dispatch(setOptionalTermsUserDecision("agreed")); dispatch(setOptionalTermsUserDecision('agreed'));
dispatch(setOptionalTermsPopupShown(true)); dispatch(setOptionalTermsPopupShown(true));
}; };
// 선택약관 거절 처리를 위한 헬퍼 함수 // 선택약관 거절 처리를 위한 헬퍼 함수
export const handleOptionalTermsDecline = () => (dispatch) => { export const handleOptionalTermsDecline = () => (dispatch) => {
console.log("[CommonActions] 선택약관 거절 처리"); console.log('[CommonActions] 선택약관 거절 처리');
dispatch(setOptionalTermsUserDecision("declined")); dispatch(setOptionalTermsUserDecision('declined'));
dispatch(setOptionalTermsPopupShown(true)); dispatch(setOptionalTermsPopupShown(true));
}; };
// 선택약관 상태 통합 업데이트 (TV 환경 최적화 - API 호출 없이 즉시 반영) // 선택약관 상태 통합 업데이트 (TV 환경 최적화 - API 호출 없이 즉시 반영)
export const updateOptionalTermsAgreement = export const updateOptionalTermsAgreement = (agreed = true) => (dispatch) => {
(agreed = true) => console.log(`[CommonActions] 선택약관 통합 상태 업데이트: ${agreed}`);
(dispatch) => {
console.log(`[CommonActions] 선택약관 통합 상태 업데이트: ${agreed}`); // 1. optionalTermsPopupFlow 업데이트 (TV 환경용)
dispatch(setOptionalTermsUserDecision(agreed ? 'agreed' : 'declined'));
// 1. optionalTermsPopupFlow 업데이트 (TV 환경용) dispatch(setOptionalTermsPopupShown(true));
dispatch(setOptionalTermsUserDecision(agreed ? "agreed" : "declined"));
dispatch(setOptionalTermsPopupShown(true)); // 2. 기본 optionalTermsAgree 상태 직접 업데이트 (API 호출 없이)
dispatch({
// 2. 기본 optionalTermsAgree 상태 직접 업데이트 (API 호출 없이) type: types.UPDATE_OPTIONAL_TERMS_AGREE_DIRECT,
dispatch({ payload: agreed
type: types.UPDATE_OPTIONAL_TERMS_AGREE_DIRECT, });
payload: agreed,
}); // 3. termsAgreementStatus도 동기화
dispatch({
// 3. termsAgreementStatus도 동기화 type: types.UPDATE_TERMS_AGREEMENT_STATUS_DIRECT,
dispatch({ payload: { MST00405: agreed }
type: types.UPDATE_TERMS_AGREEMENT_STATUS_DIRECT, });
payload: { MST00405: agreed }, };
});
};

View File

@@ -11,7 +11,7 @@ const initialState = {
serverHOST: "", //"US.nextlgsdp.com", serverHOST: "", //"US.nextlgsdp.com",
mbr_no: "", //X-User-Number : "US2401051532595" mbr_no: "", //X-User-Number : "US2401051532595"
deviceId: "", //d87cedca-84e7-c05e-613d-39739bb7941f deviceId: "", //d87cedca-84e7-c05e-613d-39739bb7941f
cursorVisible: false, cursorVisible: false,
loginUserData: {}, loginUserData: {},
toast: false, toast: false,
toastText: null, toastText: null,
@@ -20,8 +20,7 @@ const initialState = {
}, },
broadcast: {}, broadcast: {},
httpHeader: null, httpHeader: null,
isGnbOpened: false, isGnbOpened: false, popup: {
popup: {
popupVisible: false, popupVisible: false,
activePopup: null, activePopup: null,
secondaryPopup: null, secondaryPopup: null,
@@ -33,7 +32,7 @@ const initialState = {
optionalTermsConfirmSelected: false, optionalTermsConfirmSelected: false,
}, },
termsFlag: null, termsFlag: null,
termsLoading: false, // 25.06.16 추가 termsLoading: false, // 25.06.16 추가
introTermsAgree: undefined, // Y, N introTermsAgree: undefined, // Y, N
checkoutTermsAgree: undefined, checkoutTermsAgree: undefined,
useLog: true, useLog: true,
@@ -72,15 +71,6 @@ const initialState = {
isDeepLink: false, isDeepLink: false,
}, },
deepLinkDebug: {
rawLaunchParams: "",
parsedParams: null,
finalParams: null,
containerLaunch: false,
parseError: null,
timestamp: null,
},
secondLayerInfo: {}, secondLayerInfo: {},
macAddress: { wifi: "", wired: "", p2p: "" }, macAddress: { wifi: "", wired: "", p2p: "" },
connectionFailed: false, connectionFailed: false,
@@ -95,9 +85,9 @@ const initialState = {
// 선택약관 팝업 상태 관리 (TV 환경 최적화) // 선택약관 팝업 상태 관리 (TV 환경 최적화)
optionalTermsPopupFlow: { optionalTermsPopupFlow: {
popupShown: false, // 팝업 표시 여부 popupShown: false, // 팝업 표시 여부
userDecision: null, // 'agreed' | 'declined' | null userDecision: null, // 'agreed' | 'declined' | null
agreedInSession: false, // 세션 내 동의 여부 (로컬 상태 기반) agreedInSession: false, // 세션 내 동의 여부 (로컬 상태 기반)
}, },
}; };
@@ -194,8 +184,7 @@ export const commonReducer = (state = initialState, action) => {
secondaryPopupVisible: false, secondaryPopupVisible: false,
secondaryPopup: null, secondaryPopup: null,
}, },
}; }; case types.SET_HIDE_SECONDARY_POPUP:
case types.SET_HIDE_SECONDARY_POPUP:
return { return {
...state, ...state,
popup: { popup: {
@@ -244,13 +233,8 @@ export const commonReducer = (state = initialState, action) => {
} }
case types.GET_TERMS_AGREE_YN_SUCCESS: { case types.GET_TERMS_AGREE_YN_SUCCESS: {
const { const { privacyTerms, serviceTerms, purchaseTerms, paymentTerms, optionalTerms } =
privacyTerms, action.payload;
serviceTerms,
purchaseTerms,
paymentTerms,
optionalTerms,
} = action.payload;
const introTermsAgree = privacyTerms === "Y" && serviceTerms === "Y"; const introTermsAgree = privacyTerms === "Y" && serviceTerms === "Y";
const checkoutTermsAgree = purchaseTerms === "Y" && paymentTerms === "Y"; const checkoutTermsAgree = purchaseTerms === "Y" && paymentTerms === "Y";
@@ -278,11 +262,9 @@ export const commonReducer = (state = initialState, action) => {
case types.GET_HOME_TERMS: { case types.GET_HOME_TERMS: {
const newTermsStatus = { ...state.termsAgreementStatus }; const newTermsStatus = { ...state.termsAgreementStatus };
if (action.payload?.data?.terms) { if (action.payload?.data?.terms) {
action.payload.data.terms.forEach((term) => { action.payload.data.terms.forEach(term => {
if ( if (Object.prototype.hasOwnProperty.call(newTermsStatus, term.trmsTpCd)) {
Object.prototype.hasOwnProperty.call(newTermsStatus, term.trmsTpCd) newTermsStatus[term.trmsTpCd] = term.trmsAgrFlag === 'Y';
) {
newTermsStatus[term.trmsTpCd] = term.trmsAgrFlag === "Y";
} }
}); });
} }
@@ -297,7 +279,7 @@ export const commonReducer = (state = initialState, action) => {
const newTermsStatus = { ...state.termsAgreementStatus }; const newTermsStatus = { ...state.termsAgreementStatus };
// action payload에 담겨온 동의한 약관 코드 리스트를 기반으로 상태 업데이트 // action payload에 담겨온 동의한 약관 코드 리스트를 기반으로 상태 업데이트
if (action.payload?.agreedTermCodes) { if (action.payload?.agreedTermCodes) {
action.payload.agreedTermCodes.forEach((termCode) => { action.payload.agreedTermCodes.forEach(termCode => {
if (Object.prototype.hasOwnProperty.call(newTermsStatus, termCode)) { if (Object.prototype.hasOwnProperty.call(newTermsStatus, termCode)) {
newTermsStatus[termCode] = true; newTermsStatus[termCode] = true;
} }
@@ -306,7 +288,7 @@ export const commonReducer = (state = initialState, action) => {
return { return {
...state, ...state,
termsLoading: false, termsLoading: false,
termsAgreementStatus: newTermsStatus, termsAgreementStatus: newTermsStatus
}; };
} }
case types.SET_MYPAGE_TERMS_AGREE_FAIL: case types.SET_MYPAGE_TERMS_AGREE_FAIL:
@@ -328,7 +310,7 @@ export const commonReducer = (state = initialState, action) => {
...state.termsAgreementStatus, ...state.termsAgreementStatus,
MST00401: true, MST00401: true,
MST00402: true, MST00402: true,
}, }
}; };
} else { } else {
return state; return state;
@@ -382,17 +364,6 @@ export const commonReducer = (state = initialState, action) => {
}; };
} }
case types.SET_DEEP_LINK_DEBUG: {
return {
...state,
deepLinkDebug: {
...state.deepLinkDebug,
...action.payload,
timestamp: new Date().toISOString(),
},
};
}
case types.SET_SECOND_LAYER_INFO: { case types.SET_SECOND_LAYER_INFO: {
return { return {
...state, ...state,
@@ -427,7 +398,7 @@ export const commonReducer = (state = initialState, action) => {
optionalTermsPopupFlow: { optionalTermsPopupFlow: {
...state.optionalTermsPopupFlow, ...state.optionalTermsPopupFlow,
userDecision: action.payload, userDecision: action.payload,
agreedInSession: action.payload === "agreed", agreedInSession: action.payload === 'agreed',
}, },
}; };
} }

View File

@@ -147,15 +147,8 @@ let localLaunchParams = {
// contentTarget: "V3_2001_HOMEBANNER:1240712_TM_10", // contentTarget: "V3_2001_HOMEBANNER:1240712_TM_10",
}; };
export const getLaunchParams = (dispatch = null) => { export const getLaunchParams = () => {
let params = {}; let params = {};
let debugInfo = {
rawLaunchParams: "",
parsedParams: null,
finalParams: null,
containerLaunch: false,
parseError: null,
};
if ( if (
typeof window === "object" && typeof window === "object" &&
@@ -163,58 +156,15 @@ export const getLaunchParams = (dispatch = null) => {
window.PalmSystem.launchParams window.PalmSystem.launchParams
) { ) {
try { try {
debugInfo.rawLaunchParams = window.PalmSystem.launchParams;
console.log("[DEBUG] Raw launchParams:", window.PalmSystem.launchParams);
params = JSON.parse(window.PalmSystem.launchParams); params = JSON.parse(window.PalmSystem.launchParams);
debugInfo.parsedParams = JSON.parse(JSON.stringify(params));
console.log("[DEBUG] Parsed params:", JSON.stringify(params, null, 2));
if (params["x-webos-app-container-launch"] === true) { if (params["x-webos-app-container-launch"] === true) {
debugInfo.containerLaunch = true; params = params.details;
console.log(
"[DEBUG] Container launch detected, extracting details:",
params.details
);
params = params.details || {};
} }
debugInfo.finalParams = JSON.parse(JSON.stringify(params));
console.log("[DEBUG] Final params:", JSON.stringify(params, null, 2));
} catch (e) { } catch (e) {
console.log("[DEBUG] LaunchParams parsing error:", e);
debugInfo.parseError = e.message;
params = {}; params = {};
} }
// Redux dispatch가 전달된 경우 디버그 정보 저장
if (dispatch && typeof dispatch === "function") {
try {
const { setDeepLinkDebug } = require("../actions/commonActions");
dispatch(setDeepLinkDebug(debugInfo));
} catch (importError) {
console.log("[DEBUG] Failed to dispatch debug info:", importError);
}
}
return params; return params;
} else { } else {
debugInfo.rawLaunchParams = "No PalmSystem or launchParams available";
debugInfo.finalParams = localLaunchParams;
console.log("[DEBUG] No PalmSystem or launchParams, using local params");
// Redux dispatch가 전달된 경우 디버그 정보 저장
if (dispatch && typeof dispatch === "function") {
try {
const { setDeepLinkDebug } = require("../actions/commonActions");
dispatch(setDeepLinkDebug(debugInfo));
} catch (importError) {
console.log("[DEBUG] Failed to dispatch debug info:", importError);
}
}
return localLaunchParams; return localLaunchParams;
} }
}; };

View File

@@ -676,7 +676,6 @@ export default function MainView({ className, initService }) {
const contentTarget = useSelector( const contentTarget = useSelector(
(state) => state.common.deepLinkInfo.contentTarget (state) => state.common.deepLinkInfo.contentTarget
); );
const deepLinkDebug = useSelector((state) => state.common.deepLinkDebug);
return ( return (
<div <div
className={classNames(css.mainViewWrap, className)} className={classNames(css.mainViewWrap, className)}
@@ -836,88 +835,15 @@ export default function MainView({ className, initService }) {
left: "0", left: "0",
bottom: "0", bottom: "0",
color: "#fff", color: "#fff",
fontSize: "11px", fontSize: "13px",
opacity: ".8", opacity: ".5",
zIndex: "999", zIndex: "999",
backgroundColor: "rgba(0,0,0,0.9)", backgroundColor: "black",
padding: "15px", padding: "10px",
maxWidth: "600px",
maxHeight: "600px",
overflow: "auto",
borderRadius: "8px",
fontFamily: "monospace",
}} }}
> >
<div deepLinkInfo
style={{ fontWeight: "bold", marginBottom: "10px", color: "#00ff00" }} <p>{contentTarget}</p>
>
🔍 DEEPLINK DEBUG INFO
</div>
<div style={{ marginBottom: "8px" }}>
<strong style={{ color: "#ffff00" }}>ContentTarget:</strong>
<div style={{ marginLeft: "10px", wordBreak: "break-all" }}>
{contentTarget || "없음"}
</div>
</div>
<div style={{ marginBottom: "8px" }}>
<strong style={{ color: "#ffff00" }}>Raw LaunchParams:</strong>
<div
style={{
marginLeft: "10px",
wordBreak: "break-all",
fontSize: "10px",
}}
>
{deepLinkDebug.rawLaunchParams || "없음"}
</div>
</div>
<div style={{ marginBottom: "8px" }}>
<strong style={{ color: "#ffff00" }}>Parsed Params:</strong>
<div style={{ marginLeft: "10px", fontSize: "10px" }}>
{deepLinkDebug.parsedParams
? JSON.stringify(deepLinkDebug.parsedParams, null, 1)
: "없음"}
</div>
</div>
<div style={{ marginBottom: "8px" }}>
<strong style={{ color: "#ffff00" }}>Final Params:</strong>
<div style={{ marginLeft: "10px", fontSize: "10px" }}>
{deepLinkDebug.finalParams
? JSON.stringify(deepLinkDebug.finalParams, null, 1)
: "없음"}
</div>
</div>
<div style={{ marginBottom: "8px" }}>
<strong style={{ color: "#ffff00" }}>Container Launch:</strong>
<span
style={{
marginLeft: "10px",
color: deepLinkDebug.containerLaunch ? "#00ff00" : "#ff0000",
}}
>
{deepLinkDebug.containerLaunch ? "YES" : "NO"}
</span>
</div>
{deepLinkDebug.parseError && (
<div style={{ marginBottom: "8px" }}>
<strong style={{ color: "#ff0000" }}>Parse Error:</strong>
<div
style={{ marginLeft: "10px", color: "#ff0000", fontSize: "10px" }}
>
{deepLinkDebug.parseError}
</div>
</div>
)}
<div style={{ fontSize: "9px", color: "#888", marginTop: "10px" }}>
Last Update: {deepLinkDebug.timestamp || "없음"}
</div>
</div> </div>
</div> </div>
); );