feat(navigation): add favorite entry and Menu tab

This commit is contained in:
Codex
2026-07-22 19:31:06 +08:00
parent 4e71dbd5f8
commit 163ba78f06
23 changed files with 794 additions and 118 deletions
@@ -21,6 +21,10 @@ import {
} from "@/data/constants/character";
import { Logger } from "@/utils/logger";
import { useAuthDispatch, useAuthState } from "@/stores/auth/auth-context";
import {
isFavoriteEntryRequest,
persistFavoriteEntryIntent,
} from "@/lib/navigation/favorite_entry";
const log = new Logger("ExternalEntryPersist");
@@ -33,6 +37,7 @@ interface ExternalEntryPersistProps {
character: string | null;
mode: string | null;
promotionType: string | null;
favorite: string | null;
}
export default function ExternalEntryPersist({
@@ -44,6 +49,7 @@ export default function ExternalEntryPersist({
character,
mode,
promotionType,
favorite,
}: ExternalEntryPersistProps) {
const router = useRouter();
const authState = useAuthState();
@@ -75,6 +81,9 @@ export default function ExternalEntryPersist({
? savePendingChatPromotion(resolvedPromotionType, characterId)
: clearPendingChatPromotion(),
]);
if (isFavoriteEntryRequest(favorite)) {
persistFavoriteEntryIntent();
}
for (const result of results) {
if (result.status === "rejected") {
log.warn(
@@ -96,6 +105,7 @@ export default function ExternalEntryPersist({
characterId,
destination,
deviceId,
favorite,
mode,
promotionType,
psid,