deeplink 호출시 홈패널 debug 표기

This commit is contained in:
opacity@t-win.kr
2025-08-27 14:33:53 +09:00
parent 33ec7d2a84
commit 1338f336d8

View File

@@ -673,9 +673,9 @@ export default function MainView({ className, initService }) {
}, [dispatch, popupData, activePopup, topPanel?.name]);
// 딥링크 확인 테스트
const contentTarget = useSelector(
(state) => state.common.deepLinkInfo.contentTarget
);
const deepLinkInfo = useSelector((state) => state.common.deepLinkInfo);
const secondLayerInfo = useSelector((state) => state.common.secondLayerInfo);
const appStatus = useSelector((state) => state.common.appStatus);
return (
<div
className={classNames(css.mainViewWrap, className)}
@@ -835,15 +835,209 @@ export default function MainView({ className, initService }) {
left: "0",
bottom: "0",
color: "#fff",
fontSize: "13px",
opacity: ".5",
fontSize: "11px",
opacity: ".9",
zIndex: "999",
backgroundColor: "black",
padding: "10px",
backgroundColor: "rgba(0,0,0,0.9)",
padding: "15px",
maxWidth: "600px",
borderRadius: "5px",
fontFamily: "monospace",
maxHeight: "400px",
overflowY: "auto",
}}
>
deepLinkInfo
<p>{contentTarget}</p>
<div
style={{ fontWeight: "bold", marginBottom: "10px", color: "#00ff00" }}
>
🔗 Deep Link Debug Info
</div>
{/* Deep Link Info */}
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ marginBottom: "5px" }}>
<span style={{ color: "#ffff00" }}>isDeepLink:</span>{" "}
<span
style={{ color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666" }}
>
{deepLinkInfo.isDeepLink ? "true" : "false"}
</span>
</div>
<div>
<span style={{ color: "#ffff00" }}>contentTarget:</span>{" "}
<span style={{ color: "#ffffff", wordBreak: "break-all" }}>
{deepLinkInfo.contentTarget || "(empty)"}
</span>
</div>
</div>
{/* Launch Params Check */}
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
📱 Launch Params:
</div>
<div style={{ fontSize: "10px", color: "#cccccc" }}>
{(() => {
try {
const getLaunchParams = () => {
if (
typeof window === "object" &&
window.PalmSystem &&
window.PalmSystem.launchParams
) {
try {
let params = JSON.parse(window.PalmSystem.launchParams);
if (params["x-webos-app-container-launch"] === true) {
params = params.details;
}
return params;
} catch (e) {
return { error: "Parse failed: " + e.message };
}
} else {
return { debug: "Not on webOS or no launchParams" };
}
};
const params = getLaunchParams();
return JSON.stringify(params, null, 2);
} catch (e) {
return "Error: " + e.message;
}
})()}
</div>
</div>
{/* App Status */}
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
📊 App Status:
</div>
<div style={{ fontSize: "10px" }}>
<div>
<span style={{ color: "#ffff00" }}>webOSVersion:</span>{" "}
{appStatus.webOSVersion || "unknown"}
</div>
<div>
<span style={{ color: "#ffff00" }}>deviceId:</span>{" "}
{appStatus.deviceId || "unknown"}
</div>
<div>
<span style={{ color: "#ffff00" }}>serverHOST:</span>{" "}
{appStatus.serverHOST || "unknown"}
</div>
</div>
</div>
{/* Panel Stack */}
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
📚 Panel Stack ({panels.length}):
</div>
<div style={{ fontSize: "10px" }}>
{panels.map((panel, index) => (
<div
key={index}
style={{
color: index === panels.length - 1 ? "#00ff00" : "#cccccc",
}}
>
{index}: {panel.name}{" "}
{index === panels.length - 1 ? "(current)" : ""}
</div>
))}
</div>
</div>
{/* Second Layer Info */}
{secondLayerInfo && Object.keys(secondLayerInfo).length > 0 && (
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
🔗 Second Layer Info:
</div>
<div style={{ fontSize: "10px", color: "#cccccc" }}>
{JSON.stringify(secondLayerInfo, null, 2)}
</div>
</div>
)}
{/* Parsed Deep Link */}
{deepLinkInfo.contentTarget && (
<div style={{ marginTop: "10px" }}>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
🔍 Parsed Deep Link:
</div>
<div style={{ marginLeft: "10px", fontSize: "10px" }}>
{(() => {
const tokens = deepLinkInfo.contentTarget.split("_");
if (tokens[0] === "V2" || tokens[0] === "V3") {
return (
<>
<div>
<span style={{ color: "#ffff00" }}>Version:</span>{" "}
{tokens[0]}
</div>
<div>
<span style={{ color: "#ffff00" }}>Link Code:</span>{" "}
{tokens[1]}
</div>
<div>
<span style={{ color: "#ffff00" }}>Link Name:</span>{" "}
{tokens[2]}
</div>
<div>
<span style={{ color: "#ffff00" }}>Type:</span>{" "}
{tokens[3]}
</div>
{tokens.length > 4 && (
<div>
<span style={{ color: "#ffff00" }}>
Extra Params:
</span>{" "}
{tokens.slice(4).join("_")}
</div>
)}
</>
);
}
return (
<div style={{ color: "#ff6666" }}>
Raw format (not V2/V3)
</div>
);
})()}
</div>
</div>
)}
</div>
</div>
);