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