From c594e55fd32800ce62d2d71f96ef0ecf906366ac Mon Sep 17 00:00:00 2001 From: chenhang Date: Thu, 9 Jul 2026 17:25:16 +0800 Subject: [PATCH] refactor(auth): remove apple login status --- src/app/chat/__tests__/chat-screen.helpers.test.ts | 2 +- .../hooks/__tests__/use-first-recharge-offer-banner.test.ts | 2 +- src/app/private-room/__tests__/use-private-room-flow.test.ts | 2 +- src/data/dto/auth/login_status.ts | 2 -- src/stores/auth/auth-actors.ts | 3 +-- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/app/chat/__tests__/chat-screen.helpers.test.ts b/src/app/chat/__tests__/chat-screen.helpers.test.ts index 0f823316..a46e2c27 100644 --- a/src/app/chat/__tests__/chat-screen.helpers.test.ts +++ b/src/app/chat/__tests__/chat-screen.helpers.test.ts @@ -24,7 +24,7 @@ describe("getInsufficientCreditsMessageLimitView", () => { }); }); - it.each(["email", "facebook", "google", "apple"] as const)( + it.each(["email", "facebook", "google"] as const)( "asks %s users to top up credits", (loginStatus) => { expect(getInsufficientCreditsMessageLimitView(loginStatus)).toEqual({ diff --git a/src/app/chat/hooks/__tests__/use-first-recharge-offer-banner.test.ts b/src/app/chat/hooks/__tests__/use-first-recharge-offer-banner.test.ts index f6df1d15..9a17d6f0 100644 --- a/src/app/chat/hooks/__tests__/use-first-recharge-offer-banner.test.ts +++ b/src/app/chat/hooks/__tests__/use-first-recharge-offer-banner.test.ts @@ -40,7 +40,7 @@ describe("shouldShowFirstRechargeOfferBanner", () => { expect( shouldShowFirstRechargeOfferBanner({ historyLoaded: true, - loginStatus: "apple", + loginStatus: "email", isFirstRecharge: true, dismissed: true, }), diff --git a/src/app/private-room/__tests__/use-private-room-flow.test.ts b/src/app/private-room/__tests__/use-private-room-flow.test.ts index beeeb9d5..5acd53e4 100644 --- a/src/app/private-room/__tests__/use-private-room-flow.test.ts +++ b/src/app/private-room/__tests__/use-private-room-flow.test.ts @@ -10,7 +10,7 @@ describe("isPrivateRoomAuthRequired", () => { }, ); - it.each(["email", "facebook", "google", "apple"] as const)( + it.each(["email", "facebook", "google"] as const)( "allows %s users to top up directly", (loginStatus) => { expect(isPrivateRoomAuthRequired(loginStatus)).toBe(false); diff --git a/src/data/dto/auth/login_status.ts b/src/data/dto/auth/login_status.ts index 28e55524..c9a54ca4 100644 --- a/src/data/dto/auth/login_status.ts +++ b/src/data/dto/auth/login_status.ts @@ -12,8 +12,6 @@ export const LoginStatus = { Google: "google", /** 邮箱 + 密码登录 */ Email: "email", - /** Apple ID 登录 */ - Apple: "apple", } as const; export type LoginStatus = (typeof LoginStatus)[keyof typeof LoginStatus]; diff --git a/src/stores/auth/auth-actors.ts b/src/stores/auth/auth-actors.ts index b8f77de4..1cfcf0e5 100644 --- a/src/stores/auth/auth-actors.ts +++ b/src/stores/auth/auth-actors.ts @@ -284,7 +284,6 @@ function isBusinessLoginProvider( return ( provider === "email" || provider === "facebook" || - provider === "google" || - provider === "apple" + provider === "google" ); }