mainview 디버그 수정
This commit is contained in:
@@ -838,205 +838,217 @@ export default function MainView({ className, initService }) {
|
|||||||
fontSize: "11px",
|
fontSize: "11px",
|
||||||
opacity: ".9",
|
opacity: ".9",
|
||||||
zIndex: "999",
|
zIndex: "999",
|
||||||
backgroundColor: "rgba(0,0,0,0.9)",
|
backgroundColor: "rgba(0,0,0,0.7)",
|
||||||
padding: "15px",
|
padding: "8px",
|
||||||
maxWidth: "600px",
|
width: "700px",
|
||||||
|
height: "550px",
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
fontFamily: "monospace",
|
fontFamily: "monospace",
|
||||||
maxHeight: "400px",
|
overflow: "hidden",
|
||||||
overflowY: "auto",
|
boxSizing: "border-box",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{ fontWeight: "bold", marginBottom: "10px", color: "#00ff00" }}
|
style={{
|
||||||
|
fontWeight: "bold",
|
||||||
|
marginBottom: "5px",
|
||||||
|
color: "#00ff00",
|
||||||
|
fontSize: "10px",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
🔗 Deep Link Debug Info
|
🔗 Deep Link Debug Info
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Deep Link Info */}
|
<div style={{ display: "flex", gap: "5px", height: "100%" }}>
|
||||||
<div
|
{/* Left Column */}
|
||||||
|
<div style={{ flex: 1, fontSize: "11px" }}>
|
||||||
|
{/* Current State */}
|
||||||
|
<div style={{ marginBottom: "5px" }}>
|
||||||
|
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
|
||||||
|
📊 Current:
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
isDeepLink:{" "}
|
||||||
|
<span
|
||||||
style={{
|
style={{
|
||||||
marginBottom: "10px",
|
color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666",
|
||||||
borderBottom: "1px solid #333",
|
|
||||||
paddingBottom: "8px",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ marginBottom: "5px" }}>
|
{deepLinkInfo.isDeepLink ? "✓" : "✗"}
|
||||||
<span style={{ color: "#ffff00" }}>isDeepLink:</span>{" "}
|
|
||||||
<span
|
|
||||||
style={{ color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666" }}
|
|
||||||
>
|
|
||||||
{deepLinkInfo.isDeepLink ? "true" : "false"}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span style={{ color: "#ffff00" }}>contentTarget:</span>{" "}
|
contentTarget:{" "}
|
||||||
<span style={{ color: "#ffffff", wordBreak: "break-all" }}>
|
<span
|
||||||
{deepLinkInfo.contentTarget || "(empty)"}
|
style={{
|
||||||
|
color: deepLinkInfo.contentTarget ? "#00ff00" : "#ff6666",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{deepLinkInfo.contentTarget || "MISSING"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
panels: {panels.length}, top:{" "}
|
||||||
|
{panels.length > 0 ? panels[panels.length - 1].name : "none"}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Launch Params Check */}
|
{/* App Status */}
|
||||||
<div
|
<div style={{ marginBottom: "5px" }}>
|
||||||
style={{
|
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
|
||||||
marginBottom: "10px",
|
📱 System:
|
||||||
borderBottom: "1px solid #333",
|
</div>
|
||||||
paddingBottom: "8px",
|
<div>webOS: {appStatus.webOSVersion || "unknown"}</div>
|
||||||
}}
|
<div>
|
||||||
>
|
deviceId:{" "}
|
||||||
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
|
{appStatus.deviceId
|
||||||
|
? appStatus.deviceId.substring(0, 8) + "..."
|
||||||
|
: "unknown"}
|
||||||
|
</div>
|
||||||
|
<div>server: {appStatus.serverHOST || "unknown"}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Redux State */}
|
||||||
|
<div>
|
||||||
|
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
|
||||||
|
🏪 Redux:
|
||||||
|
</div>
|
||||||
|
<div>deepLink: {JSON.stringify(deepLinkInfo)}</div>
|
||||||
|
<div>secondLayer: {JSON.stringify(secondLayerInfo)}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Right Column */}
|
||||||
|
<div style={{ flex: 1, fontSize: "11px" }}>
|
||||||
|
{/* Launch Params */}
|
||||||
|
<div style={{ marginBottom: "5px" }}>
|
||||||
|
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
|
||||||
📱 Launch Params:
|
📱 Launch Params:
|
||||||
</div>
|
</div>
|
||||||
<div style={{ fontSize: "10px", color: "#cccccc" }}>
|
|
||||||
{(() => {
|
{(() => {
|
||||||
try {
|
try {
|
||||||
const getLaunchParams = () => {
|
if (
|
||||||
|
!(
|
||||||
|
typeof window === "object" &&
|
||||||
|
window.PalmSystem &&
|
||||||
|
window.PalmSystem.launchParams
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
<div style={{ color: "#ff6666" }}>
|
||||||
|
No webOS environment
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const raw = window.PalmSystem.launchParams;
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
const containerFlag = parsed["x-webos-app-container-launch"];
|
||||||
|
const finalParams =
|
||||||
|
containerFlag === true ? parsed.details : parsed;
|
||||||
|
const contentTarget = finalParams.contentTarget;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div>raw: {raw.substring(0, 50)}...</div>
|
||||||
|
<div>containerFlag: {String(containerFlag)}</div>
|
||||||
|
<div>
|
||||||
|
contentTarget:{" "}
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color: contentTarget ? "#00ff00" : "#ff6666",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{contentTarget || "MISSING"}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
return (
|
||||||
|
<div style={{ color: "#ff6666" }}>Error: {e.message}</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
})()}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Real-time Check */}
|
||||||
|
<div>
|
||||||
|
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
|
||||||
|
🔄 Real-time:
|
||||||
|
</div>
|
||||||
|
{(() => {
|
||||||
|
try {
|
||||||
|
let currentParams = {};
|
||||||
if (
|
if (
|
||||||
typeof window === "object" &&
|
typeof window === "object" &&
|
||||||
window.PalmSystem &&
|
window.PalmSystem &&
|
||||||
window.PalmSystem.launchParams
|
window.PalmSystem.launchParams
|
||||||
) {
|
) {
|
||||||
try {
|
currentParams = JSON.parse(window.PalmSystem.launchParams);
|
||||||
let params = JSON.parse(window.PalmSystem.launchParams);
|
if (
|
||||||
if (params["x-webos-app-container-launch"] === true) {
|
currentParams["x-webos-app-container-launch"] === true
|
||||||
params = params.details;
|
) {
|
||||||
|
currentParams = currentParams.details;
|
||||||
}
|
}
|
||||||
return params;
|
}
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div>time: {new Date().toLocaleTimeString()}</div>
|
||||||
|
<div>
|
||||||
|
current:{" "}
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color: currentParams.contentTarget
|
||||||
|
? "#00ff00"
|
||||||
|
: "#ff6666",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{currentParams.contentTarget || "MISSING"}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return { error: "Parse failed: " + e.message };
|
return (
|
||||||
}
|
<div style={{ color: "#ff6666" }}>Error: {e.message}</div>
|
||||||
} 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* App Status */}
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
marginBottom: "10px",
|
|
||||||
borderBottom: "1px solid #333",
|
|
||||||
paddingBottom: "8px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
|
|
||||||
📊 App Status:
|
|
||||||
</div>
|
</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 */}
|
{/* Parsed Deep Link */}
|
||||||
{deepLinkInfo.contentTarget && (
|
{deepLinkInfo.contentTarget && (
|
||||||
<div style={{ marginTop: "10px" }}>
|
<div
|
||||||
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
|
style={{ marginTop: "8px", fontSize: "8px", paddingBottom: "5px" }}
|
||||||
🔍 Parsed Deep Link:
|
>
|
||||||
|
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
|
||||||
|
🔍 Parsed:
|
||||||
</div>
|
</div>
|
||||||
<div style={{ marginLeft: "10px", fontSize: "10px" }}>
|
|
||||||
{(() => {
|
{(() => {
|
||||||
const tokens = deepLinkInfo.contentTarget.split("_");
|
const tokens = deepLinkInfo.contentTarget.split("_");
|
||||||
if (tokens[0] === "V2" || tokens[0] === "V3") {
|
if (tokens[0] === "V2" || tokens[0] === "V3") {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<span style={{ color: "#ffff00" }}>Version:</span>{" "}
|
Version: {tokens[0]}, Code: {tokens[1]}, Name: {tokens[2]}
|
||||||
{tokens[0]}
|
, Type: {tokens[3]}
|
||||||
</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>
|
</div>
|
||||||
{tokens.length > 4 && (
|
{tokens.length > 4 && (
|
||||||
<div>
|
<div>Extra: {tokens.slice(4).join("_")}</div>
|
||||||
<span style={{ color: "#ffff00" }}>
|
|
||||||
Extra Params:
|
|
||||||
</span>{" "}
|
|
||||||
{tokens.slice(4).join("_")}
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{ color: "#ff6666" }}>
|
<div style={{ color: "#ff6666" }}>❌ Not V2/V3 format</div>
|
||||||
❌ Raw format (not V2/V3)
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user