refactor(chat): show images in page overlay

This commit is contained in:
2026-07-09 10:11:25 +08:00
parent cb7791dd8d
commit fc92c3a5d5
23 changed files with 253 additions and 627 deletions
@@ -16,14 +16,14 @@ describe("NavigationStorage", () => {
await NavigationStorage.savePendingChatUnlock({
messageId: "msg_1",
kind: "image",
returnUrl: "/chat/image/msg_1",
returnUrl: "/chat?image=msg_1",
stage: "payment",
});
await expect(NavigationStorage.peekPendingChatUnlock()).resolves.toMatchObject({
messageId: "msg_1",
kind: "image",
returnUrl: "/chat/image/msg_1",
returnUrl: "/chat?image=msg_1",
stage: "payment",
});
@@ -55,14 +55,14 @@ describe("NavigationStorage", () => {
it("saves and consumes pending chat image return sessions", async () => {
await NavigationStorage.savePendingChatImageReturn({
messageId: "msg_1",
returnUrl: "/chat/image/msg_1",
returnUrl: "/chat?image=msg_1",
});
await expect(
NavigationStorage.consumePendingChatImageReturn(),
).resolves.toMatchObject({
messageId: "msg_1",
returnUrl: "/chat/image/msg_1",
returnUrl: "/chat?image=msg_1",
});
await expect(
NavigationStorage.consumePendingChatImageReturn(),
-1
View File
@@ -23,7 +23,6 @@ export const StorageKeys = {
// chat
chatHistory: "chat_history",
chatScrollSession: "chat_scroll_session",
pendingChatImageReturn: "pending_chat_image_return",
pendingChatUnlock: "pending_chat_unlock",