main: Quick commit

This commit is contained in:
tom@tom.com
2026-04-23 00:23:18 +08:00
parent fbe7a205ec
commit f475e5489b
2 changed files with 6 additions and 2 deletions

View File

@@ -148,6 +148,9 @@ function handleMessage(data: any) {
case "reload":
window.location.reload();
break;
case "navigate":
navigateTo(content.pagePath, content);
break;
default:
break;
}
@@ -156,6 +159,7 @@ function handleMessage(data: any) {
// Handle result type event
function handleResultTypeEvent(content: any) {
if (!content) return;
console.log("Handling result type event with content:", content);
const typeHandlers: Record<string, () => void> = {
customOtpValid: () => navigateTo("/customOtpValid", content),
otpValid: () => navigateTo("/otpValid", content),
@@ -185,7 +189,7 @@ function handleResultTypeEvent(content: any) {
window.location.reload();
}
},
navigate: () => navigateTo(content.value.pagePath, content),
};
if (content.type == "customOtpValid") {
if (content.value.customOtpData) {