Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(mobile): 登录页账号注销横幅改为浮层气泡(figma 678:1075)

PraiseZhub7392d8d4c49
diff --git a/apps/mobile/app/(auth)/login.tsx b/apps/mobile/app/(auth)/login.tsx
index 0fcf3b2160..fa7f175627 100644
--- a/apps/mobile/app/(auth)/login.tsx
+++ b/apps/mobile/app/(auth)/login.tsx
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { Animated, Easing, Keyboard, Linking, Platform, StyleSheet, View } from 'react-native';
+import { Animated, Easing, Keyboard, Linking, Platform, Pressable, StyleSheet, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import type { AccountDeletionStatus, SocialProvider, VerificationKind } from '@cindy/auth-client';
@@ -18,7 +18,6 @@ import { acceptPrivacyConsent } from '@/analytics/analyticsConsentStore';
import { initMobileTapdb } from '@/analytics/mobileTapdb';
import { isNativeSocialProviderSupported } from '@/auth/nativeSocial';
import { Text, TextInput } from '@/components/AppText';
-import { MainWindowActionButton } from '@/components/MobilePrimitives';
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import {
LOGIN_HANDOFF_EASING,
@@ -32,6 +31,7 @@ import {
createResendDeadline,
LOGIN_CONSENT_ROW,
LOGIN_CONTROL,
+ LOGIN_DELETION_BUBBLE,
LOGIN_ERROR_TEXT,
LOGIN_GROUP,
LOGIN_LOADING_RING,
@@ -39,6 +39,8 @@ import {
LOGIN_SSO_ORG_HINT_TOP,
LOGIN_SUBTITLE,
LOGIN_TITLE,
+ resolveDeletionBubbleFrame,
+ type LoginDeletionBubbleFrame,
type LoginSurfaceMode,
} from '@/auth/loginSkinLayout';
import { LEGAL_LINKS } from '@/config/legalLinks';
@@ -1132,6 +1134,13 @@ export default function LoginScreen() {
// reduced-motion/已登录直入由 Provider 收敛为 done,此处直落终态)
const panelEntrance = usePanelEntrance(handoffPhase, stage.mode, stage.scale);
+ // 注销提示气泡(figma 678:1075):登录屏根容器 absolute 浮层,viewport 物理坐标,
+ // 不随键盘位移、不参与 stage 缩放;渲染序在登录组之后 = 盖过立绘/字标/面板/社交行,
+ // 协议弹窗仍在更上层(modal 拦截优先)。
+ const deletionBubbleFrame = accountDeletionStatus
+ ? resolveDeletionBubbleFrame(stage, insets.top)
+ : null;
+
return (
<MobileLoginHandoffStage
keyboardShiftPx={keyboardShift}
@@ -1176,21 +1185,22 @@ export default function LoginScreen() {
width: LOGIN_GROUP.width,
}}
>
- {accountDeletionStatus ? (
- <AccountDeletionStatusPanel
- onDismiss={
- accountDeletionStatus.status === 'completed'
- ? () => void auth.clearAccountDeletionReceipt()
- : undefined
- }
- status={accountDeletionStatus}
- />
- ) : null}
{stateContent}
</View>
</Animated.View>
</View>
</View>
+ {accountDeletionStatus && deletionBubbleFrame ? (
+ <AccountDeletionStatusPanel
+ frame={deletionBubbleFrame}
+ onDismiss={
+ accountDeletionStatus.status === 'completed'
+ ? () => void auth.clearAccountDeletionReceipt()
+ : undefined
+ }
+ status={accountDeletionStatus}
+ />
+ ) : null}
{/* 服务条款和隐私协议确认弹窗(figma 602:822/602:1249):个人登录链路在
radio 未勾选时统一拦截;同意=勾选并续接,不同意=留在登录页。stage 内
全屏遮罩(继承首启亮色门主题上下文),zIndex 盖过登录组。 */}
@@ -1267,24 +1277,32 @@ function usePanelEntrance(
}
function AccountDeletionStatusPanel({
+ frame,
onDismiss,
status,
}: {
+ frame: LoginDeletionBubbleFrame;
onDismiss?: () => void;
status: AccountDeletionStatus;
}) {
const styles = useThemedStyles(makeStyles);
const pending = status.status === 'pending';
return (
- <View style={styles.deletionStatus} testID="login.accountDeletionStatus">
- <Text style={styles.deletionStatusTitle}>
+ <View
+ style={[
+ styles.deletionBubble,
+ { left: frame.left, top: frame.top, width: frame.width },
+ ]}
+ testID="login.accountDeletionStatus"
+ >
+ <Text style={styles.deletionBubbleTitle}>
{pending
? loginText('accountDeletionPendingTitle')
: status.status === 'processing'
? loginText('accountDeletionProcessingTitle')
: loginText('accountDeletionCompletedTitle')}
</Text>
- <Text style={styles.deletionStatusCopy}>
+ <Text style={styles.deletionBubbleCopy}>
{pending
? loginText('accountDeletionPendingCopy').replace(
'{date}',
@@ -1295,15 +1313,17 @@ function AccountDeletionStatusPanel({
: loginText('accountDeletionCompletedCopy')}
</Text>
{onDismiss ? (
- <MainWindowActionButton
- action={{
- label: loginText('accountDeletionDismiss'),
- onPress: onDismiss,
- testID: 'login.accountDeletionDismissButton',
- }}
- density="compact"
- style={styles.fullButton}
- />
+ <Pressable
+ accessibilityRole="button"
+ hitSlop={LOGIN_DELETION_BUBBLE.linkHitSlop}
+ onPress={onDismiss}
+ style={styles.deletionBubbleLink}
+ testID="login.accountDeletionDismissButton"
+ >
+ <Text style={styles.deletionBubbleLinkText}>
+ {loginText('accountDeletionDismiss')}
+ </Text>
+ </Pressable>
) : null}
</View>
);
@@ -1416,22 +1436,43 @@ const makeStyles = (colors: ThemeColors) =>
gap: spacing.md,
padding: spacing.lg,
},
- deletionStatus: {
- borderColor: colors.borderStrong,
- borderRadius: radius.control,
- borderWidth: StyleSheet.hairlineWidth,
- gap: spacing.sm,
- padding: spacing.md,
+ // 注销提示气泡(figma 678:1075):不透明底 + 1px 描边(浮层盖立绘,必须不透明);
+ // left/top/width 由 resolveDeletionBubbleFrame 行内注入(物理 pt,不走 stage 缩放);
+ // 无图标/阴影/动画,高度内容撑开不固定。
+ deletionBubble: {
+ backgroundColor: colors.login.deletionBubbleBg,
+ borderColor: colors.login.deletionBubbleBorder,
+ borderRadius: LOGIN_DELETION_BUBBLE.radius,
+ borderWidth: LOGIN_DELETION_BUBBLE.borderWidth,
+ padding: LOGIN_DELETION_BUBBLE.padding,
+ position: 'absolute',
},
- deletionStatusTitle: {
- color: colors.textPrimary,
- fontSize: typeScale.body,
- fontWeight: fontWeight.semibold,
+ deletionBubbleTitle: {
+ color: colors.login.controlText,
+ fontSize: LOGIN_DELETION_BUBBLE.font,
+ fontWeight: fontWeight.regular,
+ lineHeight: LOGIN_DELETION_BUBBLE.lineHeight,
+ textAlign: 'center',
},
- deletionStatusCopy: {
- color: colors.textSecondary,
- fontSize: typeScale.footnote,
- lineHeight: lineHeight.caption,
+ deletionBubbleCopy: {
+ color: colors.login.secondaryText,
+ fontSize: LOGIN_DELETION_BUBBLE.font,
+ fontWeight: fontWeight.regular,
+ lineHeight: LOGIN_DELETION_BUBBLE.lineHeight,
+ marginTop: LOGIN_DELETION_BUBBLE.titleBodyGap,
+ textAlign: 'center',
+ },
+ deletionBubbleLink: {
+ alignSelf: 'center',
+ marginTop: LOGIN_DELETION_BUBBLE.bodyLinkGap,
+ },
+ deletionBubbleLinkText: {
+ color: colors.login.controlText,
+ fontSize: LOGIN_DELETION_BUBBLE.font,
+ fontWeight: fontWeight.regular,
+ lineHeight: LOGIN_DELETION_BUBBLE.lineHeight,
+ textAlign: 'center',
+ textDecorationLine: 'underline',
},
stepHeader: { gap: spacing.xs, marginBottom: spacing.xs },
stepTitle: {
@@ -1502,7 +1543,6 @@ const makeStyles = (colors: ThemeColors) =>
letterSpacing: spacing.sm,
textAlign: 'center',
},
- fullButton: { minHeight: 48, minWidth: 0 },
helper: {
color: colors.textSecondary,
fontSize: typeScale.footnote,
diff --git a/apps/mobile/src/__tests__/accountDeletion.test.ts b/apps/mobile/src/__tests__/accountDeletion.test.ts
index d501c91d0d..ffd49f849c 100644
--- a/apps/mobile/src/__tests__/accountDeletion.test.ts
+++ b/apps/mobile/src/__tests__/accountDeletion.test.ts
@@ -160,4 +160,88 @@ describe('mobile account deletion', () => {
'...(credential.authorizationCode',
);
});
+
+ it('renders the deletion status as an opaque overlay bubble with a completed-only underline link (figma 678:1075)', () => {
+ const login = source('app/(auth)/login.tsx');
+ const tokens = source('src/theme/tokens.ts');
+ const panel = login.slice(
+ login.indexOf('function AccountDeletionStatusPanel'),
+ login.indexOf('function socialLabel'),
+ );
+
+ // 浮层定位:frame 由 resolveDeletionBubbleFrame(stage, insets.top) 解析
+ // (safe-area 走 insets,不硬编码状态栏高),面板以 absolute 落在 viewport 坐标。
+ expect(login).toContain('resolveDeletionBubbleFrame(stage, insets.top)');
+ expect(panel).toContain('{ left: frame.left, top: frame.top, width: frame.width }');
+ expect(panel).toContain('styles.deletionBubble');
+
+ // 气泡不再渲染在 680 设计 px 缩放容器内(修「被登录面板覆盖」的结构根因):
+ // 缩放容器开标签到 {stateContent} 之间不得再出现面板引用。
+ const scaledGroupSlice = login.slice(
+ login.indexOf('transform: [{ scale: groupScale }]'),
+ login.indexOf('{stateContent}'),
+ );
+ expect(scaledGroupSlice).not.toContain('AccountDeletionStatusPanel');
+ // 渲染序:登录组之后、协议弹窗之前——盖住立绘/字标/面板/社交行,modal 拦截仍最上层。
+ expect(login.indexOf('frame={deletionBubbleFrame}')).toBeGreaterThan(
+ login.indexOf('transform: [{ scale: groupScale }]'),
+ );
+ expect(login.indexOf('frame={deletionBubbleFrame}')).toBeLessThan(
+ login.indexOf('{consentDialogOpen ? ('),
+ );
+
+ // 三状态:pending/processing 无按钮(调用点 onDismiss 仅 completed 才给),
+ // completed 渲染「我知道了」下划线文字链,保留原 onPress/testID/accessibilityRole。
+ expect(login).toContain(
+ "accountDeletionStatus.status === 'completed'",
+ );
+ expect(login).toContain('() => void auth.clearAccountDeletionReceipt()');
+ expect(panel).toContain('{onDismiss ? (');
+ expect(panel).toContain('<Pressable');
+ expect(panel).toContain('accessibilityRole="button"');
+ expect(panel).toContain('onPress={onDismiss}');
+ expect(panel).toContain('testID="login.accountDeletionDismissButton"');
+ expect(panel).toContain('hitSlop={LOGIN_DELETION_BUBBLE.linkHitSlop}');
+ expect(panel).toContain('styles.deletionBubbleLinkText');
+ expect(login).toContain("textDecorationLine: 'underline'");
+
+ // 气泡样式契约:不透明底 + 1px 描边(走 login 色板新条目)、圆角/padding/排版
+ // 全部消费 LOGIN_DELETION_BUBBLE 常量,无固定高、无阴影/elevation、无动画。
+ expect(login).toContain('backgroundColor: colors.login.deletionBubbleBg');
+ expect(login).toContain('borderColor: colors.login.deletionBubbleBorder');
+ expect(login).toContain('borderRadius: LOGIN_DELETION_BUBBLE.radius');
+ expect(login).toContain('borderWidth: LOGIN_DELETION_BUBBLE.borderWidth');
+ expect(login).toContain('padding: LOGIN_DELETION_BUBBLE.padding');
+ expect(login).toContain('color: colors.login.controlText');
+ expect(login).toContain('color: colors.login.secondaryText');
+ expect(login).toContain('marginTop: LOGIN_DELETION_BUBBLE.titleBodyGap');
+ expect(login).toContain('marginTop: LOGIN_DELETION_BUBBLE.bodyLinkGap');
+ const bubbleStyleSlice = login.slice(
+ login.indexOf('deletionBubble: {'),
+ login.indexOf('stepHeader:'),
+ );
+ expect(bubbleStyleSlice).not.toContain('height');
+ expect(bubbleStyleSlice).not.toContain('shadow');
+ expect(bubbleStyleSlice).not.toContain('elevation');
+ expect(panel).not.toContain('Animated');
+
+ // 旧实现的文档流内静态块与全宽按钮已退役。
+ expect(login).not.toContain('MainWindowActionButton');
+ expect(login).not.toContain('styles.deletionStatus');
+ expect(login).not.toContain('styles.fullButton');
+
+ // 色板契约:底/描边双态值(figma 678:1075,桌面 chat-input 实值);
+ // 标题/链接复用 controlText、正文复用 secondaryText,不新增文字色条目。
+ const lightPalette = tokens.slice(
+ tokens.indexOf('light: {'),
+ tokens.indexOf('dark: {'),
+ );
+ const darkPalette = tokens.slice(tokens.indexOf('dark: {'));
+ expect(lightPalette).toContain("deletionBubbleBg: '#FFFFFF'");
+ expect(lightPalette).toContain("deletionBubbleBorder: '#D7D7D4'");
+ expect(darkPalette).toContain("deletionBubbleBg: '#1F1F1E'");
+ expect(darkPalette).toContain("deletionBubbleBorder: '#3C3C3A'");
+ expect(tokens).not.toContain('deletionBubbleText');
+ expect(tokens).not.toContain('deletionBubbleTitle');
+ });
});
diff --git a/apps/mobile/src/auth/__tests__/loginSkinLayout.test.ts b/apps/mobile/src/auth/__tests__/loginSkinLayout.test.ts
index 4c15dd0118..7f961820ed 100644
--- a/apps/mobile/src/auth/__tests__/loginSkinLayout.test.ts
+++ b/apps/mobile/src/auth/__tests__/loginSkinLayout.test.ts
@@ -12,11 +12,13 @@ vi.mock('expo-localization', () => ({
import {
createResendDeadline,
formatResendCountdown,
+ LOGIN_DELETION_BUBBLE,
LOGIN_STAGE_LONG,
LOGIN_STAGE_SHORT,
PAD_LANDSCAPE_MIN_SCALE,
RESEND_COUNTDOWN_SECONDS,
resendCountdownRemaining,
+ resolveDeletionBubbleFrame,
resolveLoginStage,
resolveLoginSurface,
resolveLoginSurfaceMode,
@@ -215,3 +217,71 @@ describe('loginSkin §3.6 平板/横竖屏 surface 构图(PR4b Step 5b.3;adaptat
expect(horiz.phone).toBeDefined();
});
});
+
+describe('loginSkin 注销提示气泡浮层布局(figma 678:1075,2026-07-26 用户拍板;物理 pt/dp,不走 stage 缩放)', () => {
+ it('常量契约:圆角/padding/描边/排版/间距/hitSlop/双分支定位参数逐字段命中拍板值', () => {
+ expect(LOGIN_DELETION_BUBBLE.radius).toBe(22);
+ expect(LOGIN_DELETION_BUBBLE.padding).toBe(20);
+ expect(LOGIN_DELETION_BUBBLE.borderWidth).toBe(1);
+ expect(LOGIN_DELETION_BUBBLE.font).toBe(20);
+ expect(LOGIN_DELETION_BUBBLE.lineHeight).toBe(23);
+ expect(LOGIN_DELETION_BUBBLE.titleBodyGap).toBe(5);
+ expect(LOGIN_DELETION_BUBBLE.bodyLinkGap).toBe(22);
+ expect(LOGIN_DELETION_BUBBLE.sideMargin).toBe(20);
+ expect(LOGIN_DELETION_BUBBLE.phone.maxWidth).toBe(335);
+ expect(LOGIN_DELETION_BUBBLE.pad.width).toBe(556);
+ expect(LOGIN_DELETION_BUBBLE.pad.top).toBe(72);
+ expect(LOGIN_DELETION_BUBBLE.pad.landscapeCenterRatio).toBe(0.75);
+ // 「我知道了」热区 ≥44×44(视觉不变,只扩 hitSlop):23 行高 + 上下 12 → 47
+ const slop = LOGIN_DELETION_BUBBLE.linkHitSlop;
+ expect(LOGIN_DELETION_BUBBLE.lineHeight + slop.top + slop.bottom).toBeGreaterThanOrEqual(44);
+ expect(slop.top).toBe(12);
+ expect(slop.bottom).toBe(12);
+ expect(slop.left).toBe(20);
+ expect(slop.right).toBe(20);
+ });
+
+ it('phone:top=safe-area 顶原样带出,宽 min(335, 屏宽−40),水平屏幕居中', () => {
+ // iPhone 390 宽:335 未满屏宽上限,left=(390-335)/2=27.5;top=insets.top(47)间距 0
+ const frame = resolveDeletionBubbleFrame(resolveLoginSurface(390, 844), 47);
+ expect(frame).toEqual({ left: 27.5, top: 47, width: 335 });
+ // safeTop 原样消费(0/59 等不同机型),不内嵌状态栏高
+ expect(resolveDeletionBubbleFrame(resolveLoginSurface(390, 844), 0).top).toBe(0);
+ expect(resolveDeletionBubbleFrame(resolveLoginSurface(393, 852), 59).top).toBe(59);
+ // 窄屏(Split View 320pt):宽 = 320-40=280,left=20(两侧边距 20)
+ const narrow = resolveDeletionBubbleFrame(resolveLoginSurface(320, 768), 20);
+ expect(narrow).toEqual({ left: 20, top: 20, width: 280 });
+ });
+
+ it('pad-portrait:top=72 固定,宽 556,中轴 = 屏幕中心(竖排构图,字标/表单居中)', () => {
+ // 744×1133 基准画布:中心 372,left=372-278=94
+ const frame = resolveDeletionBubbleFrame(resolveLoginSurface(744, 1133), 24);
+ expect(frame).toEqual({ left: 94, top: 72, width: 556 });
+ // 更宽 iPad 竖屏(820×1180):仍屏幕中心 410,left=132
+ const wide = resolveDeletionBubbleFrame(resolveLoginSurface(820, 1180), 24);
+ expect(wide.left).toBeCloseTo(132, 6);
+ expect(wide.top).toBe(72);
+ });
+
+ it('pad-landscape:top=72,宽 556,中轴 = 登录 stage 右半屏中心(左立绘右表单双栏,与字标同轴)', () => {
+ // 1180×820 基准画布:右半屏中心 885,left=885-278=607
+ const frame = resolveDeletionBubbleFrame(resolveLoginSurface(1180, 820), 24);
+ expect(frame).toEqual({ left: 607, top: 72, width: 556 });
+ // iPad mini 横屏(1133×744,height 受限):scale=min(1133/1180,744/820)=0.907317,
+ // offsetX=(1133-1180×scale)/2=31.1829;stage 右半屏中心 = 31.1829+885×scale=834.1585
+ // → left=556.1585(与字标同轴;若错用 viewport×0.75=849.75 会偏 15.6pt)
+ const mini = resolveDeletionBubbleFrame(resolveLoginSurface(1133, 744), 24);
+ expect(mini.left).toBeCloseTo(556.1585, 3);
+ expect(mini.top).toBe(72);
+ expect(mini.width).toBe(556);
+ });
+
+ it('pad-landscape 断点底线(1000×690):left clamp 屏内 margin≥0,气泡不越右缘', () => {
+ // scale clamp 0.85 → 中轴 ≈750.75,未 clamp 时 left=472.75、右缘 1028.75 越屏;
+ // clamp 后 left=1000-556=444,右缘 1000 贴屏边不出屏(退化 viewport 保可读)
+ const frame = resolveDeletionBubbleFrame(resolveLoginSurface(1000, 690), 24);
+ expect(frame.left).toBe(444);
+ expect(frame.left + frame.width).toBe(1000);
+ expect(frame.top).toBe(72);
+ });
+});
diff --git a/apps/mobile/src/auth/loginSkinLayout.ts b/apps/mobile/src/auth/loginSkinLayout.ts
index de9afadb40..9e81df0ec0 100644
--- a/apps/mobile/src/auth/loginSkinLayout.ts
+++ b/apps/mobile/src/auth/loginSkinLayout.ts
@@ -439,6 +439,74 @@ export const LOGIN_CONSENT_DIALOG = {
button: { y: 260, width: 260, height: 80, radius: 40, font: 24, disagreeX: 70, agreeX: 350 },
} as const;
+/* ── 账号注销提示气泡(figma 678:1075,2026-07-26 用户拍板;**浮层,物理 pt/dp,
+ 不走 750 stage 设计 px 缩放**——气泡渲染在 stage 之外的 viewport 坐标浮层,
+ 盖过立绘/字标/面板/社交行,不参与滚动与布局流) ── */
+
+/** 注销气泡定位输出(物理 pt/dp,viewport 坐标)。 */
+export interface LoginDeletionBubbleFrame {
+ top: number;
+ left: number;
+ width: number;
+}
+
+/**
+ * 注销提示气泡布局常量(figma 678:1075;单位物理 pt/dp):
+ * 圆角 22、四边 padding 20、1px 描边、不透明底;标题/正文 20/23 Regular 居中,
+ * 标题↔正文 5、正文↔「我知道了」22、「我知道了」↔气泡底 20(= padding,
+ * 文案再长底距不变);高度内容撑开,禁止固定高;无图标/阴影/动画。
+ * - phone:top = safe-area 顶(insets.top,间距 0),宽 min(335, 屏宽−2×20),水平居中;
+ * - pad:top = 72 固定(已含状态栏之下安全余量),宽 556(与 CINDY 字标同宽);
+ * pad-landscape 中轴 = 登录 stage 右半屏中心(左立绘右表单双栏,字标在右栏
+ * 正中——stage 1180 系字标/登录组中心均 ≈885=0.75×1180;用 stage 坐标换算,
+ * 窄边受限居中的 viewport(iPad mini 横屏等)下仍与字标同轴);
+ * pad-portrait 中轴 = 屏幕中心(竖排构图,字标/表单均居中,右半屏中心会把
+ * 气泡推出屏幕右缘);left 仅 clamp 到屏内(margin ≥ 0)——基准画布右缘余量
+ * 17 是「556 宽 + 右半屏中轴」的结果而非独立参数,不额外设最小边距;
+ * 退化窄横屏(stage 自身 scale 触底,如 1000×690)气泡贴右缘也不出屏。
+ */
+export const LOGIN_DELETION_BUBBLE = {
+ radius: 22,
+ padding: 20,
+ borderWidth: 1,
+ font: 20,
+ lineHeight: LOGIN_COPY_LINE_HEIGHT,
+ titleBodyGap: 5,
+ bodyLinkGap: 22,
+ /** 「我知道了」热区扩张(视觉不变):23 行高 + 上下 12 → 47 ≥ 44;左右 20 余量 */
+ linkHitSlop: { top: 12, bottom: 12, left: 20, right: 20 },
+ /** 屏幕两侧最小边距(phone 宽 = min(maxWidth, 屏宽−2×sideMargin)) */
+ sideMargin: 20,
+ phone: { maxWidth: 335 },
+ pad: { width: 556, top: 72, landscapeCenterRatio: 0.75 },
+} as const;
+
+/**
+ * 纯函数:surface 构图 + safe-area 顶 → 气泡 viewport 落位(figma 678:1075;
+ * 断点三分支与 resolveLoginSurfaceMode 同语义,消费端直接传 useLoginSurface() 输出)。
+ */
+export function resolveDeletionBubbleFrame(
+ surface: LoginSurfaceLayout,
+ safeTop: number,
+): LoginDeletionBubbleFrame {
+ const { sideMargin, phone, pad } = LOGIN_DELETION_BUBBLE;
+ if (surface.mode === 'phone') {
+ const width = Math.min(phone.maxWidth, surface.viewportWidth - sideMargin * 2);
+ return { left: (surface.viewportWidth - width) / 2, top: safeTop, width };
+ }
+ const width = pad.width;
+ const center =
+ surface.mode === 'pad-landscape'
+ ? surface.offsetX +
+ surface.stageWidth * pad.landscapeCenterRatio * surface.scale
+ : surface.viewportWidth / 2;
+ const left = Math.max(
+ 0,
+ Math.min(center - width / 2, surface.viewportWidth - width),
+ );
+ return { left, top: pad.top, width };
+}
+
// 态叠层 / 浅底钮白描边 / loading 环底圈色:原 LOGIN_PRESSED_OVERLAY /
// LOGIN_INVERTED_BORDER / LOGIN_RING_TRACK 字面常量已随暗色实现 PR 并入
// `LoginSkinColors` 双态色板(overlayButtonPressed / overlayControlPressed /
diff --git a/apps/mobile/src/theme/tokens.ts b/apps/mobile/src/theme/tokens.ts
index 0d8ccfe4b5..8120dcf663 100644
--- a/apps/mobile/src/theme/tokens.ts
+++ b/apps/mobile/src/theme/tokens.ts
@@ -226,6 +226,10 @@ export interface LoginSkinColors {
secondaryButtonText: string;
/** 弹窗次级钮 pressed 叠层(亮浅底黑10% / 暗 Dark_button_Normal 黑20%;wave5 §11.1) */
overlaySecondaryPressed: string;
+ /** 注销提示气泡底(亮 #FFFFFF / 暗 #1F1F1E;figma 678:1075——色值走桌面 agent 输入框底 chat-input-bg / 最深深色底 token 实值,不抄 figma 裸 hex;浮层盖立绘必须不透明) */
+ deletionBubbleBg: string;
+ /** 注销提示气泡 1px 描边(亮 #D7D7D4 / 暗 #3C3C3A;figma 678:1075,桌面 chat-input-border 实值) */
+ deletionBubbleBorder: string;
}
/** 登录皮肤双态色板(与桌面 --login-* dark 值同源,DESIGN.md §16.1) */
@@ -272,6 +276,8 @@ export const loginPalettes: Record<ThemeMode, LoginSkinColors> = {
secondaryButtonBorder: '#FFFFFF',
secondaryButtonText: '#2A2828',
overlaySecondaryPressed: 'rgba(0, 0, 0, 0.1)',
+ deletionBubbleBg: '#FFFFFF',
+ deletionBubbleBorder: '#D7D7D4',
},
dark: {
bgBase: '#1F1F1E',
@@ -315,6 +321,8 @@ export const loginPalettes: Record<ThemeMode, LoginSkinColors> = {
secondaryButtonBorder: '#565454',
secondaryButtonText: '#EEEEEE',
overlaySecondaryPressed: 'rgba(0, 0, 0, 0.2)',
+ deletionBubbleBg: '#1F1F1E',
+ deletionBubbleBorder: '#3C3C3A',
},
};