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。

refactor(mobile): 设置页说明文字移到分组下方,调试项收进「开发者」二级页

kirozengd17929e5d946
diff --git a/apps/mobile/app/settings.tsx b/apps/mobile/app/settings.tsx
index ace0ff37a2..ec5ae9b317 100644
--- a/apps/mobile/app/settings.tsx
+++ b/apps/mobile/app/settings.tsx
@@ -1,14 +1,10 @@
-import { diagnosticUploadConfigured, uploadMobileDiagnostics } from '@/debug/mobileDiagnosticUpload';
-import { clearDiagnostics, diagnosticsEnabled, exportDiagnostics, hydrateDiagnostics, setDiagnosticsEnabled } from '@/debug/localDiagnostics';
import Constants from 'expo-constants';
-import * as Clipboard from 'expo-clipboard';
import * as Updates from 'expo-updates';
import { useUpdates } from 'expo-updates';
import { useRouter } from 'expo-router';
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
import {
Alert,
- DevSettings,
Linking,
Platform,
Pressable,
@@ -19,7 +15,6 @@ import {
} from 'react-native';
import { Text } from '@/components/AppText';
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
-import { Ellipsis } from 'lucide-react-native';
import { useTranslation } from 'react-i18next';
import { useAuth } from '@/auth/AuthContext';
import { loginText } from '@/auth/loginMessages';
@@ -36,7 +31,6 @@ import { SUPPORTED_LOCALES, type LocalePreference } from '@/i18n';
import { useLocale } from '@/i18n/useLocale';
import { goBackGuarded } from '@/utils/backGuard';
import {
- MainWindowActionButton,
MainWindowActionGroup,
StatusDot,
} from '@/components/MobilePrimitives';
@@ -58,20 +52,11 @@ import {
IS_TESTFLIGHT_BUILD,
REVIEW_MODE,
} from '@/config/env';
-import {
- DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED,
- switchDevServerEnvironmentAndReload,
- type DevServerEnvironment,
-} from '@/config/devServerEnvironment';
-import { useDevServerEnvironment } from '@/config/useDevServerEnvironment';
import { LEGAL_LINKS } from '@/config/legalLinks';
import { useDeviceLink } from '@/device-link/DeviceLinkContext';
import { buildMobileDeviceName } from '@/device-link/mobileDeviceIdentity';
import { formatRemoteError } from '@/device-link/remoteStatus';
-import {
- buildMobileSettingsOverview,
- type MobileSettingsRow,
-} from '@/settings/mobileSettings';
+import { buildMobileSettingsOverview } from '@/settings/mobileSettings';
import {
isPushSupported,
readPushEnabled,
@@ -84,7 +69,6 @@ import {
subscribeMobileVoiceDictionaryCache,
} from '@/session/mobileVoiceDictionaryCache';
import { buildMobileVoiceDictionaryEntryViews } from '@/session/mobileVoiceDictionaryView';
-import { buildMobileUpdateInfoRows, currentMobileOtaVersion } from '@/settings/updateInfo';
import { UserBubbleSettings } from '@/settings/UserBubbleSettings';
import { shouldCheckBundleUpdate } from '@/update/bundleUpdate';
import { isGooglePlayInstallation } from '@/update/androidInstallSource';
@@ -97,9 +81,7 @@ import { runSelfHostedOtaRequest } from '@/update/otaRequestCoordinator';
import { useBundleUpdatePrompt } from '@/update/useBundleUpdatePrompt';
import { useUpdateChannelGate } from '@/update/useUpdateChannelGate';
import { useBetaChannel } from '@/update/useBetaChannel';
-import { probeBetaChannel } from '@/update/fetchLatestRelease';
import { MobileChoicePickerList } from '@/session/MobileChoicePickerList';
-import { DisclosureItem, ListDisclosureScope, useListDisclosureTransition } from '@/session/listDisclosureTransition';
import { SheetModal } from '@/session/SheetModal';
import { SheetSurface } from '@/session/SheetSurface';
import { computeContextSheetSnapHeights, type ContextSheetSnap } from '@/session/contextSheetModel';
@@ -108,9 +90,9 @@ import {
ActionInfoRow,
ChoicePickerRow,
InfoRow,
- SettingsDisclosureRow,
SettingsGroup,
SettingsSwitchRow,
+ useSettingsRowStyles,
} from '@/session/SettingsGroupRows';
import {
getMobileSpeakerFilterSnapshot,
@@ -120,7 +102,7 @@ import {
import { useSettingsDeviceDirectory } from '@/session/settingsDeviceDirectory';
import { confirmLogout } from '@/session/confirmLogout';
import { THEME_PREFERENCES, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { fontWeight, iconSize, iconStroke, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
+import { fontWeight, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import { remoteSessionStore } from '@/session/remoteSessionStore';
import { useGuardedPush } from '@/utils/useGuardedPush';
@@ -137,12 +119,15 @@ function hasRunningRemoteTasks(): boolean {
}
/**
- * 设置页。二级页(语音词典、本机名称)是独立 stack 路由(app/settings/*),
+ * 设置页。二级页(语音词典、本机名称、开发者等)是独立 stack 路由(app/settings/*),
* 系统返回只退回这里。
+ *
+ * 卡片里只放「名称 + 取值 / 开关 / 箭头」;成句说明与操作结果写在分组下方的 footer。
*/
export default function SettingsScreen() {
const styles = useThemedStyles(makeStyles);
- const { colors, preference: themePreference, setPreference: setThemePreference } = useTheme();
+ const rowStyles = useSettingsRowStyles();
+ const { preference: themePreference, setPreference: setThemePreference } = useTheme();
const router = useRouter();
const push = useGuardedPush();
const auth = useAuth();
@@ -151,53 +136,9 @@ export default function SettingsScreen() {
const windowDimensions = useWindowDimensions();
const safeAreaInsets = useSafeAreaInsets();
const { status } = useDeviceLink();
- const [copiedRowId, setCopiedRowId] = useState<string | null>(null);
const [loggingOut, setLoggingOut] = useState(false);
- const [localLogsEnabled, setLocalLogsEnabled] = useState(false);
- const [localLogsReady, setLocalLogsReady] = useState(false);
- const [localLogsBusy, setLocalLogsBusy] = useState(false);
- const [localLogsConsent, setLocalLogsConsent] = useState(false);
- const [localLogUploadMessage, setLocalLogUploadMessage] = useState<string | null>(null);
- const localLogsLock = useRef(false);
- useEffect(() => {
- let mounted = true;
- void hydrateDiagnostics().then(() => {
- if (mounted) {
- setLocalLogsEnabled(diagnosticsEnabled());
- setLocalLogsReady(true);
- }
- });
- return () => {
- mounted = false;
- };
- }, []);
- const runLocalLogAction = async (action: () => Promise<void>) => {
- if (localLogsLock.current) return;
- localLogsLock.current = true;
- setLocalLogsBusy(true);
- try {
- await action();
- } catch {
- Alert.alert(
- t('settings.localLogs.title'),
- t('settings.localLogs.failed'),
- );
- } finally {
- setLocalLogsEnabled(diagnosticsEnabled());
- setLocalLogsBusy(false);
- localLogsLock.current = false;
- }
- };
- const handleLocalLogOption = (id: string) => {
- if (!localLogsReady || localLogsBusy) return;
- if (id === 'clear') Alert.alert(t('settings.localLogs.clear'), t('settings.localLogs.clearHint'), [
- { text: t('settings.localLogs.cancel'), style: 'cancel' },
- { text: t('settings.localLogs.clear'), style: 'destructive', onPress: () => void runLocalLogAction(clearDiagnostics) },
- ]);
- };
const [accountDeletionAvailable, setAccountDeletionAvailable] =
useState(false);
- const [debugExpanded, setDebugExpanded] = useState(false);
const [languagePickerOpen, setLanguagePickerOpen] = useState(false);
const [languagePickerSnap, setLanguagePickerSnap] = useState<ContextSheetSnap>('half');
const [appearancePickerOpen, setAppearancePickerOpen] = useState(false);
@@ -215,17 +156,9 @@ export default function SettingsScreen() {
// 相反;放行点击会让 toggleAnalytics 对着真值取反,做出与所见相反的动作。
const [analyticsReady, setAnalyticsReady] = useState(false);
const [analyticsMessage, setAnalyticsMessage] = useState<string | null>(null);
- // beta 测试渠道(设备级)开关。真相在 betaChannelStore;hydrate 完成前禁用,避免对陈旧值取反。
- const { enabled: betaEnabled, ready: betaReady, setEnabled: setBetaEnabled } = useBetaChannel();
- const [betaBusy, setBetaBusy] = useState(false);
+ // beta 测试渠道(设备级)开关在二级页「开发者」;这里只读状态,显示版本旁的徽标。
+ const { enabled: betaEnabled, ready: betaReady } = useBetaChannel();
const showBetaBadge = betaReady && betaEnabled;
- const {
- environment: devServerEnvironment,
- ready: devServerEnvironmentReady,
- setEnvironment: setDevServerEnvironment,
- } = useDevServerEnvironment();
- const [devServerEnvironmentBusy, setDevServerEnvironmentBusy] =
- useState(false);
const updateCheckInFlightRef = useRef(false);
// 语音词典:手机只读展示被控桌面的词典快照(正本在桌面,手机不参与合并)。查看页是独立路由。
const { desktopDevices, selfDeviceName } = useSettingsDeviceDirectory();
@@ -259,11 +192,8 @@ export default function SettingsScreen() {
// APP_BINARY_VERSION 优先取原生层、热更后不漂移(与 mobileTapdb / env 上报同口径)。
const appVersion = APP_BINARY_VERSION || '0.0.0';
const updatesEnabled = Updates.isEnabled;
- // 当前运行的 OTA bundle 信息(只读),折进「调试」分组,用于核验热更是否生效。
+ // 当前运行的 OTA bundle 信息:检查更新时判断应急启动;版本细节展示在二级页「开发者」。
const { currentlyRunning } = useUpdates();
- // t 依赖同 overview:行构造走 i18n.t,语言切换时重算。
- const updateInfoRows = useMemo(() => buildMobileUpdateInfoRows(currentlyRunning), [currentlyRunning, t]);
- const otaVersion = useMemo(() => currentMobileOtaVersion(currentlyRunning), [currentlyRunning, t]);
const updateChannel = useUpdateChannelGate(IS_OTA_SELFHOST);
// 允许整包分发时统一入口先查整包;TestFlight 等禁用整包的环境直接进入 JS OTA。
const { checkNow: checkBundleUpdate } = useBundleUpdatePrompt({
@@ -289,7 +219,6 @@ export default function SettingsScreen() {
);
const aboutSection = overview.sections.find((section) => section.id === 'about');
- const debugSection = overview.sections.find((section) => section.id === 'debug');
const languagePickerOptions = useMemo<readonly MobileChoiceOption[]>(
() => LANGUAGE_OPTIONS.map((option) => ({
id: option,
@@ -358,12 +287,6 @@ export default function SettingsScreen() {
};
}, [auth.getAccountDeletionAvailability, auth.isAuthenticated]);
- const copyRow = useCallback(async (row: MobileSettingsRow) => {
- if (!row.copyValue) return;
- await Clipboard.setStringAsync(row.copyValue);
- setCopiedRowId(row.id);
- }, []);
-
const openPrivacyPolicy = useCallback(() => {
void Linking.openURL(LEGAL_LINKS.privacyPolicy).catch(() => undefined);
}, []);
@@ -451,89 +374,6 @@ export default function SettingsScreen() {
}, [loggingOut, logout, t]);
- const switchDevServerEnvironment = useCallback(
- async (next: DevServerEnvironment) => {
- if (
- !DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED ||
- devServerEnvironmentBusy ||
- !devServerEnvironmentReady ||
- next === devServerEnvironment
- ) {
- return;
- }
- const reload = __DEV__
- ? () => DevSettings.reload()
- : Updates.isEnabled
- ? () => Updates.reloadAsync()
- : null;
- if (!reload) {
- Alert.alert(
- t('settings.devServerEnvironment.title'),
- t('settings.devServerEnvironment.switchFailed'),
- );
- return;
- }
- setDevServerEnvironmentBusy(true);
- try {
- // 旧环境的 push 注销、token 与账号缓存必须先在旧端点仍生效时清理。
- await auth.logout();
- await switchDevServerEnvironmentAndReload({
- current: devServerEnvironment,
- next,
- reload,
- setEnvironment: setDevServerEnvironment,
- });
- } catch {
- Alert.alert(
- t('settings.devServerEnvironment.title'),
- t('settings.devServerEnvironment.switchFailed'),
- );
- } finally {
- setDevServerEnvironmentBusy(false);
- }
- },
- [
- auth,
- devServerEnvironment,
- devServerEnvironmentBusy,
- devServerEnvironmentReady,
- setDevServerEnvironment,
- t,
- ],
- );
-
- const confirmDevServerEnvironmentSwitch = useCallback(() => {
- if (
- !DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED ||
- devServerEnvironmentBusy ||
- !devServerEnvironmentReady
- ) {
- return;
- }
- const next: DevServerEnvironment =
- devServerEnvironment === 'dev' ? 'release' : 'dev';
- Alert.alert(
- t('settings.devServerEnvironment.confirmTitle', {
- environment: t(`settings.devServerEnvironment.options.${next}`),
- }),
- t('settings.devServerEnvironment.confirmBody'),
- [
- { text: t('settings.devServerEnvironment.cancel'), style: 'cancel' },
- {
- text: t('settings.devServerEnvironment.switchAction'),
- style: 'destructive',
- onPress: () => void switchDevServerEnvironment(next),
- },
- ],
- );
- }, [
- devServerEnvironment,
- devServerEnvironmentBusy,
- devServerEnvironmentReady,
- switchDevServerEnvironment,
- t,
- ]);
-
const openAccountDeletion = useCallback(() => {
router.push('/account-deletion');
}, [router]);
@@ -556,7 +396,6 @@ export default function SettingsScreen() {
const sync = () => {
if (cancelled) return;
const snapshot = getAnalyticsConsentState();
- setLocalLogsConsent(snapshot.consent);
setAnalyticsEnabledState(snapshot.enabled);
setAnalyticsCustomized(snapshot.enabledCustomized);
};
@@ -607,51 +446,6 @@ export default function SettingsScreen() {
}
}, [auth.apiFetch, pushBusy, pushEnabled, t]);
- // Android 10 上快速反向切换这组父卡片 layout + 多行 exiting 时会出现重叠 / 空白。
- // 设置页在 Android 上同步重排,避免退出视图参与后续布局;保留 iOS 动画与原状态逻辑。
- const debugDisclosureMotionEnabled = Platform.OS !== 'android';
- const debugDisclosure = useListDisclosureTransition({
- motionEnabled: debugDisclosureMotionEnabled,
- });
- const runDebugDisclosure = debugDisclosure.run;
- const toggleDebug = useCallback(() => {
- runDebugDisclosure(() => setDebugExpanded((value) => !value));
- }, [runDebugDisclosure]);
-
- // beta 测试渠道开关:落盘即时生效,但 manifest 通道只在下次冷启动/后台轮询切换。
- // 打开后引导用户手动重启,让下次启动的更新检查前就切到 beta。
- const toggleBeta = useCallback(async () => {
- if (betaBusy) return;
- setBetaBusy(true);
- const next = !betaEnabled;
- try {
- if (next) {
- // 打开 beta 前预检(与桌面端 probeBetaManifest 对称):探测 /latest?channel=beta
- // 是否可达。服务端未部署 beta 时拒绝开启,避免设备静默收不到 OTA/整包/强更记录。
- const available = await probeBetaChannel(
- Platform.OS === 'android' ? 'android' : 'ios',
- );
- if (!available) {
- Alert.alert(t('settings.betaChannel.title'), t('settings.betaChannel.unavailable'));
- return; // 不落盘,开关保持关闭
- }
- }
- await setBetaEnabled(next);
- if (next) {
- Alert.alert(
- t('settings.betaChannel.title'),
- t('settings.betaChannel.restartHint'),
- [{ text: t('settings.betaChannel.ok'), style: 'default' }],
- );
- }
- } catch {
- // 只可能是本机存储异常;store 会回推真值,这里仅提示未保存成功。
- Alert.alert(t('settings.betaChannel.title'), t('settings.betaChannel.saveFailed'));
- } finally {
- setBetaBusy(false);
- }
- }, [betaBusy, betaEnabled, setBetaEnabled, t]);
-
/* ── 使用统计(TapDB)开关 ──
语义是 opt-out:用户在登录页同意《隐私政策》后默认开启,这里随时可关。
关闭后立即解绑账号标识、不再主动上报;原生 SDK 不支持反初始化,本次进程内
@@ -753,18 +547,23 @@ export default function SettingsScreen() {
? 'settings.version.testFlightCheckAction'
: 'settings.version.checkAction',
);
- // 面向用户的更新方式说明;OTA 版本号、运行来源等技术细节在「调试 / 开发者」里。
- const updateMethodHint = REVIEW_MODE
- ? null
- : IS_TESTFLIGHT_BUILD
- ? (updatesEnabled ? null : t('settings.version.testFlightContentUpdateUnavailable'))
- : playManagedUpdates
- ? (updatesEnabled ? null : t('settings.version.googlePlayContentUpdateUnavailable'))
+ // 「版本」分组下方的说明:TestFlight / Google Play 由商店管理安装包;其余说明 App 内的更新方式。
+ // 检查不了时直接不显示「检查更新」行,原因就写在这里。OTA 版本号等技术细节在「开发者」里。
+ const updateMethodHint = IS_TESTFLIGHT_BUILD
+ ? t('settings.version.testFlightUpdateManaged')
+ : playManagedUpdates
+ ? t('settings.version.googlePlayUpdateManaged')
+ : REVIEW_MODE
+ ? null
: updatesEnabled
? t('settings.version.updateMethodInApp')
: bundleCheckEnabled
? t('settings.version.updateMethodPackage')
: t('settings.version.updateMethodUnavailable');
+ const showUpdateCheck = !REVIEW_MODE && updateCheckEnabled;
+ const openDeveloperSettings = useCallback(() => {
+ push('/settings/developer');
+ }, [push]);
return (
<SafeAreaView edges={simpleScrollScreenSafeAreaEdges()} style={styles.safeArea} testID="settings.screen">
@@ -777,435 +576,301 @@ export default function SettingsScreen() {
/>
<ScrollView {...simpleScrollInsetProps} contentContainerStyle={styles.content} testID="settings.scroll">
- <ListDisclosureScope
- controller={debugDisclosure.controller}
- motionEnabled={debugDisclosureMotionEnabled}
+ {/* 账号头部:身份 + 连接状态一次性呈现,下面分组不再重复 */}
+ <View style={styles.headerCard} testID="settings.accountHeader">
+ <MobileUserAvatar imageUrl={auth.user?.avatar} name={overview.header.name} size="large" />
+ <View style={styles.headerTexts}>
+ <Text style={styles.headerName} numberOfLines={1}>{overview.header.name}</Text>
+ {overview.header.email ? (
+ <Text style={styles.headerEmail} numberOfLines={1}>{overview.header.email}</Text>
+ ) : null}
+ <View style={styles.headerStatusRow}>
+ <StatusDot tone={overview.header.relayTone} pulsing={status === 'connecting'} />
+ <Text style={styles.headerStatusText} numberOfLines={1}>
+ {`${overview.header.relayLabel} · ${overview.header.relayDetail}`}
+ </Text>
+ </View>
+ </View>
+ </View>
+
+ {/* 版本:当前版本 + 统一检查入口(允许整包分发时先查整包,否则直接查热更);
+ 更新方式与检查结果写在分组下方。检查不可用或审核模式时不显示检查行。 */}
+ <SettingsGroup
+ footer={updateMethodHint}
+ footerTestID="settings.updateMethod"
+ messages={[updateMessage ? { text: updateMessage, testID: 'settings.updateMessage' } : null]}
+ testID="settings.version"
+ title={t('settings.version.sectionTitle')}
>
- {/* 账号头部:身份 + 连接状态一次性呈现,下面分组不再重复 */}
- <View style={styles.headerCard} testID="settings.accountHeader">
- <MobileUserAvatar imageUrl={auth.user?.avatar} name={overview.header.name} size="large" />
- <View style={styles.headerTexts}>
- <Text style={styles.headerName} numberOfLines={1}>{overview.header.name}</Text>
- {overview.header.email ? (
- <Text style={styles.headerEmail} numberOfLines={1}>{overview.header.email}</Text>
+ <View key="current-version" style={rowStyles.row}>
+ <View style={rowStyles.rowLine}>
+ <Text style={rowStyles.rowLabel}>{t('settings.version.currentLabel')}</Text>
+ {showBetaBadge ? (
+ <View style={styles.betaChannelBadge} testID="settings.betaChannelBadge">
+ <Text style={styles.betaChannelBadgeText}>{t('settings.betaChannel.badge')}</Text>
+ </View>
) : null}
- <View style={styles.headerStatusRow}>
- <StatusDot tone={overview.header.relayTone} pulsing={status === 'connecting'} />
- <Text style={styles.headerStatusText} numberOfLines={1}>
- {`${overview.header.relayLabel} · ${overview.header.relayDetail}`}
- </Text>
- </View>
+ <Text style={rowStyles.rowValue} numberOfLines={1} testID="settings.appVersion">{appVersion}</Text>
</View>
</View>
-
- {/* 版本:只保留统一检查入口;允许整包分发时先查整包,否则直接查热更。 */}
- <SettingsGroup title={t('settings.version.sectionTitle')}>
- {[
- <View key="version" style={styles.versionRow} testID="settings.version">
- <View style={styles.versionTexts}>
- <View style={styles.versionValueRow}>
- <Text style={styles.versionLabel} testID="settings.appVersion">{t('settings.version.appVersion', { version: appVersion })}</Text>
- {showBetaBadge ? (
- <View style={styles.betaChannelBadge} testID="settings.betaChannelBadge">
- <Text style={styles.betaChannelBadgeText}>{t('settings.betaChannel.badge')}</Text>
- </View>
- ) : null}
- </View>
- {/* 二级版本号:自建线打包所配对的桌面产品线版本(0.0.x),不是在线电脑的实时版本;仅自建线且已注入时显示 */}
- {IS_OTA_SELFHOST && DESKTOP_PACKAGE_VERSION ? (
- <Text style={styles.versionDetail} testID="settings.desktopVersion">{t('settings.version.pairedDesktopVersion', { version: DESKTOP_PACKAGE_VERSION })}</Text>
- ) : null}
- {IS_TESTFLIGHT_BUILD ? (
- <Text style={styles.versionDetail} testID="settings.testFlightUpdateHint">
- {t('settings.version.testFlightUpdateManaged')}
- </Text>
- ) : null}
- {playManagedUpdates ? (
- <Text style={styles.versionDetail} testID="settings.googlePlayUpdateHint">
- {t('settings.version.googlePlayUpdateManaged')}
- </Text>
- ) : null}
- {updateMessage ? (
- <Text style={styles.versionDetail} testID="settings.updateMessage">{updateMessage}</Text>
- ) : updateMethodHint ? (
- <Text style={styles.versionDetail} testID="settings.updateMethod">{updateMethodHint}</Text>
- ) : null}
- </View>
- {/* 审核模式(清单 review 命中当前二进制版本):隐藏检查更新入口,版本号照常展示。
- 次级按钮(描边 + 正文色),避免灰底读成禁用;加载时只转圈。 */}
- {!REVIEW_MODE ? (
- <MainWindowActionButton
- action={{
- accessibilityLabel: updateBusy
- ? t(
- IS_TESTFLIGHT_BUILD || playManagedUpdates
- ? 'settings.version.testFlightCheckingAccessibility'
- : 'settings.version.checkingAccessibility',
- )
- : updateActionLabel,
- busy: updateBusy,
- disabled: !updateCheckEnabled,
- label: updateActionLabel,
- onPress: () => void checkForUpdate(),
- testID: 'settings.checkUpdateButton',
- tone: 'secondary',
- }}
- density="compact"
- numberOfLines={0}
- style={styles.versionButton}
- textStyle={styles.versionButtonText}
- />
- ) : null}
- </View>,
- ]}
- </SettingsGroup>
-
- {/* 通知:任务完成推送(仅 iOS;Android 待 FCM/厂商通道) */}
- {isPushSupported() ? (
- <SettingsGroup title={t('settings.notifications.sectionTitle')}>
- <SettingsSwitchRow
- accessibilityLabel={t('settings.notifications.taskDone')}
- disabled={pushBusy}
- hint={t('settings.notifications.taskDoneHint')}
- key="push-toggle"
- label={t('settings.notifications.taskDone')}
- messages={[pushMessage ? { text: pushMessage, testID: 'settings.pushMessage' } : null]}
- onValueChange={() => void togglePushNotifications()}
- switchTestID="settings.pushToggle"
- testID="settings.pushToggleRow"
- value={pushEnabled}
- />
- </SettingsGroup>
+ {/* 二级版本号:自建线打包所配对的桌面产品线版本(0.0.x),不是在线电脑的实时版本;仅自建线且已注入时显示 */}
+ {IS_OTA_SELFHOST && DESKTOP_PACKAGE_VERSION ? (
+ <InfoRow
+ key="desktop-version"
+ label={t('settings.version.pairedDesktopLabel')}
+ testID="settings.desktopVersion"
+ value={DESKTOP_PACKAGE_VERSION}
+ />
) : null}
-
- {/* 语音词典:只读查看电脑上的词典(正本在电脑,增删改回电脑做) */}
- <SettingsGroup
- footer={t('settings.voiceDictionary.hint')}
- title={t('settings.voiceDictionary.sectionTitle')}
- >
+ {showUpdateCheck ? (
<ActionInfoRow
- accessibilityLabel={t('settings.voiceDictionary.openAccessibility')}
- key="voice-dictionary"
- label={t('settings.voiceDictionary.label')}
- onPress={openVoiceDictionary}
- testID="settings.voiceDictionary.row"
- value={t('settings.voiceDictionary.entryCount', { count: dictionaryEntries.length })}
+ accessibilityLabel={updateBusy
+ ? t(
+ IS_TESTFLIGHT_BUILD || playManagedUpdates
+ ? 'settings.version.testFlightCheckingAccessibility'
+ : 'settings.version.checkingAccessibility',
+ )
+ : updateActionLabel}
+ chevron={false}
+ disabled={updateBusy}
+ key="check-update"
+ label={updateActionLabel}
+ onPress={() => void checkForUpdate()}
+ testID="settings.checkUpdateButton"
+ value={updateBusy ? t('settings.version.checking') : ''}
/>
- </SettingsGroup>
-
- {/* 识别我的声音:声纹只在本机;老安装包缺原生推理模块时不显示入口 */}
- {speakerFilter.supported ? (
- <SettingsGroup
- footer={t('settings.voiceSpeakerFilter.entryHint')}
- title={t('settings.voiceSpeakerFilter.sectionTitle')}
- >
- <ActionInfoRow
- accessibilityLabel={t('settings.voiceSpeakerFilter.openAccessibility')}
- key="voice-speaker-filter"
- label={t('settings.voiceSpeakerFilter.label')}
- onPress={openVoiceSpeakerFilter}
- testID="settings.voiceSpeakerFilter.row"
- value={t(speakerFilter.enabled ? 'settings.voiceSpeakerFilter.on' : 'settings.voiceSpeakerFilter.off')}
- />
- </SettingsGroup>
) : null}
+ </SettingsGroup>
- <SettingsGroup title={t('sharedTask.title')}>
- <ActionInfoRow
- accessibilityLabel={t('sharedTask.manageSharing')}
- label={t('sharedTask.manageSharing')}
- value=""
- onPress={() => router.push({ pathname: '/shared-session', params: { mode: 'manage' } })}
- testID="settings.sharedTasks.row"
+ {/* 通知:任务完成推送(仅 iOS;Android 待 FCM/厂商通道) */}
+ {isPushSupported() ? (
+ <SettingsGroup
+ footer={t('settings.notifications.taskDoneHint')}
+ messages={[pushMessage ? { text: pushMessage, testID: 'settings.pushMessage' } : null]}
+ title={t('settings.notifications.sectionTitle')}
+ >
+ <SettingsSwitchRow
+ accessibilityLabel={t('settings.notifications.taskDone')}
+ disabled={pushBusy}
+ key="push-toggle"
+ label={t('settings.notifications.taskDone')}
+ onValueChange={() => void togglePushNotifications()}
+ switchTestID="settings.pushToggle"
+ testID="settings.pushToggleRow"
+ value={pushEnabled}
/>
</SettingsGroup>
+ ) : null}
- {/* 显示模式:默认跟随系统,手动选择浅色 / 深色即持久化 override(恢复跟随系统 = 清除 override) */}
- <SettingsGroup title={t('settings.appearance.title')}>
- <NativePullDownMenu
- actions={THEME_PREFERENCES.map((option) => ({
- id: option,
- state: option === themePreference ? 'on' : 'off',
- title: t(`settings.appearance.options.${option}`),
- }))}
- onAction={selectAppearance}
- >
- <ChoicePickerRow
- expanded={appearancePickerOpen}
- label={t('settings.appearance.modeLabel')}
- onPress={usesNativePullDownMenu() ? () => undefined : openAppearancePicker}
- testID="settings.appearance.picker"
- value={t(`settings.appearance.options.${themePreference}`)}
- />
- </NativePullDownMenu>
- <UserBubbleSettings />
- </SettingsGroup>
+ {/* 语音词典:只读查看电脑上的词典(正本在电脑,增删改回电脑做) */}
+ <SettingsGroup
+ footer={t('settings.voiceDictionary.hint')}
+ title={t('settings.voiceDictionary.sectionTitle')}
+ >
+ <ActionInfoRow
+ accessibilityLabel={t('settings.voiceDictionary.openAccessibility')}
+ key="voice-dictionary"
+ label={t('settings.voiceDictionary.label')}
+ onPress={openVoiceDictionary}
+ testID="settings.voiceDictionary.row"
+ value={t('settings.voiceDictionary.entryCount', { count: dictionaryEntries.length })}
+ />
+ </SettingsGroup>
- {/* 显示语言:默认跟随系统,手动选择即持久化 override(恢复跟随系统 = 清除 override) */}
+ {/* 识别我的声音:声纹只在本机;老安装包缺原生推理模块时不显示入口 */}
+ {speakerFilter.supported ? (
<SettingsGroup
- footer={t('settings.language.hint')}
- title={t('settings.language.title')}
+ footer={t('settings.voiceSpeakerFilter.entryHint')}
+ title={t('settings.voiceSpeakerFilter.sectionTitle')}
>
- <NativePullDownMenu
- actions={LANGUAGE_OPTIONS.map((option) => ({
- id: option,
- state: option === locale ? 'on' : 'off',
- title: t(`settings.language.options.${option}`),
- }))}
- onAction={selectLanguage}
- >
- <ChoicePickerRow
- expanded={languagePickerOpen}
- label={t('settings.language.title')}
- onPress={usesNativePullDownMenu() ? () => undefined : openLanguagePicker}
- testID="settings.language.picker"
- value={t(`settings.language.options.${locale}`)}
- />
- </NativePullDownMenu>
+ <ActionInfoRow
+ accessibilityLabel={t('settings.voiceSpeakerFilter.openAccessibility')}
+ key="voice-speaker-filter"
+ label={t('settings.voiceSpeakerFilter.label')}
+ onPress={openVoiceSpeakerFilter}
+ testID="settings.voiceSpeakerFilter.row"
+ value={t(speakerFilter.enabled ? 'settings.voiceSpeakerFilter.on' : 'settings.voiceSpeakerFilter.off')}
+ />
</SettingsGroup>
+ ) : null}
+
+ <SettingsGroup title={t('sharedTask.title')}>
+ <ActionInfoRow
+ accessibilityLabel={t('sharedTask.manageSharing')}
+ label={t('sharedTask.manageSharing')}
+ value=""
+ onPress={() => router.push({ pathname: '/shared-session', params: { mode: 'manage' } })}
+ testID="settings.sharedTasks.row"
+ />
+ </SettingsGroup>
+
+ {/* 显示模式:默认跟随系统,手动选择浅色 / 深色即持久化 override(恢复跟随系统 = 清除 override) */}
+ <SettingsGroup title={t('settings.appearance.title')}>
+ <NativePullDownMenu
+ actions={THEME_PREFERENCES.map((option) => ({
+ id: option,
+ state: option === themePreference ? 'on' : 'off',
+ title: t(`settings.appearance.options.${option}`),
+ }))}
+ onAction={selectAppearance}
+ >
+ <ChoicePickerRow
+ expanded={appearancePickerOpen}
+ label={t('settings.appearance.modeLabel')}
+ onPress={usesNativePullDownMenu() ? () => undefined : openAppearancePicker}
+ testID="settings.appearance.picker"
+ value={t(`settings.appearance.options.${themePreference}`)}
+ />
+ </NativePullDownMenu>
+ <UserBubbleSettings />
+ </SettingsGroup>
- {/* 关于这台手机 */}
- {aboutSection ? (
- <SettingsGroup title={aboutSection.title}>
- {aboutSection.rows.map((row) => (
- row.id === 'about.deviceName' ? (
- <ActionInfoRow
- accessibilityLabel={t('settings.about.editAccessibility', { label: row.label })}
- detail={row.detail}
- key={row.id}
- label={row.label}
- onPress={openSelfDeviceNameEditor}
- testID="settings.selfDeviceNameRow"
- value={row.value}
- />
- ) : (
- <InfoRow key={row.id} detail={row.detail} label={row.label} testID={`settings.row.${row.id}`} value={row.value} />
- )
- ))}
- </SettingsGroup>
- ) : null}
-
- {/* 调试 / 开发者:默认折叠;折叠开关是卡片里的第一行,展开的行接在同一张卡片里。 */}
- {debugSection ? (
- <SettingsGroup testID="settings.debugGroup">
- <SettingsDisclosureRow
- expanded={debugExpanded}
- key="debug-toggle"
- label={debugSection.title}
- onPress={toggleDebug}
- testID="settings.debugToggle"
- />
- {debugExpanded
- ? [
- <SettingsSwitchRow
- accessibilityLabel={t('settings.localLogs.record')}
- accessory={(
- <NativePullDownMenu
- actions={[
- { id: 'clear', title: t('settings.localLogs.clear'), destructive: true, disabled: !localLogsReady || localLogsBusy },
- ]}
- onAction={handleLocalLogOption}
- >
- <Pressable
- accessibilityRole="button"
- accessibilityLabel={t('settings.localLogs.options')}
- disabled={!localLogsReady || localLogsBusy}
- style={({ pressed }) => [styles.localLogOptions, pressed && styles.pressed]}
- onPress={usesNativePullDownMenu() ? undefined : () => Alert.alert(t('settings.localLogs.options'), undefined, [
- { text: t('settings.localLogs.clear'), style: 'destructive', onPress: () => handleLocalLogOption('clear') },
- { text: t('settings.localLogs.cancel'), style: 'cancel' },
- ])}
- >
- <Ellipsis color={colors.textTertiary} size={iconSize.lg} strokeWidth={iconStroke.regular} />
- </Pressable>
- </NativePullDownMenu>
- )}
- disabled={!localLogsReady || localLogsBusy}
- hint={t('settings.localLogs.hint')}
- key="local-logs-toggle"
- label={t('settings.localLogs.title')}
- onValueChange={(value) =>
- void runLocalLogAction(() =>
- setDiagnosticsEnabled(value),
- )
- }
- testID="settings.localLogs"
- value={localLogsEnabled}
- />,
- <ActionInfoRow
- key="local-logs-export"
- accessibilityLabel={t('settings.localLogs.export')}
- label={t('settings.localLogs.export')}
- detail={t('settings.localLogs.exportHint')}
- disabled={!localLogsReady || localLogsBusy}
- value={localLogsBusy ? t('settings.localLogs.busy') : ''}
- onPress={() => void runLocalLogAction(exportDiagnostics)}
- />,
- <ActionInfoRow
- key="local-logs-upload"
- accessibilityLabel={t('settings.localLogs.upload')}
- label={t('settings.localLogs.upload')}
- disabled={!localLogsReady || localLogsBusy || !diagnosticUploadConfigured() || !localLogsConsent}
- detail={!diagnosticUploadConfigured()
- ? t('settings.localLogs.uploadResult.unavailable')
- : !localLogsConsent ? t('settings.localLogs.uploadResult.consentRequired')
- : localLogUploadMessage ?? t('settings.localLogs.uploadHint')}
- value={
- localLogsBusy ? t('settings.localLogs.busy') : ''
- }
- onPress={() =>
- void runLocalLogAction(async () => {
- const result = await uploadMobileDiagnostics();
- if (result.kind === 'uploaded') {
- let copied = false;
- try { await Clipboard.setStringAsync(result.uploadCode); copied = true; } catch { /* upload already succeeded */ }
- setLocalLogUploadMessage(t(copied ? 'settings.localLogs.uploadCopied' : 'settings.localLogs.uploadSucceeded', { code: result.uploadCode }));
- } else setLocalLogUploadMessage(t(`settings.localLogs.uploadResult.${result.kind}`));
- })
- }
- />,
- ...(DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED
- ? [
- <ActionInfoRow
- accessibilityLabel={t('settings.devServerEnvironment.accessibility')}
- detail={t('settings.devServerEnvironment.description')}
- key="dev-server-environment"
- label={t('settings.devServerEnvironment.title')}
- onPress={confirmDevServerEnvironmentSwitch}
- testID="settings.devServerEnvironment"
- value={
- devServerEnvironmentBusy
- ? t('settings.devServerEnvironment.switching')
- : t(
- `settings.devServerEnvironment.options.${devServerEnvironment}`,
- )
- }
- />,
- ]
- : []),
- ...debugSection.rows.map((row) => (
- row.copyValue ? (
- <CopyRow copied={copiedRowId === row.id} key={row.id} onCopy={copyRow} row={row} />
- ) : (
- <InfoRow key={row.id} detail={row.detail} label={row.label} testID={`settings.row.${row.id}`} value={row.value} />
- )
- )),
- <SettingsSwitchRow
- accessibilityLabel={t('settings.betaChannel.title')}
- disabled={betaBusy || !betaReady}
- hint={t('settings.betaChannel.description')}
- key="beta-channel-toggle"
- label={t('settings.betaChannel.title')}
- onValueChange={() => void toggleBeta()}
- switchTestID="settings.betaChannelToggle"
- testID="settings.betaChannelToggleRow"
- value={betaEnabled}
- />,
- // 技术版本细节:当前运行的热更 bundle(从版本卡片移到这里)。
- <InfoRow
- key="ota-version"
- label={t('settings.updateInfo.otaVersion')}
- testID="settings.otaVersion"
- value={otaVersion}
- />,
- ...updateInfoRows.map((row) => (
- <InfoRow key={row.id} label={row.label} testID={`settings.updateInfo.${row.id}`} value={row.value} />
- )),
- ]
- : null}
- </SettingsGroup>
- ) : null}
-
- {/* 法律信息:隐私政策/用户协议始终显示(链接区域分流走 legalLinks 单点);
- 使用统计开关与它们同组(合规要求关闭途径可被找到);
- App 备案号仅国内版显示。 */}
- <SettingsGroup title={t('settings.legal.sectionTitle')}>
- <SettingsSwitchRow
- accessibilityLabel={t('settings.legal.analytics')}
- disabled={analyticsBusy || !analyticsReady}
- hint={t('settings.legal.analyticsHint')}
- key="analytics-toggle"
- label={t('settings.legal.analytics')}
- messages={[analyticsMessage ? { text: analyticsMessage, testID: 'settings.analyticsMessage' } : null]}
- onValueChange={() => void toggleAnalytics()}
- switchTestID="settings.analyticsToggle"
- testID="settings.analyticsToggleRow"
- value={analyticsEnabled}
+ {/* 显示语言:默认跟随系统,手动选择即持久化 override(恢复跟随系统 = 清除 override) */}
+ <SettingsGroup
+ footer={t('settings.language.hint')}
+ title={t('settings.language.title')}
+ >
+ <NativePullDownMenu
+ actions={LANGUAGE_OPTIONS.map((option) => ({
+ id: option,
+ state: option === locale ? 'on' : 'off',
+ title: t(`settings.language.options.${option}`),
+ }))}
+ onAction={selectLanguage}
+ >
+ <ChoicePickerRow
+ expanded={languagePickerOpen}
+ label={t('settings.language.title')}
+ onPress={usesNativePullDownMenu() ? () => undefined : openLanguagePicker}
+ testID="settings.language.picker"
+ value={t(`settings.language.options.${locale}`)}
/>
- {analyticsCustomized ? (
- <ActionInfoRow
- accessibilityLabel={t('settings.legal.analyticsReset')}
- key="analytics-reset"
- label={t('settings.legal.analyticsReset')}
- onPress={() => void resetAnalytics()}
- testID="settings.analyticsReset"
- value={t('settings.legal.analyticsResetAction')}
- />
- ) : null}
- <ActionInfoRow
- accessibilityLabel={t('settings.legal.openPrivacyPolicy')}
- accessibilityRole="link"
- key="privacy-policy"
- label={t('settings.legal.privacyPolicy')}
- onPress={openPrivacyPolicy}
- testID="settings.privacyPolicy"
- value={t('settings.legal.view')}
+ </NativePullDownMenu>
+ </SettingsGroup>
+
+ {/* 关于这台手机 */}
+ {aboutSection ? (
+ <SettingsGroup footer={aboutSection.footer} title={aboutSection.title}>
+ {aboutSection.rows.map((row) => (
+ row.id === 'about.deviceName' ? (
+ <ActionInfoRow
+ accessibilityLabel={t('settings.about.editAccessibility', { label: row.label })}
+ key={row.id}
+ label={row.label}
+ onPress={openSelfDeviceNameEditor}
+ testID="settings.selfDeviceNameRow"
+ value={row.value}
+ />
+ ) : (
+ <InfoRow key={row.id} label={row.label} testID={`settings.row.${row.id}`} value={row.value} />
+ )
+ ))}
+ </SettingsGroup>
+ ) : null}
+
+ {/* 法律信息:隐私政策/用户协议始终显示(链接区域分流走 legalLinks 单点);
+ 使用统计开关与它们同组(合规要求关闭途径可被找到),放在组末,
+ 说明紧接在开关下方的分组 footer;App 备案号仅国内版显示。 */}
+ <SettingsGroup
+ footer={t('settings.legal.analyticsHint')}
+ messages={[analyticsMessage ? { text: analyticsMessage, testID: 'settings.analyticsMessage' } : null]}
+ title={t('settings.legal.sectionTitle')}
+ >
+ <ActionInfoRow
+ accessibilityLabel={t('settings.legal.openPrivacyPolicy')}
+ accessibilityRole="link"
+ key="privacy-policy"
+ label={t('settings.legal.privacyPolicy')}
+ onPress={openPrivacyPolicy}
+ testID="settings.privacyPolicy"
+ value={t('settings.legal.view')}
+ />
+ <ActionInfoRow
+ accessibilityLabel={t('settings.legal.openUserAgreement')}
+ accessibilityRole="link"
+ key="user-agreement"
+ label={t('settings.legal.userAgreement')}
+ onPress={openUserAgreement}
+ testID="settings.userAgreement"
+ value={t('settings.legal.view')}
+ />
+ {AUTH_REGION === 'cn' ? (
+ <InfoRow
+ key="app-filing-number"
+ label={t('settings.legal.appFilingNumber')}
+ testID="settings.appFilingNumber"
+ value="沪ICP备11033765号-89A"
/>
+ ) : null}
+ <SettingsSwitchRow
+ accessibilityLabel={t('settings.legal.analytics')}
+ disabled={analyticsBusy || !analyticsReady}
+ key="analytics-toggle"
+ label={t('settings.legal.analytics')}
+ onValueChange={() => void toggleAnalytics()}
+ switchTestID="settings.analyticsToggle"
+ testID="settings.analyticsToggleRow"
+ value={analyticsEnabled}
+ />
+ {analyticsCustomized ? (
<ActionInfoRow
- accessibilityLabel={t('settings.legal.openUserAgreement')}
- accessibilityRole="link"
- key="user-agreement"
- label={t('settings.legal.userAgreement')}
- onPress={openUserAgreement}
- testID="settings.userAgreement"
- value={t('settings.legal.view')}
+ accessibilityLabel={t('settings.legal.analyticsReset')}
+ chevron={false}
+ key="analytics-reset"
+ label={t('settings.legal.analyticsReset')}
+ onPress={() => void resetAnalytics()}
+ testID="settings.analyticsReset"
+ value={t('settings.legal.analyticsResetAction')}
/>
- {AUTH_REGION === 'cn' ? (
- <InfoRow
- key="app-filing-number"
- label={t('settings.legal.appFilingNumber')}
- testID="settings.appFilingNumber"
- value="沪ICP备11033765号-89A"
- />
- ) : null}
- </SettingsGroup>
-
- {/* 账号操作:退出保持明确(先确认);注销账号仅保留低调的次要文字入口。 */}
- <DisclosureItem style={styles.dangerArea} testID="settings.accountActions">
- <Text style={styles.dangerHint}>
- {t('settings.account.logoutHint')}
- </Text>
- <MainWindowActionGroup
- dangerActions={[
- {
- accessibilityLabel: loggingOut ? t('settings.account.loggingOutAccessibility') : t('settings.account.logout'),
- busy: loggingOut,
- label: t('settings.account.logout'),
- onPress: requestLogout,
- testID: 'settings.logoutButton',
- tone: 'danger',
- },
+ ) : null}
+ </SettingsGroup>
+
+ {/* 开发者:Debug 日志、Beta 渠道、标识与更新信息在二级页,按用途分组。 */}
+ <SettingsGroup testID="settings.debugGroup">
+ <ActionInfoRow
+ accessibilityLabel={t('settings.developer.title')}
+ key="developer"
+ label={t('settings.developer.title')}
+ onPress={openDeveloperSettings}
+ testID="settings.developerRow"
+ />
+ </SettingsGroup>
+
+ {/* 账号操作:退出保持明确(先确认),说明写在按钮下方;注销账号仅保留低调的次要文字入口。 */}
+ <View style={styles.dangerArea} testID="settings.accountActions">
+ <MainWindowActionGroup
+ dangerActions={[
+ {
+ accessibilityLabel: loggingOut ? t('settings.account.loggingOutAccessibility') : t('settings.account.logout'),
+ busy: loggingOut,
+ label: t('settings.account.logout'),
+ onPress: requestLogout,
+ testID: 'settings.logoutButton',
+ tone: 'danger',
+ },
+ ]}
+ testID="settings.logoutActions"
+ />
+ <Text style={styles.dangerHint}>
+ {t('settings.account.logoutHint')}
+ </Text>
+ {accountDeletionAvailable ? (
+ <Pressable
+ accessibilityLabel={loginText('accountDeletionSettingsAction')}
+ accessibilityRole="button"
+ onPress={openAccountDeletion}
+ style={({ pressed }) => [
+ styles.accountDeletionLink,
+ pressed && styles.pressed,
]}
- testID="settings.logoutActions"
- />
- {accountDeletionAvailable ? (
- <Pressable
- accessibilityLabel={loginText('accountDeletionSettingsAction')}
- accessibilityRole="button"
- onPress={openAccountDeletion}
- style={({ pressed }) => [
- styles.accountDeletionLink,
- pressed && styles.pressed,
- ]}
- testID="settings.deleteAccountButton"
- >
- <Text style={styles.accountDeletionLinkText}>
- {loginText('accountDeletionSettingsAction')}
- </Text>
- </Pressable>
- ) : null}
- </DisclosureItem>
- </ListDisclosureScope>
+ testID="settings.deleteAccountButton"
+ >
+ <Text style={styles.accountDeletionLinkText}>
+ {loginText('accountDeletionSettingsAction')}
+ </Text>
+ </Pressable>
+ ) : null}
+ </View>
</ScrollView>
<SheetModal
backdropTestID="settings.appearancePicker.backdrop"
@@ -1259,42 +924,6 @@ export default function SettingsScreen() {
);
}
-/** 可复制行(长 ID / URL):标签 + 值堆叠在左,复制按钮在右。 */
-function CopyRow({
- copied,
- onCopy,
- row,
-}: {
- copied: boolean;
- onCopy(row: MobileSettingsRow): void;
- row: MobileSettingsRow;
-}) {
- const styles = useThemedStyles(makeStyles);
- const { t } = useTranslation();
- return (
- <View style={styles.copyRow} testID={`settings.row.${row.id}`}>
- <View style={styles.copyText}>
- <Text style={styles.copyLabel}>{row.label}</Text>
- <Text selectable style={styles.copyValue} numberOfLines={2}>{row.value}</Text>
- </View>
- {row.copyValue ? (
- // 自守卫:没有 copyValue 就不渲染复制按钮,避免出现"按了没反应"的死按钮
- // (调用方虽已先判断,但组件自身也要自洽)。
- <MainWindowActionButton
- action={{
- accessibilityLabel: t('settings.copyRow.accessibility', { label: row.label }),
- label: copied ? t('settings.copyRow.done') : t('settings.copyRow.action'),
- onPress: () => onCopy(row),
- testID: `settings.copy.${row.id}`,
- }}
- density="compact"
- style={styles.copyButton}
- />
- ) : null}
- </View>
- );
-}
-
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
safeArea: { backgroundColor: colors.surface, flex: 1 },
content: {
@@ -1316,20 +945,7 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
headerEmail: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
headerStatusRow: { alignItems: 'center', flexDirection: 'row', gap: spacing.xs },
headerStatusText: { color: colors.textSecondary, flex: 1, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, minWidth: 0 },
- localLogOptions: { minWidth: 44, minHeight: 44, alignItems: 'center', justifyContent: 'center' },
- // —— 版本行 ——
- versionRow: {
- alignItems: 'stretch',
- flexDirection: 'column',
- gap: spacing.md,
- minHeight: 60,
- paddingHorizontal: spacing.lg,
- paddingVertical: spacing.md,
- },
- versionTexts: { gap: spacing.xs, minWidth: 0 },
- versionValueRow: { alignItems: 'center', flexDirection: 'row', flexWrap: 'wrap', gap: spacing.sm },
- versionLabel: { color: colors.textPrimary, flexShrink: 1, fontSize: typeScale.body, fontWeight: fontWeight.medium, lineHeight: lineHeight.body },
- versionDetail: { color: colors.textSecondary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.caption },
+ // —— 版本 ——
betaChannelBadge: {
backgroundColor: colors.betaChannelBadgeBackground,
borderRadius: radius.pill,
@@ -1342,21 +958,6 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
lineHeight: lineHeight.micro,
fontWeight: fontWeight.semibold,
},
- versionButton: { alignSelf: 'flex-start', flexShrink: 0, maxWidth: '100%', paddingVertical: spacing.xs },
- versionButtonText: { textAlign: 'center' },
- // —— 可复制行 ——
- copyRow: {
- alignItems: 'center',
- flexDirection: 'row',
- gap: spacing.md,
- minHeight: 60,
- paddingHorizontal: spacing.lg,
- paddingVertical: spacing.md,
- },
- copyText: { flex: 1, gap: spacing.xs, minWidth: 0 },
- copyLabel: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.regular },
- copyValue: { color: colors.textPrimary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall },
- copyButton: { flexShrink: 0, minWidth: 60 },
// —— 退出 ——
dangerArea: { gap: spacing.md, paddingTop: spacing.sm },
dangerHint: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, paddingHorizontal: spacing.md },
diff --git a/apps/mobile/app/settings/developer.tsx b/apps/mobile/app/settings/developer.tsx
new file mode 100644
index 0000000000..97acf24b38
--- /dev/null
+++ b/apps/mobile/app/settings/developer.tsx
@@ -0,0 +1,437 @@
+import { useRouter } from 'expo-router';
+import * as Clipboard from 'expo-clipboard';
+import * as Updates from 'expo-updates';
+import { useUpdates } from 'expo-updates';
+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
+import { Alert, DevSettings, Platform, ScrollView, StyleSheet, View } from 'react-native';
+import { SafeAreaView } from 'react-native-safe-area-context';
+import { useTranslation } from 'react-i18next';
+import { Text } from '@/components/AppText';
+import { MainWindowActionButton } from '@/components/MobilePrimitives';
+import { getAnalyticsConsentState, hydrateAnalyticsConsent, subscribeAnalyticsConsent } from '@/analytics/analyticsConsentStore';
+import { useAuth } from '@/auth/AuthContext';
+import { AUTH_API_BASE_URL, AUTH_REGION } from '@/config/env';
+import {
+ DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED,
+ switchDevServerEnvironmentAndReload,
+ type DevServerEnvironment,
+} from '@/config/devServerEnvironment';
+import { useDevServerEnvironment } from '@/config/useDevServerEnvironment';
+import { diagnosticUploadConfigured, uploadMobileDiagnostics } from '@/debug/mobileDiagnosticUpload';
+import { clearDiagnostics, diagnosticsEnabled, exportDiagnostics, hydrateDiagnostics, setDiagnosticsEnabled } from '@/debug/localDiagnostics';
+import { SimpleStackHeader, simpleScrollInsetProps, simpleScrollScreenSafeAreaEdges } from '@/platform/chrome';
+import { ActionInfoRow, InfoRow, SettingsGroup, SettingsSwitchRow } from '@/session/SettingsGroupRows';
+import { buildMobileDebugRows, type MobileSettingsRow } from '@/settings/mobileSettings';
+import { buildMobileUpdateInfoRows, currentMobileOtaVersion } from '@/settings/updateInfo';
+import { useThemedStyles, type ThemeColors } from '@/theme';
+import { fontWeight, lineHeight, spacing, typeScale } from '@/theme/tokens';
+import { probeBetaChannel } from '@/update/fetchLatestRelease';
+import { useBetaChannel } from '@/update/useBetaChannel';
+import { goBackGuarded } from '@/utils/backGuard';
+
+/**
+ * 设置的二级页「开发者」:原先折叠在设置页底部的调试 / 开发者分组。
+ *
+ * 按用途分组,每组一段 footer 说明(iOS Section footer):Debug 日志、Beta 测试渠道、
+ * 服务器环境(仅 CindyDev)、标识信息、更新信息。卡片里不放成句说明。
+ */
+export default function DeveloperSettingsScreen() {
+ const router = useRouter();
+ const styles = useThemedStyles(makeStyles);
+ const { t } = useTranslation();
+ const auth = useAuth();
+
+ // —— Debug 日志 ——
+ const [localLogsEnabled, setLocalLogsEnabled] = useState(false);
+ const [localLogsReady, setLocalLogsReady] = useState(false);
+ const [localLogsBusy, setLocalLogsBusy] = useState(false);
+ const [localLogsConsent, setLocalLogsConsent] = useState(false);
+ const [localLogUploadMessage, setLocalLogUploadMessage] = useState<string | null>(null);
+ const localLogsLock = useRef(false);
+ useEffect(() => {
+ let mounted = true;
+ void hydrateDiagnostics().then(() => {
+ if (mounted) {
+ setLocalLogsEnabled(diagnosticsEnabled());
+ setLocalLogsReady(true);
+ }
+ });
+ return () => {
+ mounted = false;
+ };
+ }, []);
+ // 上传日志沿用隐私政策同意事实;store 是本机唯一真相,订阅以免设置页改动后本页陈旧。
+ useEffect(() => {
+ let cancelled = false;
+ const sync = () => {
+ if (!cancelled) setLocalLogsConsent(getAnalyticsConsentState().consent);
+ };
+ void hydrateAnalyticsConsent().then(sync).catch(() => undefined);
+ const unsubscribe = subscribeAnalyticsConsent(sync);
+ return () => {
+ cancelled = true;
+ unsubscribe();
+ };
+ }, []);
+ const runLocalLogAction = async (action: () => Promise<void>) => {
+ if (localLogsLock.current) return;
+ localLogsLock.current = true;
+ setLocalLogsBusy(true);
+ try {
+ await action();
+ } catch {
+ Alert.alert(
+ t('settings.localLogs.title'),
+ t('settings.localLogs.failed'),
+ );
+ } finally {
+ setLocalLogsEnabled(diagnosticsEnabled());
+ setLocalLogsBusy(false);
+ localLogsLock.current = false;
+ }
+ };
+ const confirmClearLocalLogs = () => {
+ if (!localLogsReady || localLogsBusy) return;
+ Alert.alert(t('settings.localLogs.clear'), t('settings.localLogs.clearHint'), [
+ { text: t('settings.localLogs.cancel'), style: 'cancel' },
+ { text: t('settings.localLogs.clear'), style: 'destructive', onPress: () => void runLocalLogAction(clearDiagnostics) },
+ ]);
+ };
+ const uploadLocalLogs = () =>
+ void runLocalLogAction(async () => {
+ const result = await uploadMobileDiagnostics();
+ if (result.kind === 'uploaded') {
+ let copied = false;
+ try { await Clipboard.setStringAsync(result.uploadCode); copied = true; } catch { /* upload already succeeded */ }
+ setLocalLogUploadMessage(t(copied ? 'settings.localLogs.uploadCopied' : 'settings.localLogs.uploadSucceeded', { code: result.uploadCode }));
+ } else setLocalLogUploadMessage(t(`settings.localLogs.uploadResult.${result.kind}`));
+ });
+ const uploadConfigured = diagnosticUploadConfigured();
+ // 上传不可用的原因、上传结果都接在本组说明后面,不写进行里。
+ const localLogsStatus = !uploadConfigured
+ ? t('settings.localLogs.uploadResult.unavailable')
+ : !localLogsConsent ? t('settings.localLogs.uploadResult.consentRequired')
+ : localLogUploadMessage;
+
+ // —— Beta 测试渠道 ——
+ // 落盘即时生效,但 manifest 通道只在下次冷启动/后台轮询切换;打开后引导用户手动重启。
+ const { enabled: betaEnabled, ready: betaReady, setEnabled: setBetaEnabled } = useBetaChannel();
+ const [betaBusy, setBetaBusy] = useState(false);
+ const toggleBeta = useCallback(async () => {
+ if (betaBusy) return;
+ setBetaBusy(true);
+ const next = !betaEnabled;
+ try {
+ if (next) {
+ // 打开 beta 前预检(与桌面端 probeBetaManifest 对称):探测 /latest?channel=beta
+ // 是否可达。服务端未部署 beta 时拒绝开启,避免设备静默收不到 OTA/整包/强更记录。
+ const available = await probeBetaChannel(
+ Platform.OS === 'android' ? 'android' : 'ios',
+ );
+ if (!available) {
+ Alert.alert(t('settings.betaChannel.title'), t('settings.betaChannel.unavailable'));
+ return; // 不落盘,开关保持关闭
+ }
+ }
+ await setBetaEnabled(next);
+ if (next) {
+ Alert.alert(
+ t('settings.betaChannel.title'),
+ t('settings.betaChannel.restartHint'),
+ [{ text: t('settings.betaChannel.ok'), style: 'default' }],
+ );
+ }
+ } catch {
+ // 只可能是本机存储异常;store 会回推真值,这里仅提示未保存成功。
+ Alert.alert(t('settings.betaChannel.title'), t('settings.betaChannel.saveFailed'));
+ } finally {
+ setBetaBusy(false);
+ }
+ }, [betaBusy, betaEnabled, setBetaEnabled, t]);
+
+ // —— 服务器环境(仅 CindyDev) ——
+ const {
+ environment: devServerEnvironment,
+ ready: devServerEnvironmentReady,
+ setEnvironment: setDevServerEnvironment,
+ } = useDevServerEnvironment();
+ const [devServerEnvironmentBusy, setDevServerEnvironmentBusy] = useState(false);
+ const switchDevServerEnvironment = useCallback(
+ async (next: DevServerEnvironment) => {
+ if (
+ !DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED ||
+ devServerEnvironmentBusy ||
+ !devServerEnvironmentReady ||
+ next === devServerEnvironment
+ ) {
+ return;
+ }
+ const reload = __DEV__
+ ? () => DevSettings.reload()
+ : Updates.isEnabled
+ ? () => Updates.reloadAsync()
+ : null;
+ if (!reload) {
+ Alert.alert(
+ t('settings.devServerEnvironment.title'),
+ t('settings.devServerEnvironment.switchFailed'),
+ );
+ return;
+ }
+ setDevServerEnvironmentBusy(true);
+ try {
+ // 旧环境的 push 注销、token 与账号缓存必须先在旧端点仍生效时清理。
+ await auth.logout();
+ await switchDevServerEnvironmentAndReload({
+ current: devServerEnvironment,
+ next,
+ reload,
+ setEnvironment: setDevServerEnvironment,
+ });
+ } catch {
+ Alert.alert(
+ t('settings.devServerEnvironment.title'),
+ t('settings.devServerEnvironment.switchFailed'),
+ );
+ } finally {
+ setDevServerEnvironmentBusy(false);
+ }
+ },
+ [
+ auth,
+ devServerEnvironment,
+ devServerEnvironmentBusy,
+ devServerEnvironmentReady,
+ setDevServerEnvironment,
+ t,
+ ],
+ );
+ const confirmDevServerEnvironmentSwitch = useCallback(() => {
+ if (
+ !DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED ||
+ devServerEnvironmentBusy ||
+ !devServerEnvironmentReady
+ ) {
+ return;
+ }
+ const next: DevServerEnvironment =
+ devServerEnvironment === 'dev' ? 'release' : 'dev';
+ Alert.alert(
+ t('settings.devServerEnvironment.confirmTitle', {
+ environment: t(`settings.devServerEnvironment.options.${next}`),
+ }),
+ t('settings.devServerEnvironment.confirmBody'),
+ [
+ { text: t('settings.devServerEnvironment.cancel'), style: 'cancel' },
+ {
+ text: t('settings.devServerEnvironment.switchAction'),
+ style: 'destructive',
+ onPress: () => void switchDevServerEnvironment(next),
+ },
+ ],
+ );
+ }, [
+ devServerEnvironment,
+ devServerEnvironmentBusy,
+ devServerEnvironmentReady,
+ switchDevServerEnvironment,
+ t,
+ ]);
+
+ // —— 标识信息 / 更新信息 ——
+ // t 依赖:行构造走 i18n.t,语言切换时重算。
+ const identityRows = useMemo(
+ () => buildMobileDebugRows({
+ authBaseUrl: AUTH_API_BASE_URL,
+ authRegion: AUTH_REGION,
+ deviceId: auth.deviceId,
+ userId: auth.user?.id,
+ }),
+ [auth.deviceId, auth.user?.id, t],
+ );
+ const [copiedRowId, setCopiedRowId] = useState<string | null>(null);
+ const copyRow = useCallback(async (row: MobileSettingsRow) => {
+ if (!row.copyValue) return;
+ await Clipboard.setStringAsync(row.copyValue);
+ setCopiedRowId(row.id);
+ }, []);
+ // 当前运行的 OTA bundle 信息(只读),用于核验热更是否生效。
+ const { currentlyRunning } = useUpdates();
+ const updateInfoRows = useMemo(() => buildMobileUpdateInfoRows(currentlyRunning), [currentlyRunning, t]);
+ const otaVersion = useMemo(() => currentMobileOtaVersion(currentlyRunning), [currentlyRunning, t]);
+
+ const localLogsDisabled = !localLogsReady || localLogsBusy;
+
+ return (
+ <SafeAreaView edges={simpleScrollScreenSafeAreaEdges()} style={styles.safeArea} testID="settings.developer.screen">
+ <SimpleStackHeader
+ scrollEdge
+ backTestID="settings.developer.backButton"
+ onBack={() => goBackGuarded(router, '/settings')}
+ title={t('settings.developer.title')}
+ />
+ <ScrollView {...simpleScrollInsetProps} contentContainerStyle={styles.content} testID="settings.developer.scroll">
+ <SettingsGroup
+ footer={t('settings.localLogs.footer')}
+ messages={[localLogsStatus ? { text: localLogsStatus, testID: 'settings.localLogs.status' } : null]}
+ title={t('settings.localLogs.title')}
+ >
+ <SettingsSwitchRow
+ accessibilityLabel={t('settings.localLogs.record')}
+ disabled={localLogsDisabled}
+ key="local-logs-toggle"
+ label={t('settings.localLogs.record')}
+ onValueChange={(value) =>
+ void runLocalLogAction(() =>
+ setDiagnosticsEnabled(value),
+ )
+ }
+ testID="settings.localLogs"
+ value={localLogsEnabled}
+ />
+ <ActionInfoRow
+ accessibilityLabel={t('settings.localLogs.export')}
+ disabled={localLogsDisabled}
+ key="local-logs-export"
+ label={t('settings.localLogs.export')}
+ onPress={() => void runLocalLogAction(exportDiagnostics)}
+ testID="settings.localLogs.export"
+ value={localLogsBusy ? t('settings.localLogs.busy') : ''}
+ />
+ <ActionInfoRow
+ accessibilityLabel={t('settings.localLogs.upload')}
+ chevron={false}
+ disabled={localLogsDisabled || !uploadConfigured || !localLogsConsent}
+ key="local-logs-upload"
+ label={t('settings.localLogs.upload')}
+ onPress={uploadLocalLogs}
+ testID="settings.localLogs.upload"
+ value={localLogsBusy ? t('settings.localLogs.busy') : ''}
+ />
+ <ActionInfoRow
+ accessibilityLabel={t('settings.localLogs.clear')}
+ chevron={false}
+ disabled={localLogsDisabled}
+ key="local-logs-clear"
+ label={t('settings.localLogs.clear')}
+ onPress={confirmClearLocalLogs}
+ testID="settings.localLogs.clear"
+ />
+ </SettingsGroup>
+
+ <SettingsGroup
+ footer={t('settings.betaChannel.description')}
+ title={t('settings.betaChannel.title')}
+ >
+ <SettingsSwitchRow
+ accessibilityLabel={t('settings.betaChannel.title')}
+ disabled={betaBusy || !betaReady}
+ label={t('settings.betaChannel.title')}
+ onValueChange={() => void toggleBeta()}
+ switchTestID="settings.betaChannelToggle"
+ testID="settings.betaChannelToggleRow"
+ value={betaEnabled}
+ />
+ </SettingsGroup>
+
+ {DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED ? (
+ <SettingsGroup
+ footer={t('settings.devServerEnvironment.description')}
+ title={t('settings.devServerEnvironment.title')}
+ >
+ <ActionInfoRow
+ accessibilityLabel={t('settings.devServerEnvironment.accessibility')}
+ label={t('settings.devServerEnvironment.title')}
+ onPress={confirmDevServerEnvironmentSwitch}
+ testID="settings.devServerEnvironment"
+ value={
+ devServerEnvironmentBusy
+ ? t('settings.devServerEnvironment.switching')
+ : t(`settings.devServerEnvironment.options.${devServerEnvironment}`)
+ }
+ />
+ </SettingsGroup>
+ ) : null}
+
+ <SettingsGroup title={t('settings.developer.identity')}>
+ {identityRows.map((row) => (
+ row.copyValue ? (
+ <CopyRow copied={copiedRowId === row.id} key={row.id} onCopy={copyRow} row={row} />
+ ) : (
+ <InfoRow key={row.id} label={row.label} testID={`settings.row.${row.id}`} value={row.value} />
+ )
+ ))}
+ </SettingsGroup>
+
+ <SettingsGroup title={t('settings.developer.updateInfo')}>
+ <InfoRow
+ key="ota-version"
+ label={t('settings.updateInfo.otaVersion')}
+ testID="settings.otaVersion"
+ value={otaVersion}
+ />
+ {updateInfoRows.map((row) => (
+ <InfoRow key={row.id} label={row.label} testID={`settings.updateInfo.${row.id}`} value={row.value} />
+ ))}
+ </SettingsGroup>
+ </ScrollView>
+ </SafeAreaView>
+ );
+}
+
+/** 可复制行(长 ID / URL):标签 + 值堆叠在左,复制按钮在右。 */
+function CopyRow({
+ copied,
+ onCopy,
+ row,
+}: {
+ copied: boolean;
+ onCopy(row: MobileSettingsRow): void;
+ row: MobileSettingsRow;
+}) {
+ const styles = useThemedStyles(makeStyles);
+ const { t } = useTranslation();
+ return (
+ <View style={styles.copyRow} testID={`settings.row.${row.id}`}>
+ <View style={styles.copyText}>
+ <Text style={styles.copyLabel}>{row.label}</Text>
+ <Text selectable style={styles.copyValue} numberOfLines={2}>{row.value}</Text>
+ </View>
+ {row.copyValue ? (
+ // 自守卫:没有 copyValue 就不渲染复制按钮,避免出现"按了没反应"的死按钮。
+ <MainWindowActionButton
+ action={{
+ accessibilityLabel: t('settings.copyRow.accessibility', { label: row.label }),
+ label: copied ? t('settings.copyRow.done') : t('settings.copyRow.action'),
+ onPress: () => onCopy(row),
+ testID: `settings.copy.${row.id}`,
+ }}
+ density="compact"
+ style={styles.copyButton}
+ />
+ ) : null}
+ </View>
+ );
+}
+
+const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ safeArea: { backgroundColor: colors.surface, flex: 1 },
+ content: {
+ gap: spacing.xl,
+ paddingBottom: spacing.xxl,
+ paddingHorizontal: spacing.lg,
+ paddingTop: spacing.lg,
+ },
+ copyRow: {
+ alignItems: 'center',
+ flexDirection: 'row',
+ gap: spacing.md,
+ minHeight: 60,
+ paddingHorizontal: spacing.lg,
+ paddingVertical: spacing.md,
+ },
+ copyText: { flex: 1, gap: spacing.xs, minWidth: 0 },
+ copyLabel: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.regular },
+ copyValue: { color: colors.textPrimary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall },
+ copyButton: { flexShrink: 0, minWidth: 60 },
+});
diff --git a/apps/mobile/app/settings/voice-speaker-filter.tsx b/apps/mobile/app/settings/voice-speaker-filter.tsx
index f60b19a5a9..7dec48236b 100644
--- a/apps/mobile/app/settings/voice-speaker-filter.tsx
+++ b/apps/mobile/app/settings/voice-speaker-filter.tsx
@@ -266,14 +266,6 @@ export function VoiceSpeakerFilterScreen({ services = liveServices }: { services
);
const enrollmentRows: ReactNode[] = [
- <View key="description" style={rowStyles.row}>
- <Text style={rowStyles.rowDetail}>
- {t('settings.voiceSpeakerFilter.enroll.description', {
- clips: SPEAKER_ENROLLMENT_CLIP_COUNT,
- seconds: CLIP_SECONDS,
- })}
- </Text>
- </View>,
<View key="reader" style={[rowStyles.row, styles.reader]}>
<View style={styles.steps}>
{CLIP_INDEXES.map((index) => {
@@ -354,19 +346,25 @@ export function VoiceSpeakerFilterScreen({ services = liveServices }: { services
/>,
];
+ // 录入时说明写在分组下方;未录入时提示「录入后才生效」,已录入时录入日期作为行右侧取值。
+ const profileFooter = enrolling
+ ? t('settings.voiceSpeakerFilter.enroll.description', {
+ clips: SPEAKER_ENROLLMENT_CLIP_COUNT,
+ seconds: CLIP_SECONDS,
+ })
+ : state.enrolled ? null : t('settings.voiceSpeakerFilter.profile.missingHint');
const profileRows: ReactNode[] = [
<InfoRow
key="status"
- detail={state.enrolled && state.enrolledAt
- ? t('settings.voiceSpeakerFilter.profile.enrolledAt', {
- date: new Date(state.enrolledAt).toLocaleDateString(),
- })
- : t('settings.voiceSpeakerFilter.profile.missingHint')}
label={t(state.enrolled
? 'settings.voiceSpeakerFilter.profile.enrolled'
: 'settings.voiceSpeakerFilter.profile.missing')}
testID="settings.voiceSpeakerFilter.profile.status"
- value=""
+ value={state.enrolled && state.enrolledAt
+ ? t('settings.voiceSpeakerFilter.profile.enrolledAt', {
+ date: new Date(state.enrolledAt).toLocaleDateString(),
+ })
+ : ''}
/>,
<ActionInfoRow
key="enroll"
@@ -397,11 +395,10 @@ export function VoiceSpeakerFilterScreen({ services = liveServices }: { services
onScroll={(event) => { scrollOffset.current = event.nativeEvent.contentOffset.y; }}
scrollEventThrottle={16}
contentContainerStyle={styles.content} testID="settings.voiceSpeakerFilter.scroll">
- <SettingsGroup footer={t('settings.voiceSpeakerFilter.privacy')}>
+ <SettingsGroup footer={state.supported ? t('settings.voiceSpeakerFilter.hint') : t('settings.voiceSpeakerFilter.unsupported')}>
<SettingsSwitchRow
accessibilityLabel={t('settings.voiceSpeakerFilter.label')}
disabled={!state.supported || !state.hydrated || saving}
- hint={state.supported ? t('settings.voiceSpeakerFilter.hint') : t('settings.voiceSpeakerFilter.unsupported')}
label={t('settings.voiceSpeakerFilter.label')}
onValueChange={(value) => {
if (!value) {
@@ -419,7 +416,7 @@ export function VoiceSpeakerFilterScreen({ services = liveServices }: { services
{showDetails && !modelsReady ? <ModelGroup state={state} /> : null}
{showDetails && modelsReady ? (
- <SettingsGroup title={t('settings.voiceSpeakerFilter.profile.title')}>
+ <SettingsGroup footer={profileFooter} title={t('settings.voiceSpeakerFilter.profile.title')}>
{enrolling ? enrollmentRows : profileRows}
</SettingsGroup>
) : null}
@@ -467,17 +464,20 @@ export function VoiceSpeakerFilterScreen({ services = liveServices }: { services
function ModelGroup({ state }: { state: MobileSpeakerFilterSnapshot }) {
const { t } = useTranslation();
- const rowStyles = useSettingsRowStyles();
const total = formatMegabytes(state.totalBytes);
+ // 下载进度、所需大小与失败原因都写在分组下方;卡片里只留可点的动作行。
if (state.modelState === 'downloading') {
return (
- <SettingsGroup title={t('settings.voiceSpeakerFilter.model.title')}>
+ <SettingsGroup
+ footer={t('settings.voiceSpeakerFilter.model.downloading', {
+ done: formatMegabytes(state.downloadedBytes),
+ total,
+ })}
+ title={t('settings.voiceSpeakerFilter.model.title')}
+ >
<ActionInfoRow
accessibilityLabel={t('settings.voiceSpeakerFilter.model.cancel')}
- detail={t('settings.voiceSpeakerFilter.model.downloading', {
- done: formatMegabytes(state.downloadedBytes),
- total,
- })}
+ chevron={false}
label={t('settings.voiceSpeakerFilter.model.cancel')}
onPress={cancelMobileSpeakerModelDownload}
testID="settings.voiceSpeakerFilter.model.cancel"
@@ -487,26 +487,22 @@ function ModelGroup({ state }: { state: MobileSpeakerFilterSnapshot }) {
}
const failed = state.modelState === 'failed';
return (
- <SettingsGroup title={t('settings.voiceSpeakerFilter.model.title')}>
- {[
- failed ? (
- <View key="error" style={rowStyles.row}>
- <Text accessibilityRole="alert" style={rowStyles.rowDetail}>
- {t(`settings.voiceSpeakerFilter.model.failed.${state.downloadError ?? 'network'}`)}
- </Text>
- </View>
- ) : null,
- <ActionInfoRow
- key="download"
- accessibilityLabel={t(failed ? 'settings.voiceSpeakerFilter.model.retry' : 'settings.voiceSpeakerFilter.model.download')}
- detail={failed ? undefined : t('settings.voiceSpeakerFilter.model.needed', { size: total })}
- label={t(failed ? 'settings.voiceSpeakerFilter.model.retry' : 'settings.voiceSpeakerFilter.model.download')}
- onPress={() => {
- void downloadMobileSpeakerModels();
- }}
- testID="settings.voiceSpeakerFilter.model.download"
- />,
- ]}
+ <SettingsGroup
+ footer={failed
+ ? t(`settings.voiceSpeakerFilter.model.failed.${state.downloadError ?? 'network'}`)
+ : t('settings.voiceSpeakerFilter.model.needed', { size: total })}
+ footerTestID="settings.voiceSpeakerFilter.model.footer"
+ title={t('settings.voiceSpeakerFilter.model.title')}
+ >
+ <ActionInfoRow
+ accessibilityLabel={t(failed ? 'settings.voiceSpeakerFilter.model.retry' : 'settings.voiceSpeakerFilter.model.download')}
+ chevron={false}
+ label={t(failed ? 'settings.voiceSpeakerFilter.model.retry' : 'settings.voiceSpeakerFilter.model.download')}
+ onPress={() => {
+ void downloadMobileSpeakerModels();
+ }}
+ testID="settings.voiceSpeakerFilter.model.download"
+ />
</SettingsGroup>
);
}
diff --git a/apps/mobile/docs/mobile-design-guide.md b/apps/mobile/docs/mobile-design-guide.md
index 379ac2912a..85d41b68a1 100644
--- a/apps/mobile/docs/mobile-design-guide.md
+++ b/apps/mobile/docs/mobile-design-guide.md
@@ -190,6 +190,16 @@
文本 / 卡片 / 分隔线目前仍在各屏重复定义——这是已知优化点(见执行计划),新代码尽量收敛、不要再新增一份同义样式。
+### 设置类分组:说明文字写在卡片外(2026-10-19 用户定稿)
+
+设置页及其二级页统一用 `src/session/SettingsGroupRows.tsx` 的 `SettingsGroup`。对齐 iOS Section footer / Android 列表辅助文字:
+
+- **卡片里只放「名称 + 取值 / 开关 / 箭头」**。成句的说明写在分组下方的 `footer`(13/18 400 `textSecondary`);操作结果、权限被拒、保存失败等临时提示走 `messages`,接在说明后面。行组件不提供 `hint` / `detail`。
+- **一组只配一段说明**。同组几行各需说明时拆成几个分组。
+- **点不了的入口不摆出来**:检查更新等当前不可用的动作直接不显示,原因写进 footer,不留灰按钮加解释。
+- 原地执行的动作行(检查更新、清空日志)传 `chevron={false}`,只有进入子页 / 外链的行画箭头。
+- 例外:列表条目自身的元数据(如词典别名)和录入流程里紧贴控件的步骤状态,可以留在行内。
+
### 主题接入模式(强制)
样式随主题变化,**不能再用模块级静态 `StyleSheet.create`**。统一两种写法:
diff --git a/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.ts b/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.ts
index fc18103d84..8bd1cb5a76 100644
--- a/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.ts
+++ b/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.ts
@@ -167,13 +167,12 @@ describe("Android home chrome menus follow the iOS pull-down", () => {
expect(push).toHaveBeenCalledTimes(2);
});
- it("routes settings pickers and local-log options through the pull-down on Android", () => {
+ it("routes settings pickers through the pull-down on Android", () => {
const settings = readSource("app/settings.tsx");
// 只按 MenuView 是否可用分流,不按平台:Android 与 iOS 同走系统下拉,自绘 sheet / Alert 仅作回退。
expect(settings).not.toMatch(/Platform\.OS\s*===\s*['"]ios['"]/);
expect(settings).toContain("onPress={usesNativePullDownMenu() ? () => undefined : openAppearancePicker}");
expect(settings).toContain("onPress={usesNativePullDownMenu() ? () => undefined : openLanguagePicker}");
- expect(settings).toContain("onPress={usesNativePullDownMenu() ? undefined : () => Alert.alert(t('settings.localLogs.options')");
- expect(settings.match(/<NativePullDownMenu/g)).toHaveLength(3);
+ expect(settings.match(/<NativePullDownMenu/g)).toHaveLength(2);
});
});
diff --git a/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts b/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts
index 8b02433fbf..322c146242 100644
--- a/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts
+++ b/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts
@@ -200,7 +200,8 @@ describe("iOS chrome presenters stay on the system menu path", () => {
expect(settings).toContain(
"accessibilityLabel={t('settings.notifications.taskDone')}",
);
- expect(settings).toContain(
+ // Beta 渠道开关在二级页「开发者」。
+ expect(readFileSync(resolve(process.cwd(), "app/settings/developer.tsx"), "utf8")).toContain(
"accessibilityLabel={t('settings.betaChannel.title')}",
);
expect(settings).toContain(
diff --git a/apps/mobile/src/__tests__/mobileNativeBoundaryContracts.test.ts b/apps/mobile/src/__tests__/mobileNativeBoundaryContracts.test.ts
index bd96e06700..6a9a6d1907 100644
--- a/apps/mobile/src/__tests__/mobileNativeBoundaryContracts.test.ts
+++ b/apps/mobile/src/__tests__/mobileNativeBoundaryContracts.test.ts
@@ -276,7 +276,7 @@ const settings = readFileSync(resolve(process.cwd(), 'app/settings.tsx'), 'utf8'
expect(settings).toContain('isGooglePlayInstallation: playManagedUpdates,');
expect(settings).toContain('checkBundleUpdate: bundleCheckEnabled ? checkBundleUpdate : undefined,');
expect(settings).toContain('const updateCheckEnabled = bundleCheckEnabled || updatesEnabled;');
-expect(settings).toContain("t('settings.version.googlePlayContentUpdateUnavailable')");
+expect(settings).toContain("t('settings.version.googlePlayUpdateManaged')");
});
// guard: native persistent history hosts must wrap routes and replace route prefetch ownership.
diff --git a/apps/mobile/src/__tests__/mobileSettings.test.ts b/apps/mobile/src/__tests__/mobileSettings.test.ts
index 9a05f287fd..d8175cebb3 100644
--- a/apps/mobile/src/__tests__/mobileSettings.test.ts
+++ b/apps/mobile/src/__tests__/mobileSettings.test.ts
@@ -40,26 +40,30 @@ describe('mobile settings overview', () => {
expect(source).not.toContain('LanguageOptionRow');
});
- it('keeps Android debug disclosure synchronous so repeated toggles cannot retain exiting rows', () => {
- const source = readTextLf(resolve(process.cwd(), 'app/settings.tsx'), 'utf8');
+ it('moves debug tools to the developer sub-page and keeps setting descriptions in group footers', () => {
+ const settings = readTextLf(resolve(process.cwd(), 'app/settings.tsx'), 'utf8');
+ const developer = readTextLf(resolve(process.cwd(), 'app/settings/developer.tsx'), 'utf8');
+ const rows = readTextLf(resolve(process.cwd(), 'src/session/SettingsGroupRows.tsx'), 'utf8');
- expect(source).toContain("const debugDisclosureMotionEnabled = Platform.OS !== 'android';");
- expect(source).toContain([
- 'useListDisclosureTransition({',
- ' motionEnabled: debugDisclosureMotionEnabled,',
- ' })',
- ].join('\n'));
- expect(source).toContain([
- '<ListDisclosureScope',
- ' controller={debugDisclosure.controller}',
- ' motionEnabled={debugDisclosureMotionEnabled}',
- ].join('\n'));
- expect(source).toContain('runDebugDisclosure(() => setDebugExpanded((value) => !value));');
+ expect(settings).toContain("push('/settings/developer')");
+ expect(settings).toContain('testID="settings.developerRow"');
+ expect(settings).not.toContain('settings.localLogs');
+ expect(settings).not.toContain('SettingsDisclosureRow');
+ expect(developer).toContain('testID="settings.developer.screen"');
+ expect(developer).toContain("footer={t('settings.localLogs.footer')}");
+ expect(developer).toContain('testID="settings.localLogs.clear"');
+ expect(developer).toContain('testID="settings.betaChannelToggleRow"');
+ expect(developer).toContain('testID="settings.otaVersion"');
+ // 行组件不再接受行内说明:成句说明与提示只能走 SettingsGroup 的 footer / messages。
+ expect(rows).not.toMatch(/\bhint\?: string/);
+ expect(rows).not.toMatch(/\bdetail\?: string/);
+ expect(settings).not.toMatch(/\b(hint|detail)=\{/);
+ expect(developer).not.toMatch(/\b(hint|detail)=\{/);
});
it('shows the server switch only in CindyDev and clears the old session before reloading', () => {
const settingsSource = readTextLf(
- resolve(process.cwd(), 'app/settings.tsx'),
+ resolve(process.cwd(), 'app/settings/developer.tsx'),
'utf8',
);
const environmentSource = readTextLf(
@@ -87,7 +91,7 @@ describe('mobile settings overview', () => {
);
expect(settingsSource).toContain(
- '...(DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED',
+ '{DEV_SERVER_ENVIRONMENT_SWITCH_ENABLED ? (',
);
expect(settingsSource).toContain(
'testID="settings.devServerEnvironment"',
@@ -136,12 +140,10 @@ describe('mobile settings overview', () => {
relayTone: 'ready',
});
expect(overview.sections.map((section) => section.id)).toEqual(['about', 'debug']);
- // 「调试 / 开发者」默认折叠,普通用户不直面。
- expect(overview.sections.find((section) => section.id === 'debug')?.collapsible).toBe(true);
- expect(overview.sections.find((section) => section.id === 'about')?.collapsible).toBeUndefined();
+ // 设备名称的说明是分组 footer,不在行内。
+ expect(overview.sections.find((section) => section.id === 'about')?.footer).toBe('显示在电脑的授权列表中');
expect(overview.sections.find((section) => section.id === 'about')?.rows).toContainEqual({
- detail: '显示在电脑的授权列表中',
id: 'about.deviceName',
label: '设备名称',
value: 'Carol iPhone',
@@ -284,7 +286,8 @@ describe('mobile settings overview', () => {
it('always shows privacy policy + user agreement (regional links via legalLinks) above the cn-only App filing number', () => {
const source = readTextLf(resolve(process.cwd(), 'app/settings.tsx'), 'utf8');
- const filingCardIndex = source.indexOf("<SettingsGroup title={t('settings.legal.sectionTitle')}>");
+ const filingCardIndex = source.indexOf("title={t('settings.legal.sectionTitle')}");
+ const analyticsRowIndex = source.indexOf('testID="settings.analyticsToggleRow"');
const privacyRowIndex = source.indexOf('testID="settings.privacyPolicy"');
const userAgreementRowIndex = source.indexOf('testID="settings.userAgreement"');
const regionGuardIndex = source.indexOf("{AUTH_REGION === 'cn' ? (", userAgreementRowIndex);
@@ -310,13 +313,16 @@ describe('mobile settings overview', () => {
expect(userAgreementRowIndex).toBeGreaterThan(privacyRowIndex);
expect(regionGuardIndex).toBeGreaterThan(userAgreementRowIndex);
expect(filingNumberIndex).toBeGreaterThan(regionGuardIndex);
- expect(accountActionsIndex).toBeGreaterThan(filingNumberIndex);
+ // 使用统计留在同一分组(合规:关闭入口可被找到),放组末让 footer 说明紧接开关。
+ expect(analyticsRowIndex).toBeGreaterThan(filingNumberIndex);
+ expect(source).toContain("footer={t('settings.legal.analyticsHint')}");
+ expect(accountActionsIndex).toBeGreaterThan(analyticsRowIndex);
});
it('keeps one update action, scopes TestFlight checks to OTA, and shows both versions', () => {
const source = readTextLf(resolve(process.cwd(), 'app/settings.tsx'), 'utf8');
- expect(source.match(/testID: 'settings\.checkUpdateButton'/g)).toHaveLength(1);
+ expect(source.match(/testID="settings\.checkUpdateButton"/g)).toHaveLength(1);
expect(source).not.toContain('settings.checkBundleUpdateButton');
expect(source).not.toContain('testID="settings.bundleUpdate"');
expect(source).toContain('runManualUpdateCheck({');
@@ -333,25 +339,22 @@ describe('mobile settings overview', () => {
expect(source).not.toContain('setUpdateMessage(');
expect(source).toContain("'settings.version.testFlightCheckAction'");
expect(source).toContain("'settings.version.testFlightCheckingAccessibility'");
- expect(source).toContain("testID=\"settings.testFlightUpdateHint\"");
- expect(source).toContain("{t('settings.version.testFlightUpdateManaged')}");
- // 版本卡片面向用户:「版本 x.y.z」+ 更新方式说明;热更版本等技术细节在调试分组。
- expect(source).toContain("{t('settings.version.appVersion', { version: appVersion })}");
- expect(source).toContain('testID="settings.updateMethod"');
- expect(source).toContain("tone: 'secondary',");
+ expect(source).toContain("? t('settings.version.testFlightUpdateManaged')");
+ // 版本分组面向用户:「当前版本 x.y.z」+ 检查行;更新方式与结果在分组 footer,
+ // 检查不可用时不显示检查行;热更版本等技术细节在二级页「开发者」。
+ expect(source).toContain("{t('settings.version.currentLabel')}");
+ expect(source).toContain('testID="settings.appVersion">{appVersion}</Text>');
+ expect(source).toContain('footerTestID="settings.updateMethod"');
+ expect(source).toContain('const showUpdateCheck = !REVIEW_MODE && updateCheckEnabled;');
expect(source).toContain('const showBetaBadge = betaReady && betaEnabled;');
expect(source).toContain('testID="settings.betaChannelBadge"');
expect(source).toContain("{t('settings.betaChannel.badge')}");
expect(source).toContain('backgroundColor: colors.betaChannelBadgeBackground');
expect(source).toContain('color: colors.betaChannelBadgeForeground');
- expect(source).toContain("label={t('settings.updateInfo.otaVersion')}");
- expect(source).toContain('testID="settings.otaVersion"');
- expect(source).toContain(
- "testID=\"settings.desktopVersion\">{t('settings.version.pairedDesktopVersion', { version: DESKTOP_PACKAGE_VERSION })}",
- );
+ expect(source).toContain("label={t('settings.version.pairedDesktopLabel')}");
+ expect(source).toContain('testID="settings.desktopVersion"');
expect(source).not.toContain("'settings.version.desktopVersion'");
- expect(i18n.t('settings.version.pairedDesktopVersion', { version: '0.1.18' }))
- .toBe('配套桌面版本 0.1.18');
+ expect(i18n.t('settings.version.pairedDesktopLabel')).toBe('配套桌面版本');
});
it('整包版本读原生真值 APP_BINARY_VERSION,不读会被 OTA 覆盖的 expoConfig.version', () => {
diff --git a/apps/mobile/src/i18n/locales/en/settings.json b/apps/mobile/src/i18n/locales/en/settings.json
index f441c123f7..00d76a9c35 100644
--- a/apps/mobile/src/i18n/locales/en/settings.json
+++ b/apps/mobile/src/i18n/locales/en/settings.json
@@ -1,7 +1,6 @@
{
"localLogs": {
"upload": "Upload logs",
- "uploadHint": "Send only filtered run records and app/system versions. Export for detailed debug logs.",
"uploadResult": {
"unavailable": "Log upload is unavailable in this build.",
"consentRequired": "Accept the Privacy Policy before uploading logs.",
@@ -9,18 +8,16 @@
"failed": "Upload failed. Logs are still saved on this phone."
},
"title": "Debug logs",
- "record": "Record debug logs",
- "hint": "Record phone connection, recovery, file preview and playback, scrolling, keyboard and performance details. Off by default; keeps up to 7 days and 8 MB. Never uploaded automatically.",
- "export": "Export debug logs",
+ "record": "Record logs",
+ "export": "Export logs",
"clear": "Clear logs",
"busy": "Working…",
"failed": "Unable to save or share logs. Please try again.",
"clearHint": "Delete the saved diagnostic logs?",
"cancel": "Cancel",
- "exportHint": "Share detailed local logs for troubleshooting. No conversation content or credentials.",
- "options": "Log options",
"uploadCopied": "Logs uploaded. Code {{code}} copied",
- "uploadSucceeded": "Logs uploaded. Code {{code}}"
+ "uploadSucceeded": "Logs uploaded. Code {{code}}",
+ "footer": "Logs stay on this phone for up to 7 days or 8 MB and are never uploaded automatically. Exported logs exclude conversation text and credentials; uploads send only filtered run records and version info."
},
"title": "Settings",
"appearance": {
@@ -47,8 +44,8 @@
"preview": "Message preview",
"sampleUser": "Help me organize today’s ideas.",
"sampleAssistant": "Sure, let’s work through your ideas together.",
- "hint": "Colors adjust to light and dark mode so text stays easy to read. Saved on this device only.",
- "customHint": "Drag along the color strip to choose a hue. Colors adjust to light and dark mode so text stays easy to read. Saved on this device only.",
+ "hint": "Adjusts for light and dark mode so text stays readable. Saved on this device only.",
+ "customHint": "Drag the color strip to pick a hue. Adjusts for light and dark mode; saved on this device only.",
"saveFailed": "The color is applied for now but could not be saved.",
"retry": "Retry",
"cancel": "Cancel",
@@ -71,35 +68,35 @@
},
"version": {
"sectionTitle": "Version",
- "appVersion": "Version {{version}}",
- "updateMethodInApp": "Updates: installed in the app, applied after a restart",
- "updateMethodPackage": "Updates: download and install the new version",
- "updateMethodUnavailable": "Development build; in-app updates aren’t available",
- "pairedDesktopVersion": "Matching desktop release {{version}}",
+ "updateMethodInApp": "Updates install in the app and apply after a restart.",
+ "updateMethodPackage": "Download and install the new version to update.",
+ "updateMethodUnavailable": "Development builds can’t update in the app.",
"checkAction": "Check for Updates",
"testFlightCheckAction": "Check for Content Updates",
"checking": "Checking",
"checkingAccessibility": "Checking for updates",
"testFlightCheckingAccessibility": "Checking for content updates",
- "testFlightUpdateManaged": "TestFlight manages test build updates",
- "testFlightNoContentUpdate": "No content updates are available. Check TestFlight for new test builds.",
- "testFlightContentUpdateUnavailable": "This build cannot check for content updates. Check TestFlight for new test builds.",
- "googlePlayUpdateManaged": "Google Play manages app version updates",
- "googlePlayNoContentUpdate": "No content updates are available. Check Google Play for new app versions.",
- "googlePlayContentUpdateUnavailable": "This build cannot check for content updates. Check Google Play for new app versions.",
+ "testFlightUpdateManaged": "Install new test builds from TestFlight.",
+ "testFlightNoContentUpdate": "No content update available.",
+ "testFlightContentUpdateUnavailable": "This build can’t check for content updates.",
+ "googlePlayUpdateManaged": "Update to new versions from Google Play.",
+ "googlePlayNoContentUpdate": "No content update available.",
+ "googlePlayContentUpdateUnavailable": "This build can’t check for content updates.",
"bundleUpdateFound": "App package update available",
"upToDate": "Already up to date",
- "bundleUpToDateNoOta": "App package is up to date; this version does not support OTA updates",
+ "bundleUpToDateNoOta": "Up to date. This version doesn’t support hot updates.",
"downloadedRestarting": "Update downloaded, restarting",
- "downloadedRestartRequired": "Update downloaded. Fully quit the app and reopen it to apply.",
+ "downloadedRestartRequired": "Update downloaded. Fully quit and reopen the app to apply it.",
"bundleCheckFailed": "Could not check for app package updates. Try again later.",
"checkFailedDetail": "Update check failed: {{detail}}",
- "checkFailed": "Update check failed. Try again later."
+ "checkFailed": "Update check failed. Try again later.",
+ "currentLabel": "Current version",
+ "pairedDesktopLabel": "Paired desktop version"
},
"betaChannel": {
"title": "Beta channel",
"badge": "Beta",
- "description": "Join the beta channel to receive upcoming client updates early.",
+ "description": "Get upcoming client updates early.",
"restartHint": "The beta channel takes effect after restarting the app. Please restart to apply.",
"ok": "Got it",
"saveFailed": "Failed to save beta channel setting",
@@ -108,9 +105,9 @@
"notifications": {
"sectionTitle": "Notifications",
"taskDone": "Task Completion Notifications",
- "taskDoneHint": "Get a push on this phone when a task on your computer finishes, fails, or needs your reply. Completion and reply alerts include the latest response.",
- "permissionDenied": "Notifications are turned off in system settings. Allow notifications in iOS Settings → Notifications → {{appName}}, then try again.",
- "unregisterQueued": "Turned off. Could not unregister on the current network; it will finish automatically next time you're online."
+ "taskDoneHint": "Get notified when a task on your computer finishes, fails, or needs your reply, with the latest response.",
+ "permissionDenied": "Notifications are off. Allow them in iOS Settings → Notifications → {{appName}}.",
+ "unregisterQueued": "Turned off. Unregistering will finish once you’re back online."
},
"about": {
"sectionTitle": "About This Phone",
@@ -182,7 +179,7 @@
"openUserAgreement": "Open the user agreement",
"appFilingNumber": "App Filing Number",
"analytics": "Usage statistics",
- "analyticsHint": "Helps us understand how often Cindy is launched and kept in use. Reports device and usage-environment information — such as your device model, OS version, app version, and a device identifier — plus, once signed in, your account ID; never conversations, files, or prompts.",
+ "analyticsHint": "Helps us understand launches and retention. Reports device info such as model, OS and app version, and a device identifier, plus your account ID once signed in; never conversations, files, or prompts.",
"analyticsSaveFailed": "Couldn't save this setting; it may revert after a restart.",
"analyticsReset": "Reset to default",
"analyticsResetAction": "Reset"
@@ -190,7 +187,7 @@
"account": {
"logoutConfirmTitle": "Sign out?",
"logoutConfirmRunning": "Some sessions are still running. They keep running on your computer, but this phone stops receiving and controlling them, and every account and local mirror saved on this phone is cleared.",
- "logoutHint": "Signing out clears every account saved on this phone and its local remote mirror. Sessions on your computer are not affected.",
+ "logoutHint": "Clears every account and the remote mirror on this phone. Sessions on your computer are not affected.",
"logout": "Sign Out",
"loggingOut": "Signing out",
"loggingOutAccessibility": "Signing out"
@@ -203,7 +200,7 @@
"voiceDictionary": {
"sectionTitle": "Voice dictionary",
"label": "View dictionary",
- "hint": "Your dictionary lives on your computers and syncs between them automatically. This is a read-only view — add or remove terms on a computer.",
+ "hint": "Edit the dictionary on a computer; it syncs automatically. Read-only on this phone.",
"openAccessibility": "View voice dictionary",
"screenTitle": "Voice dictionary",
"entryCount": "{{count}} terms",
@@ -225,12 +222,11 @@
"openAccessibility": "Open recognize my voice settings",
"on": "On",
"off": "Off",
- "hint": "Mutes other people during voice input so only what you say is transcribed. Requires a recorded voiceprint; speech that overlaps yours cannot be fully removed.",
+ "hint": "Mutes other people during voice input so only your speech is transcribed; speech overlapping yours can’t be fully removed. Your voiceprint is encrypted on this phone and never uploaded or synced.",
"unsupported": "This version of the app does not support voiceprints. Update to the latest version.",
- "privacy": "Your voiceprint stays on this phone, encrypted. It is never uploaded or synced to other devices.",
"model": {
"title": "Recognition model",
- "needed": "The first use downloads a recognition model of about {{size}}. Wi-Fi is recommended.",
+ "needed": "First use downloads a recognition model of about {{size}}. Wi-Fi recommended.",
"download": "Download recognition model",
"downloading": "Downloading ({{done}} / {{total}})",
"cancel": "Cancel download",
@@ -260,7 +256,7 @@
},
"strictness": {
"label": "Strictness",
- "hint": "Stricter lets fewer other voices through, but in noisy places it may also cut off more of your own words.",
+ "hint": "Stricter keeps out more voices but may also cut your own words in noisy places.",
"restoreDefault": "Restore default",
"options": {
"relaxed": "Relaxed",
@@ -318,5 +314,10 @@
"discardBody": "Your changes to the device name haven’t been saved.",
"discardConfirm": "Discard Changes",
"keepEditing": "Keep Editing"
+ },
+ "developer": {
+ "title": "Developer",
+ "identity": "Identifiers",
+ "updateInfo": "Update info"
}
}
diff --git a/apps/mobile/src/i18n/locales/ja/settings.json b/apps/mobile/src/i18n/locales/ja/settings.json
index 8b6f1e50e1..f62c0852ab 100644
--- a/apps/mobile/src/i18n/locales/ja/settings.json
+++ b/apps/mobile/src/i18n/locales/ja/settings.json
@@ -1,7 +1,6 @@
{
"localLogs": {
"upload": "ログを送信",
- "uploadHint": "選別した実行記録とアプリ・OSのバージョンのみ送信します。詳細ログは書き出してください。",
"uploadResult": {
"unavailable": "このビルドではログ送信が設定されていません。",
"consentRequired": "ログ送信前にプライバシーポリシーに同意してください。",
@@ -9,18 +8,16 @@
"failed": "送信に失敗しました。ログは端末に保存されています。"
},
"title": "デバッグログ",
- "record": "デバッグログを記録",
- "hint": "スマートフォンの接続、復旧、ファイルのプレビューと再生、スクロール、キーボード、性能の詳細を記録します。初期設定はオフ。最大7日間・8 MB保存し、自動送信しません。",
- "export": "デバッグログを書き出す",
+ "record": "ログを記録",
+ "export": "ログを書き出す",
"clear": "ログを消去",
"busy": "処理中…",
"failed": "ログの保存または共有ができません。再試行してください。",
"clearHint": "保存済みの診断ログを削除しますか?",
"cancel": "キャンセル",
- "exportHint": "詳細なローカルログを共有して問題を調査します。会話の本文や認証情報は含みません。",
- "options": "ログのオプション",
"uploadCopied": "ログを送信しました。番号 {{code}} をコピーしました",
- "uploadSucceeded": "ログを送信しました。番号 {{code}}"
+ "uploadSucceeded": "ログを送信しました。番号 {{code}}",
+ "footer": "ログはスマホに最大 7 日間・8 MB まで保存され、自動ではアップロードされません。書き出したログに会話本文や認証情報は含まれず、アップロードではフィルタ済みの実行記録とバージョン情報のみを送信します。"
},
"title": "設定",
"appearance": {
@@ -47,8 +44,8 @@
"preview": "メッセージのプレビュー",
"sampleUser": "今日のアイデアを整理して。",
"sampleAssistant": "一緒にアイデアを整理しましょう。",
- "hint": "色はライト/ダークモードに合わせて明るさが自動調整され、文字が読みやすく保たれます。この端末にのみ保存されます。",
- "customHint": "カラーバーを左右にドラッグして色を選べます。色はライト/ダークモードに合わせて明るさが自動調整され、文字が読みやすく保たれます。この端末にのみ保存されます。",
+ "hint": "ライト/ダークモードに合わせて明るさを自動調整します。この端末にのみ保存されます。",
+ "customHint": "カラーバーを左右にドラッグして色を選びます。明るさは自動調整され、この端末にのみ保存されます。",
"saveFailed": "色は適用されましたが、保存できませんでした。",
"retry": "再試行",
"cancel": "キャンセル",
@@ -71,35 +68,35 @@
},
"version": {
"sectionTitle": "バージョン",
- "appVersion": "バージョン {{version}}",
- "updateMethodInApp": "更新方法:アプリ内で更新(再起動後に反映)",
- "updateMethodPackage": "更新方法:新しいバージョンをダウンロードしてインストール",
- "updateMethodUnavailable": "開発ビルドのため、アプリ内更新は利用できません",
- "pairedDesktopVersion": "対応デスクトップ版 {{version}}",
+ "updateMethodInApp": "アプリ内で更新でき、再起動後に反映されます。",
+ "updateMethodPackage": "新しいバージョンをダウンロードしてインストールしてください。",
+ "updateMethodUnavailable": "開発版はアプリ内で更新できません。",
"checkAction": "更新を確認",
"testFlightCheckAction": "コンテンツ更新を確認",
"checking": "確認中",
"checkingAccessibility": "更新を確認しています",
"testFlightCheckingAccessibility": "コンテンツ更新を確認しています",
- "testFlightUpdateManaged": "テスト版アプリの更新は TestFlight で管理されます",
- "testFlightNoContentUpdate": "利用可能なコンテンツ更新はありません。新しいテスト版は TestFlight で確認してください。",
- "testFlightContentUpdateUnavailable": "このビルドではコンテンツ更新を確認できません。新しいテスト版は TestFlight で確認してください。",
- "googlePlayUpdateManaged": "アプリ本体の更新は Google Play で管理されます",
- "googlePlayNoContentUpdate": "利用可能なコンテンツ更新はありません。新しいアプリ版は Google Play で確認してください。",
- "googlePlayContentUpdateUnavailable": "このビルドではコンテンツ更新を確認できません。新しいアプリ版は Google Play で確認してください。",
+ "testFlightUpdateManaged": "新しいテスト版は TestFlight からインストールしてください。",
+ "testFlightNoContentUpdate": "利用できるコンテンツ更新はありません。",
+ "testFlightContentUpdateUnavailable": "このビルドではコンテンツ更新を確認できません。",
+ "googlePlayUpdateManaged": "新しいバージョンは Google Play から更新してください。",
+ "googlePlayNoContentUpdate": "利用できるコンテンツ更新はありません。",
+ "googlePlayContentUpdateUnavailable": "このビルドではコンテンツ更新を確認できません。",
"bundleUpdateFound": "アプリ本体の更新があります",
"upToDate": "すでに最新の状態です",
- "bundleUpToDateNoOta": "アプリ本体は最新です。このバージョンは OTA 更新に対応していません",
+ "bundleUpToDateNoOta": "最新です。このバージョンはホットアップデートに対応していません。",
"downloadedRestarting": "更新をダウンロードしました。再起動しています",
- "downloadedRestartRequired": "更新をダウンロードしました。アプリを完全に終了して再度開くと適用されます。",
+ "downloadedRestartRequired": "更新をダウンロードしました。アプリを完全に終了して開き直すと反映されます。",
"bundleCheckFailed": "アプリ本体の更新を確認できませんでした。しばらくしてからもう一度お試しください。",
"checkFailedDetail": "更新の確認に失敗しました:{{detail}}",
- "checkFailed": "更新の確認に失敗しました。しばらくしてからもう一度お試しください。"
+ "checkFailed": "更新の確認に失敗しました。しばらくしてからもう一度お試しください。",
+ "currentLabel": "現在のバージョン",
+ "pairedDesktopLabel": "対応デスクトップ版"
},
"betaChannel": {
"title": "Beta チャンネル",
"badge": "Beta",
- "description": "Beta チャンネルに参加すると、今後のクライアント更新を先行して受け取れます。",
+ "description": "リリース前のクライアント更新を先行して受け取ります。",
"restartHint": "Beta チャンネルは再起動後に反映されます。アプリを再起動してください。",
"ok": "わかりました",
"saveFailed": "Beta チャンネル設定の保存に失敗しました",
@@ -108,9 +105,9 @@
"notifications": {
"sectionTitle": "通知",
"taskDone": "タスク完了通知",
- "taskDoneHint": "パソコン側のタスクが完了・失敗・返信待ちになったとき、このスマートフォンに通知します。完了時と返信待ち時は最新の返信内容も含まれます。",
- "permissionDenied": "システムの通知が許可されていません。iOS の「設定 → 通知 → {{appName}}」で通知を許可してから、もう一度お試しください。",
- "unregisterQueued": "オフにしました。現在のネットワークでは登録解除が完了していません。次回オンライン時に自動で完了します。"
+ "taskDoneHint": "パソコンのタスクが完了・失敗・返信待ちになると、最新の返信とともに通知します。",
+ "permissionDenied": "通知がオフです。iOS の「設定 → 通知 → {{appName}}」で許可してください。",
+ "unregisterQueued": "オフにしました。オンラインになると登録解除が完了します。"
},
"about": {
"sectionTitle": "このスマートフォンについて",
@@ -182,7 +179,7 @@
"openUserAgreement": "利用規約を開く",
"appFilingNumber": "アプリ届出番号",
"analytics": "利用統計",
- "analyticsHint": "Cindy の起動状況や継続利用状況の把握に使います。送信するのはデバイスの機種名、OS バージョン、アプリバージョン、デバイス識別子などのデバイス・利用環境情報と、ログイン後はアカウント ID で、会話内容・ファイル・プロンプトは一切含みません。",
+ "analyticsHint": "起動状況や継続利用の把握に使います。機種名、OS とアプリのバージョン、デバイス識別子などの情報と、ログイン後はアカウント ID を送信します。会話・ファイル・プロンプトは含みません。",
"analyticsSaveFailed": "設定を保存できませんでした。再起動すると元に戻る場合があります。",
"analyticsReset": "デフォルトに戻す",
"analyticsResetAction": "戻す"
@@ -190,7 +187,7 @@
"account": {
"logoutConfirmTitle": "ログアウトしますか?",
"logoutConfirmRunning": "実行中のセッションがあります。セッションはパソコンで実行を続けますが、このスマートフォンでは受信・操作できなくなり、保存されたアカウントとローカルのリモートミラーも削除されます。",
- "logoutHint": "ログアウトすると、このスマートフォンに保存されたすべてのアカウントとローカルのリモートミラーが削除されます。パソコン側のセッションには影響しません。",
+ "logoutHint": "このスマホのすべてのアカウントとリモートミラーを削除します。パソコン側のセッションには影響しません。",
"logout": "ログアウト",
"loggingOut": "ログアウト中",
"loggingOutAccessibility": "ログアウトしています"
@@ -203,7 +200,7 @@
"voiceDictionary": {
"sectionTitle": "音声辞書",
"label": "辞書を見る",
- "hint": "辞書はパソコンに保存され、お使いのパソコン間で自動的に同期されます。スマホでは閲覧のみで、追加や削除はパソコンで行ってください。",
+ "hint": "辞書はパソコンで編集し、自動で同期されます。スマホでは閲覧のみです。",
"openAccessibility": "音声辞書を見る",
"screenTitle": "音声辞書",
"entryCount": "{{count}} 語",
@@ -225,12 +222,11 @@
"openAccessibility": "「自分の声を認識」の設定を開く",
"on": "オン",
"off": "オフ",
- "hint": "音声入力中は周りの人の声をミュートし、あなたの話した内容だけを認識に送ります。事前に声紋の登録が必要です。あなたと同時に話された声は完全には取り除けません。",
+ "hint": "音声入力中は周りの声をミュートし、あなたの声だけを認識します。同時に話された声は完全には取り除けません。声紋はこのスマホに暗号化して保存され、アップロードや同期はされません。",
"unsupported": "現在のバージョンは声紋に対応していません。最新バージョンに更新してください。",
- "privacy": "声紋はこのスマートフォンにだけ暗号化して保存され、アップロードや他のデバイスへの同期は行われません。",
"model": {
"title": "認識モデル",
- "needed": "初回は約 {{size}} の認識モデルをダウンロードします。Wi-Fi の利用をおすすめします。",
+ "needed": "初回は約 {{size}} の認識モデルをダウンロードします。Wi-Fi 接続をおすすめします。",
"download": "認識モデルをダウンロード",
"downloading": "ダウンロード中({{done}} / {{total}})",
"cancel": "ダウンロードをキャンセル",
@@ -260,7 +256,7 @@
},
"strictness": {
"label": "厳しさ",
- "hint": "厳しくするほど周りの人の声が入りにくくなりますが、騒がしい場所では自分の言葉も途切れやすくなります。",
+ "hint": "厳しくするほど周りの声を防げますが、騒がしい場所では自分の声も削られやすくなります。",
"restoreDefault": "デフォルトに戻す",
"options": {
"relaxed": "ゆるめ",
@@ -318,5 +314,10 @@
"discardBody": "デバイス名の変更はまだ保存されていません。",
"discardConfirm": "変更を破棄",
"keepEditing": "編集を続ける"
+ },
+ "developer": {
+ "title": "開発者",
+ "identity": "識別情報",
+ "updateInfo": "更新情報"
}
}
diff --git a/apps/mobile/src/i18n/locales/ko/settings.json b/apps/mobile/src/i18n/locales/ko/settings.json
index 55c6d3a3a8..8bdf2cc9af 100644
--- a/apps/mobile/src/i18n/locales/ko/settings.json
+++ b/apps/mobile/src/i18n/locales/ko/settings.json
@@ -1,7 +1,6 @@
{
"localLogs": {
"upload": "로그 업로드",
- "uploadHint": "선별된 실행 기록과 앱 및 OS 버전만 전송합니다. 상세 로그는 내보내기를 사용하세요.",
"uploadResult": {
"unavailable": "이 빌드에는 로그 업로드가 설정되지 않았습니다.",
"consentRequired": "로그를 업로드하기 전에 개인정보 처리방침에 동의해 주세요.",
@@ -9,18 +8,16 @@
"failed": "업로드하지 못했습니다. 로그는 휴대폰에 보관되어 있습니다."
},
"title": "디버그 로그",
- "record": "디버그 로그 기록",
- "hint": "휴대폰 연결, 복구, 파일 미리보기 및 재생, 스크롤, 키보드 및 성능 세부 정보를 기록합니다. 기본 꺼짐이며 최대 7일, 8 MB를 보관합니다. 자동 업로드하지 않습니다.",
- "export": "디버그 로그 내보내기",
+ "record": "로그 기록",
+ "export": "로그 내보내기",
"clear": "로그 지우기",
"busy": "처리 중…",
"failed": "로그를 저장하거나 공유할 수 없습니다. 다시 시도해 주세요.",
"clearHint": "저장된 진단 로그를 삭제할까요?",
"cancel": "취소",
- "exportHint": "문제 해결을 위해 상세 로컬 로그를 공유합니다. 대화 내용이나 인증 정보는 포함하지 않습니다.",
- "options": "로그 옵션",
"uploadCopied": "로그를 업로드했습니다. 번호 {{code}}를 복사했습니다",
- "uploadSucceeded": "로그를 업로드했습니다. 번호 {{code}}"
+ "uploadSucceeded": "로그를 업로드했습니다. 번호 {{code}}",
+ "footer": "로그는 휴대폰에 최대 7일, 8MB까지 저장되며 자동으로 업로드되지 않습니다. 내보낸 로그에는 대화 본문과 자격 증명이 포함되지 않고, 업로드 시에는 필터링된 실행 기록과 버전 정보만 보냅니다."
},
"title": "설정",
"appearance": {
@@ -47,8 +44,8 @@
"preview": "메시지 미리보기",
"sampleUser": "오늘 떠오른 아이디어를 정리해 줘.",
"sampleAssistant": "좋아요, 함께 아이디어를 정리해 봐요.",
- "hint": "색상은 라이트·다크 모드에 맞춰 밝기가 자동 조정되어 글자가 잘 보입니다. 이 기기에만 저장됩니다.",
- "customHint": "색상 막대를 좌우로 드래그해 색을 고르세요. 색상은 라이트·다크 모드에 맞춰 밝기가 자동 조정되어 글자가 잘 보입니다. 이 기기에만 저장됩니다.",
+ "hint": "라이트·다크 모드에 맞춰 밝기가 자동 조정됩니다. 이 기기에만 저장됩니다.",
+ "customHint": "색상 막대를 좌우로 드래그해 색을 고르세요. 밝기는 자동 조정되며 이 기기에만 저장됩니다.",
"saveFailed": "색상은 적용되었지만 저장하지 못했습니다.",
"retry": "다시 시도",
"cancel": "취소",
@@ -71,35 +68,35 @@
},
"version": {
"sectionTitle": "버전",
- "appVersion": "버전 {{version}}",
- "updateMethodInApp": "업데이트 방식: 앱 내 업데이트(다시 시작하면 적용)",
- "updateMethodPackage": "업데이트 방식: 새 버전을 다운로드해 설치",
- "updateMethodUnavailable": "개발 빌드에서는 앱 내 업데이트를 사용할 수 없습니다",
- "pairedDesktopVersion": "연동 대상 데스크톱 버전 {{version}}",
+ "updateMethodInApp": "앱에서 업데이트하며, 다시 시작하면 적용됩니다.",
+ "updateMethodPackage": "새 버전을 내려받아 설치해 주세요.",
+ "updateMethodUnavailable": "개발 빌드는 앱에서 업데이트할 수 없습니다.",
"checkAction": "업데이트 확인",
"testFlightCheckAction": "콘텐츠 업데이트 확인",
"checking": "확인 중",
"checkingAccessibility": "업데이트를 확인하는 중",
"testFlightCheckingAccessibility": "콘텐츠 업데이트를 확인하는 중",
- "testFlightUpdateManaged": "테스트 빌드 업데이트는 TestFlight에서 관리합니다",
- "testFlightNoContentUpdate": "사용 가능한 콘텐츠 업데이트가 없습니다. 새 테스트 빌드는 TestFlight에서 확인해 주세요.",
- "testFlightContentUpdateUnavailable": "이 빌드에서는 콘텐츠 업데이트를 확인할 수 없습니다. 새 테스트 빌드는 TestFlight에서 확인해 주세요.",
- "googlePlayUpdateManaged": "앱 버전 업데이트는 Google Play에서 관리합니다",
- "googlePlayNoContentUpdate": "사용 가능한 콘텐츠 업데이트가 없습니다. 새 앱 버전은 Google Play에서 확인해 주세요.",
- "googlePlayContentUpdateUnavailable": "이 빌드에서는 콘텐츠 업데이트를 확인할 수 없습니다. 새 앱 버전은 Google Play에서 확인해 주세요.",
+ "testFlightUpdateManaged": "새 테스트 빌드는 TestFlight에서 설치하세요.",
+ "testFlightNoContentUpdate": "사용 가능한 콘텐츠 업데이트가 없습니다.",
+ "testFlightContentUpdateUnavailable": "이 빌드에서는 콘텐츠 업데이트를 확인할 수 없습니다.",
+ "googlePlayUpdateManaged": "새 버전은 Google Play에서 업데이트하세요.",
+ "googlePlayNoContentUpdate": "사용 가능한 콘텐츠 업데이트가 없습니다.",
+ "googlePlayContentUpdateUnavailable": "이 빌드에서는 콘텐츠 업데이트를 확인할 수 없습니다.",
"bundleUpdateFound": "앱 패키지 업데이트가 있습니다",
"upToDate": "이미 최신 버전입니다",
- "bundleUpToDateNoOta": "앱 패키지는 최신입니다. 현재 버전은 OTA 업데이트를 지원하지 않습니다",
+ "bundleUpToDateNoOta": "최신 버전입니다. 이 버전은 핫 업데이트를 지원하지 않습니다.",
"downloadedRestarting": "업데이트를 다운로드했습니다. 다시 시작하는 중",
- "downloadedRestartRequired": "업데이트를 다운로드했습니다. 앱을 완전히 종료한 뒤 다시 열면 적용됩니다.",
+ "downloadedRestartRequired": "업데이트를 내려받았습니다. 앱을 완전히 종료한 뒤 다시 열면 적용됩니다.",
"bundleCheckFailed": "앱 패키지 업데이트를 확인할 수 없습니다. 잠시 후 다시 시도해 주세요.",
"checkFailedDetail": "업데이트 확인에 실패했습니다: {{detail}}",
- "checkFailed": "업데이트 확인에 실패했습니다. 잠시 후 다시 시도해 주세요."
+ "checkFailed": "업데이트 확인에 실패했습니다. 잠시 후 다시 시도해 주세요.",
+ "currentLabel": "현재 버전",
+ "pairedDesktopLabel": "연결된 데스크톱 버전"
},
"betaChannel": {
"title": "베타 채널",
"badge": "Beta",
- "description": "베타 채널에 참여하면 출시 예정인 클라이언트 업데이트를 먼저 받을 수 있습니다.",
+ "description": "출시 예정인 클라이언트 업데이트를 먼저 받습니다.",
"restartHint": "베타 채널은 앱을 재시작해야 적용됩니다. 앱을 다시 시작해 주세요.",
"ok": "확인",
"saveFailed": "베타 채널 설정 저장 실패",
@@ -108,9 +105,9 @@
"notifications": {
"sectionTitle": "알림",
"taskDone": "작업 완료 알림",
- "taskDoneHint": "컴퓨터의 작업이 완료되거나 실패하거나 회신이 필요할 때 이 휴대폰으로 알림을 보냅니다. 완료·회신 알림에는 최신 응답 내용이 포함됩니다.",
- "permissionDenied": "시스템 알림 권한이 꺼져 있습니다. iOS 설정 → 알림 → {{appName}}에서 알림을 허용한 뒤 다시 시도해 주세요.",
- "unregisterQueued": "껐습니다. 현재 네트워크에서는 등록 해제가 완료되지 않았으며, 다음에 온라인이 되면 자동으로 완료됩니다."
+ "taskDoneHint": "컴퓨터의 작업이 완료·실패하거나 회신이 필요하면 최신 응답과 함께 알려 드립니다.",
+ "permissionDenied": "알림이 꺼져 있습니다. iOS 설정 → 알림 → {{appName}}에서 허용해 주세요.",
+ "unregisterQueued": "껐습니다. 다시 온라인이 되면 등록 해제가 완료됩니다."
},
"about": {
"sectionTitle": "이 휴대폰 정보",
@@ -182,7 +179,7 @@
"openUserAgreement": "이용약관 열기",
"appFilingNumber": "앱 등록 번호",
"analytics": "사용 통계",
- "analyticsHint": "Cindy의 실행 및 지속 사용 현황을 파악하는 데 사용합니다. 기기 모델, OS 버전, 앱 버전, 기기 식별자 등 기기 및 사용 환경 정보를 전송하며 로그인 후에는 계정 ID도 포함됩니다. 대화 내용, 파일, 프롬프트는 전혀 포함하지 않습니다.",
+ "analyticsHint": "실행 및 지속 사용 현황 파악에 사용합니다. 기기 모델, OS·앱 버전, 기기 식별자 등의 정보와 로그인 후 계정 ID를 전송하며, 대화·파일·프롬프트는 포함하지 않습니다.",
"analyticsSaveFailed": "설정을 저장하지 못했습니다. 다시 시작하면 이전 값으로 되돌아갈 수 있습니다.",
"analyticsReset": "기본값으로 되돌리기",
"analyticsResetAction": "되돌리기"
@@ -190,7 +187,7 @@
"account": {
"logoutConfirmTitle": "로그아웃할까요?",
"logoutConfirmRunning": "실행 중인 세션이 있습니다. 세션은 컴퓨터에서 계속 실행되지만 이 휴대폰에서는 더 이상 받거나 제어할 수 없으며, 저장된 계정과 로컬 원격 미러도 삭제됩니다.",
- "logoutHint": "로그아웃하면 이 휴대폰에 저장된 모든 계정과 로컬 원격 미러가 삭제됩니다. 컴퓨터의 세션에는 영향이 없습니다.",
+ "logoutHint": "이 휴대폰의 모든 계정과 원격 미러를 삭제합니다. 컴퓨터의 세션에는 영향이 없습니다.",
"logout": "로그아웃",
"loggingOut": "로그아웃 중",
"loggingOutAccessibility": "로그아웃하는 중"
@@ -203,7 +200,7 @@
"voiceDictionary": {
"sectionTitle": "음성 사전",
"label": "사전 보기",
- "hint": "사전은 컴퓨터에 저장되며 내 컴퓨터끼리 자동으로 동기화됩니다. 휴대폰에서는 보기만 가능하고, 추가와 삭제는 컴퓨터에서 해주세요.",
+ "hint": "사전은 컴퓨터에서 편집하며 자동으로 동기화됩니다. 휴대폰에서는 보기만 가능합니다.",
"openAccessibility": "음성 사전 보기",
"screenTitle": "음성 사전",
"entryCount": "{{count}}개 단어",
@@ -225,12 +222,11 @@
"openAccessibility": "내 목소리 인식 설정 열기",
"on": "켜짐",
"off": "꺼짐",
- "hint": "음성 입력 중 주변 사람의 목소리를 음소거하고 내가 말한 내용만 인식에 보냅니다. 먼저 성문을 등록해야 하며, 나와 동시에 말한 소리는 완전히 걸러지지 않습니다.",
+ "hint": "음성 입력 중 주변 사람의 목소리를 음소거하고 내 말만 인식합니다. 동시에 말한 소리는 완전히 걸러지지 않습니다. 성문은 이 휴대폰에 암호화되어 저장되며 업로드하거나 동기화하지 않습니다.",
"unsupported": "현재 설치된 버전은 성문을 지원하지 않습니다. 최신 버전으로 업데이트하세요.",
- "privacy": "성문은 이 휴대폰에만 암호화되어 저장되며, 업로드되거나 다른 기기로 동기화되지 않습니다.",
"model": {
"title": "인식 모델",
- "needed": "처음 사용할 때 약 {{size}}의 인식 모델을 다운로드합니다. Wi-Fi 연결을 권장합니다.",
+ "needed": "처음 사용할 때 약 {{size}}의 인식 모델을 내려받습니다. Wi-Fi 연결을 권장합니다.",
"download": "인식 모델 다운로드",
"downloading": "다운로드 중({{done}} / {{total}})",
"cancel": "다운로드 취소",
@@ -260,7 +256,7 @@
},
"strictness": {
"label": "엄격도",
- "hint": "엄격할수록 주변 사람의 목소리가 덜 들어가지만, 시끄러운 곳에서는 내 말도 더 잘릴 수 있습니다.",
+ "hint": "엄격할수록 다른 목소리를 더 잘 막지만, 시끄러운 곳에서는 내 말도 잘릴 수 있습니다.",
"restoreDefault": "기본값으로 복원",
"options": {
"relaxed": "느슨하게",
@@ -318,5 +314,10 @@
"discardBody": "기기 이름 변경 사항이 아직 저장되지 않았습니다.",
"discardConfirm": "변경 사항 버리기",
"keepEditing": "계속 편집"
+ },
+ "developer": {
+ "title": "개발자",
+ "identity": "식별 정보",
+ "updateInfo": "업데이트 정보"
}
}
diff --git a/apps/mobile/src/i18n/locales/zh-CN/settings.json b/apps/mobile/src/i18n/locales/zh-CN/settings.json
index 0394396833..c7f7b2514d 100644
--- a/apps/mobile/src/i18n/locales/zh-CN/settings.json
+++ b/apps/mobile/src/i18n/locales/zh-CN/settings.json
@@ -1,7 +1,6 @@
{
"localLogs": {
"upload": "上传日志",
- "uploadHint": "仅发送筛选后的运行记录及应用、系统版本。详细 Debug 日志请使用导出。",
"uploadResult": {
"unavailable": "当前版本未配置日志上传。",
"consentRequired": "上传日志前需同意隐私政策。",
@@ -9,18 +8,16 @@
"failed": "上传失败,日志仍保留在手机上。"
},
"title": "Debug 日志",
- "record": "记录 Debug 日志",
- "hint": "记录手机上的连接、恢复、文件预览与播放、滚动、键盘与性能细节。默认关闭,最多保留 7 天、8 MB,不会自动上传。",
- "export": "导出 Debug 日志",
+ "record": "记录日志",
+ "export": "导出日志",
"clear": "清空日志",
"busy": "处理中…",
"failed": "无法保存或分享日志,请重试。",
"clearHint": "删除已保存的诊断日志?",
"cancel": "取消",
- "exportHint": "分享详细本地日志供排障使用;不包含对话正文或凭证。",
- "options": "日志选项",
"uploadCopied": "日志已上传,编号 {{code}} 已复制",
- "uploadSucceeded": "日志已上传,编号 {{code}}"
+ "uploadSucceeded": "日志已上传,编号 {{code}}",
+ "footer": "日志保存在手机上,最多 7 天、8 MB,不会自动上传。导出的完整日志不含对话正文和凭证;上传只发送筛选后的运行记录和版本信息。"
},
"title": "设置",
"appearance": {
@@ -47,8 +44,8 @@
"preview": "消息预览",
"sampleUser": "帮我整理一下今天的灵感。",
"sampleAssistant": "好的,我们一起把想法梳理清楚。",
- "hint": "颜色会按浅色和深色模式自动调整明暗,保证文字清晰。仅保存在此设备。",
- "customHint": "左右拖动色带选择颜色。颜色会按浅色和深色模式自动调整明暗,保证文字清晰。仅保存在此设备。",
+ "hint": "深浅模式下自动调整明暗,保证文字清晰。仅保存在此设备。",
+ "customHint": "左右拖动色带选择颜色。深浅模式下自动调整明暗,仅保存在此设备。",
"saveFailed": "颜色已在本次使用中生效,但未能保存。",
"retry": "重试",
"cancel": "取消",
@@ -71,35 +68,35 @@
},
"version": {
"sectionTitle": "版本",
- "appVersion": "版本 {{version}}",
- "updateMethodInApp": "更新方式:在 App 内更新,重启后生效",
- "updateMethodPackage": "更新方式:下载并安装新版本",
- "updateMethodUnavailable": "开发版,不支持 App 内更新",
- "pairedDesktopVersion": "配套桌面版本 {{version}}",
+ "updateMethodInApp": "可在 App 内更新,重启后生效。",
+ "updateMethodPackage": "需要下载并安装新版本。",
+ "updateMethodUnavailable": "开发版不支持 App 内更新。",
"checkAction": "检查更新",
"testFlightCheckAction": "检查内容更新",
"checking": "检查中",
"checkingAccessibility": "正在检查更新",
"testFlightCheckingAccessibility": "正在检查内容更新",
- "testFlightUpdateManaged": "测试版安装更新由 TestFlight 管理",
- "testFlightNoContentUpdate": "当前没有可用的内容更新。新测试版本请在 TestFlight 中查看。",
- "testFlightContentUpdateUnavailable": "当前构建无法检查内容更新。新测试版本请在 TestFlight 中查看。",
- "googlePlayUpdateManaged": "应用版本更新由 Google Play 管理",
- "googlePlayNoContentUpdate": "当前没有可用的内容更新。新应用版本请在 Google Play 中查看。",
- "googlePlayContentUpdateUnavailable": "当前构建无法检查内容更新。新应用版本请在 Google Play 中查看。",
+ "testFlightUpdateManaged": "新测试版请在 TestFlight 中安装。",
+ "testFlightNoContentUpdate": "当前没有可用的内容更新。",
+ "testFlightContentUpdateUnavailable": "当前构建无法检查内容更新。",
+ "googlePlayUpdateManaged": "新版本请在 Google Play 中更新。",
+ "googlePlayNoContentUpdate": "当前没有可用的内容更新。",
+ "googlePlayContentUpdateUnavailable": "当前构建无法检查内容更新。",
"bundleUpdateFound": "发现整包更新",
"upToDate": "已是最新版本",
- "bundleUpToDateNoOta": "整包已是最新,当前版本不支持热更新",
+ "bundleUpToDateNoOta": "已是最新,此版本不支持热更新。",
"downloadedRestarting": "更新已下载,正在重启",
- "downloadedRestartRequired": "更新已下载,完全退出 App 后重新打开即可生效",
+ "downloadedRestartRequired": "更新已下载,完全退出并重新打开 App 后生效。",
"bundleCheckFailed": "无法检查整包更新,请稍后重试",
"checkFailedDetail": "检查更新失败:{{detail}}",
- "checkFailed": "检查更新失败,请稍后重试"
+ "checkFailed": "检查更新失败,请稍后重试",
+ "currentLabel": "当前版本",
+ "pairedDesktopLabel": "配套桌面版本"
},
"betaChannel": {
"title": "Beta 测试渠道",
"badge": "Beta",
- "description": "加入 Beta 测试渠道,提前接收即将发布的客户端更新。",
+ "description": "提前接收即将发布的客户端更新。",
"restartHint": "Beta 测试渠道需要重启客户端后才能生效,请重启应用。",
"ok": "我知道了",
"saveFailed": "保存 Beta 测试渠道设置失败",
@@ -108,9 +105,9 @@
"notifications": {
"sectionTitle": "通知",
"taskDone": "任务完成通知",
- "taskDoneHint": "电脑上的任务完成、出错或需要你回复时,推送到这台手机;完成或需要回复时附带最新回复内容。",
- "permissionDenied": "系统通知权限未开启。请到 iOS「设置 → 通知 → {{appName}}」允许通知后重试。",
- "unregisterQueued": "已关闭。当前网络下注销未完成,将在下次联网时自动补上。"
+ "taskDoneHint": "电脑上的任务完成、出错或等你回复时推送通知,并附上最新回复。",
+ "permissionDenied": "通知权限未开启,请在 iOS「设置 → 通知 → {{appName}}」中允许。",
+ "unregisterQueued": "已关闭,联网后自动完成注销。"
},
"about": {
"sectionTitle": "关于这台手机",
@@ -182,7 +179,7 @@
"openUserAgreement": "打开用户协议",
"appFilingNumber": "App 备案号",
"analytics": "使用统计",
- "analyticsHint": "帮助我们了解 Cindy 的启动与留存情况。上报设备型号、系统版本、应用版本、设备标识符等设备与使用环境信息,登录后还包含你的账号 ID;不包含任何对话内容、文件或提示词。",
+ "analyticsHint": "用于了解启动与留存。上报设备型号、系统与应用版本、设备标识符等信息,登录后含账号 ID;不含对话、文件或提示词。",
"analyticsSaveFailed": "设置未能保存,重启后可能恢复原值。",
"analyticsReset": "恢复默认",
"analyticsResetAction": "恢复"
@@ -190,7 +187,7 @@
"account": {
"logoutConfirmTitle": "退出登录?",
"logoutConfirmRunning": "仍有任务正在运行。退出后任务会继续在电脑上运行,但这台手机将不再接收和控制这些任务;这台手机上保存的账号和本地远程镜像也会被清除。",
- "logoutHint": "退出会清除这台手机上保存的全部账号和本地远程镜像,不会影响电脑端任务。",
+ "logoutHint": "退出会清除这台手机上的全部账号和远程镜像,不影响电脑上的任务。",
"logout": "退出登录",
"loggingOut": "退出中",
"loggingOutAccessibility": "正在退出登录"
@@ -203,7 +200,7 @@
"voiceDictionary": {
"sectionTitle": "语音词典",
"label": "查看词典",
- "hint": "词典保存在电脑上,并在你的电脑之间自动同步;手机只能查看,添加和删除请回电脑操作。",
+ "hint": "词典在电脑上编辑并自动同步,手机仅可查看。",
"openAccessibility": "查看语音词典",
"screenTitle": "语音词典",
"entryCount": "{{count}} 个词条",
@@ -225,12 +222,11 @@
"openAccessibility": "打开识别我的声音设置",
"on": "已开启",
"off": "未开启",
- "hint": "语音输入时把旁人的声音静音,只把你说的话送去识别。需要先录入声纹;别人和你同时说话时无法完全滤掉。",
+ "hint": "语音输入时把旁人的声音静音,只识别你说的话;和你同时说话的声音无法完全滤掉。声纹加密保存在这台手机上,不会上传或同步。",
"unsupported": "当前安装的版本不支持声纹识别,请更新到最新版本。",
- "privacy": "声纹只保存在这台手机上并加密存储,不会上传,也不会同步到其他设备。",
"model": {
"title": "识别模型",
- "needed": "首次使用需要下载约 {{size}} 的识别模型,建议连接 Wi-Fi。",
+ "needed": "首次使用需下载约 {{size}} 的识别模型,建议连接 Wi-Fi。",
"download": "下载识别模型",
"downloading": "正在下载({{done}} / {{total}})",
"cancel": "取消下载",
@@ -260,7 +256,7 @@
},
"strictness": {
"label": "灵敏度",
- "hint": "越严格越不容易放进旁人的声音,但在嘈杂环境里也更容易剪掉你自己的话。",
+ "hint": "越严格越能挡住旁人的声音,但嘈杂时也更容易剪掉你的话。",
"restoreDefault": "恢复默认",
"options": {
"relaxed": "宽松",
@@ -318,5 +314,10 @@
"discardBody": "设备名称的修改还没有保存。",
"discardConfirm": "放弃修改",
"keepEditing": "继续编辑"
+ },
+ "developer": {
+ "title": "开发者",
+ "identity": "标识信息",
+ "updateInfo": "更新信息"
}
}
diff --git a/apps/mobile/src/i18n/locales/zh-TW/settings.json b/apps/mobile/src/i18n/locales/zh-TW/settings.json
index 256d4064f2..401dee4098 100644
--- a/apps/mobile/src/i18n/locales/zh-TW/settings.json
+++ b/apps/mobile/src/i18n/locales/zh-TW/settings.json
@@ -1,7 +1,6 @@
{
"localLogs": {
"upload": "上傳日誌",
- "uploadHint": "僅傳送篩選後的執行記錄及應用程式、系統版本。詳細 Debug 日誌請使用匯出。",
"uploadResult": {
"unavailable": "目前版本未設定日誌上傳。",
"consentRequired": "上傳日誌前需同意隱私政策。",
@@ -9,18 +8,16 @@
"failed": "上傳失敗,日誌仍保留在手機上。"
},
"title": "Debug 日誌",
- "record": "記錄 Debug 日誌",
- "hint": "記錄手機上的連線、恢復、檔案預覽與播放、捲動、鍵盤與效能細節。預設關閉,最多保留 7 天、8 MB,不會自動上傳。",
- "export": "匯出 Debug 日誌",
+ "record": "記錄日誌",
+ "export": "匯出日誌",
"clear": "清空日誌",
"busy": "處理中…",
"failed": "無法儲存或分享日誌,請重試。",
"clearHint": "刪除已儲存的診斷日誌?",
"cancel": "取消",
- "exportHint": "分享詳細本機日誌供疑難排解;不含任務內文或憑證。",
- "options": "日誌選項",
"uploadCopied": "日誌已上傳,編號 {{code}} 已複製",
- "uploadSucceeded": "日誌已上傳,編號 {{code}}"
+ "uploadSucceeded": "日誌已上傳,編號 {{code}}",
+ "footer": "日誌儲存在手機上,最多 7 天、8 MB,不會自動上傳。匯出的完整日誌不含對話內文和憑證;上傳只傳送篩選後的執行記錄和版本資訊。"
},
"title": "設定",
"appearance": {
@@ -47,8 +44,8 @@
"preview": "訊息預覽",
"sampleUser": "幫我整理一下今天的靈感。",
"sampleAssistant": "好的,我們一起把想法梳理清楚。",
- "hint": "顏色會依淺色和深色模式自動調整明暗,確保文字清晰。僅儲存在此裝置。",
- "customHint": "左右拖曳色帶選擇顏色。顏色會依淺色和深色模式自動調整明暗,確保文字清晰。僅儲存在此裝置。",
+ "hint": "深淺模式下自動調整明暗,確保文字清晰。僅儲存在此裝置。",
+ "customHint": "左右拖曳色帶選擇顏色。深淺模式下自動調整明暗,僅儲存在此裝置。",
"saveFailed": "顏色已在本次使用中生效,但未能儲存。",
"retry": "重試",
"cancel": "取消",
@@ -71,35 +68,35 @@
},
"version": {
"sectionTitle": "版本",
- "appVersion": "版本 {{version}}",
- "updateMethodInApp": "更新方式:在 App 內更新,重新啟動後生效",
- "updateMethodPackage": "更新方式:下載並安裝新版本",
- "updateMethodUnavailable": "開發版,不支援 App 內更新",
- "pairedDesktopVersion": "配套桌面版本 {{version}}",
+ "updateMethodInApp": "可在 App 內更新,重新啟動後生效。",
+ "updateMethodPackage": "需要下載並安裝新版本。",
+ "updateMethodUnavailable": "開發版不支援 App 內更新。",
"checkAction": "檢查更新",
"testFlightCheckAction": "檢查內容更新",
"checking": "檢查中",
"checkingAccessibility": "正在檢查更新",
"testFlightCheckingAccessibility": "正在檢查內容更新",
- "testFlightUpdateManaged": "測試版安裝更新由 TestFlight 管理",
- "testFlightNoContentUpdate": "當前沒有可用的內容更新。新測試版本請在 TestFlight 中檢視。",
- "testFlightContentUpdateUnavailable": "當前構建無法檢查內容更新。新測試版本請在 TestFlight 中檢視。",
- "googlePlayUpdateManaged": "應用程式版本更新由 Google Play 管理",
- "googlePlayNoContentUpdate": "目前沒有可用的內容更新。新應用程式版本請在 Google Play 中查看。",
- "googlePlayContentUpdateUnavailable": "目前無法檢查內容更新。新應用程式版本請在 Google Play 中查看。",
+ "testFlightUpdateManaged": "新測試版請在 TestFlight 中安裝。",
+ "testFlightNoContentUpdate": "目前沒有可用的內容更新。",
+ "testFlightContentUpdateUnavailable": "目前的建置無法檢查內容更新。",
+ "googlePlayUpdateManaged": "新版本請在 Google Play 中更新。",
+ "googlePlayNoContentUpdate": "目前沒有可用的內容更新。",
+ "googlePlayContentUpdateUnavailable": "目前的建置無法檢查內容更新。",
"bundleUpdateFound": "發現整包更新",
"upToDate": "已是最新版本",
- "bundleUpToDateNoOta": "整包已是最新,當前版本不支援熱更新",
+ "bundleUpToDateNoOta": "已是最新,此版本不支援熱更新。",
"downloadedRestarting": "更新已下載,正在重啟",
- "downloadedRestartRequired": "更新已下載,完全退出 App 後重新開啟即可生效",
+ "downloadedRestartRequired": "更新已下載,完全結束並重新開啟 App 後生效。",
"bundleCheckFailed": "無法檢查整包更新,請稍後重試",
"checkFailedDetail": "檢查更新失敗:{{detail}}",
- "checkFailed": "檢查更新失敗,請稍後重試"
+ "checkFailed": "檢查更新失敗,請稍後重試",
+ "currentLabel": "目前版本",
+ "pairedDesktopLabel": "配套桌面版本"
},
"betaChannel": {
"title": "Beta 測試管道",
"badge": "Beta",
- "description": "加入 Beta 測試管道,提前接收即將發布的客戶端更新。",
+ "description": "提前接收即將發布的用戶端更新。",
"restartHint": "Beta 測試管道需要重新啟動客戶端後才能生效,請重新啟動應用。",
"ok": "我知道了",
"saveFailed": "儲存 Beta 測試管道設定失敗",
@@ -108,9 +105,9 @@
"notifications": {
"sectionTitle": "通知",
"taskDone": "任務完成通知",
- "taskDoneHint": "電腦上的任務完成、出錯或需要你回覆時,推送到這臺手機;完成或需要回復時附帶最新回覆內容。",
- "permissionDenied": "系統通知權限未開啟。請到 iOS「設定 → 通知 → {{appName}}」允許通知後重試。",
- "unregisterQueued": "已關閉。當前網路下注銷未完成,將在下次聯網時自動補上。"
+ "taskDoneHint": "電腦上的任務完成、出錯或等你回覆時推送通知,並附上最新回覆。",
+ "permissionDenied": "通知權限未開啟,請在 iOS「設定 → 通知 → {{appName}}」中允許。",
+ "unregisterQueued": "已關閉,連網後自動完成註銷。"
},
"about": {
"sectionTitle": "關於這臺手機",
@@ -182,7 +179,7 @@
"openUserAgreement": "開啟使用者協議",
"appFilingNumber": "App 備案號",
"analytics": "使用統計",
- "analyticsHint": "幫助我們瞭解 Cindy 的啟動與留存情況。上報裝置型號、系統版本、應用版本、裝置識別符號等裝置與使用環境資訊,登入後還包含你的帳號 ID;不包含任何對話內容、檔案或提示詞。",
+ "analyticsHint": "用於瞭解啟動與留存。上報裝置型號、系統與應用版本、裝置識別符號等資訊,登入後含帳號 ID;不含對話、檔案或提示詞。",
"analyticsSaveFailed": "設定未能儲存,重啟後可能恢復原值。",
"analyticsReset": "恢復預設",
"analyticsResetAction": "恢復"
@@ -190,7 +187,7 @@
"account": {
"logoutConfirmTitle": "退出登入?",
"logoutConfirmRunning": "仍有任務正在執行。退出後任務會繼續在電腦上執行,但這臺手機將不再接收和控制這些任務;這臺手機上儲存的帳號和本地遠端映象也會被清除。",
- "logoutHint": "退出會清除這臺手機上儲存的全部帳號和本地遠端映象,不會影響電腦端任務。",
+ "logoutHint": "退出會清除這臺手機上的全部帳號和遠端映象,不影響電腦上的任務。",
"logout": "退出登入",
"loggingOut": "退出中",
"loggingOutAccessibility": "正在退出登入"
@@ -203,7 +200,7 @@
"voiceDictionary": {
"sectionTitle": "語音詞典",
"label": "檢視詞典",
- "hint": "詞典儲存在電腦上,並在你的電腦之間自動同步;手機只能檢視,新增和刪除請回電腦操作。",
+ "hint": "詞典在電腦上編輯並自動同步,手機僅可檢視。",
"openAccessibility": "檢視語音詞典",
"screenTitle": "語音詞典",
"entryCount": "{{count}} 個詞條",
@@ -225,12 +222,11 @@
"openAccessibility": "開啟辨識我的聲音設定",
"on": "已開啟",
"off": "未開啟",
- "hint": "語音輸入時將旁人的聲音靜音,只把你說的話送去辨識。需要先錄製聲紋;別人和你同時說話時無法完全濾掉。",
+ "hint": "語音輸入時將旁人的聲音靜音,只辨識你說的話;和你同時說話的聲音無法完全濾掉。聲紋加密儲存在這臺手機上,不會上傳或同步。",
"unsupported": "目前安裝的版本不支援聲紋辨識,請更新到最新版本。",
- "privacy": "聲紋只儲存在這支手機上並加密保存,不會上傳,也不會同步到其他裝置。",
"model": {
"title": "辨識模型",
- "needed": "首次使用需要下載約 {{size}} 的辨識模型,建議連接 Wi-Fi。",
+ "needed": "首次使用需下載約 {{size}} 的辨識模型,建議連接 Wi-Fi。",
"download": "下載辨識模型",
"downloading": "正在下載({{done}} / {{total}})",
"cancel": "取消下載",
@@ -260,7 +256,7 @@
},
"strictness": {
"label": "靈敏度",
- "hint": "越嚴格越不容易放進旁人的聲音,但在吵雜環境中也更容易剪掉你自己的話。",
+ "hint": "越嚴格越能擋住旁人的聲音,但吵雜時也更容易剪掉你的話。",
"restoreDefault": "恢復預設",
"options": {
"relaxed": "寬鬆",
@@ -318,5 +314,10 @@
"discardBody": "裝置名稱的修改還沒有儲存。",
"discardConfirm": "放棄修改",
"keepEditing": "繼續編輯"
+ },
+ "developer": {
+ "title": "開發者",
+ "identity": "識別資訊",
+ "updateInfo": "更新資訊"
}
}
diff --git a/apps/mobile/src/session/SettingsGroupRows.tsx b/apps/mobile/src/session/SettingsGroupRows.tsx
index 8e218190b2..eacda5dab9 100644
--- a/apps/mobile/src/session/SettingsGroupRows.tsx
+++ b/apps/mobile/src/session/SettingsGroupRows.tsx
@@ -1,9 +1,13 @@
/**
* 设置类页面共用的分组卡片与行(设置页、设置子页、设备管理列表)。
*
- * 行布局规则(用户定稿):左侧标签 / 说明可换行;右侧取值右对齐、不收缩(过长时截断在
- * 行宽 60% 内)。行标题 16/22 500 textPrimary,取值 16/22 400 textSecondary,
- * 说明 13/18 400 textSecondary;分组标题 13/18 600 textTertiary。
+ * 行布局规则(用户定稿):左侧标签可换行;右侧取值右对齐、不收缩(过长时截断在
+ * 行宽 60% 内)。行标题 16/22 500 textPrimary,取值 16/22 400 textSecondary;
+ * 分组标题 13/18 600 textTertiary。
+ *
+ * 卡片里只放「名称 + 取值 / 开关 / 箭头」。成句的说明、操作结果与报错一律写在分组下方的
+ * footer(13/18 400 textSecondary,iOS Section footer / Android 列表辅助文字惯例),
+ * 所以行组件不再提供 hint / detail;一组需要多段说明时拆成多个分组(2026-10-19 用户定稿)。
*/
import { Children, isValidElement, type ReactNode } from 'react';
import { Pressable, StyleSheet, View } from 'react-native';
@@ -14,23 +18,30 @@ import { NativeSwitch } from '@/platform/chrome';
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import { fontWeight, iconSize, iconStroke, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
-import { DisclosureItem, useDisclosurePrepare } from './listDisclosureTransition';
+import { DisclosureItem } from './listDisclosureTransition';
export const useSettingsRowStyles = () => useThemedStyles(makeSettingsRowStyles);
+export type SettingsGroupMessage = { text: string; testID?: string } | null | undefined | false;
+
/**
* iOS 风格分组:组标题在外侧 gutter,组内一块统一卡片,行间用 inset 分隔线。
- * rows 为空则不渲染卡片;footer 为卡片下方 gutter 里的说明文字(iOS 分组 footer 惯例)。
+ * rows 为空则不渲染卡片;footer 为卡片下方 gutter 里的说明文字(iOS 分组 footer 惯例),
+ * messages 是接在说明后面的临时状态(保存失败、权限被拒、上传结果等),同一档样式。
*/
export function SettingsGroup({
children,
footer,
+ footerTestID,
+ messages,
testID,
title,
titleAccessory,
}: {
children: ReactNode;
- footer?: string;
+ footer?: string | null;
+ footerTestID?: string;
+ messages?: ReadonlyArray<SettingsGroupMessage>;
testID?: string;
title?: string;
titleAccessory?: ReactNode;
@@ -59,13 +70,37 @@ export function SettingsGroup({
))}
</DisclosureItem>
) : null}
- {footer && rows.length > 0 ? (
- <Text style={styles.groupFooter}>{footer}</Text>
+ {rows.length > 0 ? (
+ <SettingsGroupFooter footer={footer} messages={messages} testID={footerTestID} />
) : null}
</DisclosureItem>
);
}
+function SettingsGroupFooter({
+ footer,
+ messages,
+ testID,
+}: {
+ footer?: string | null;
+ messages?: ReadonlyArray<SettingsGroupMessage>;
+ testID?: string;
+}) {
+ const styles = useSettingsRowStyles();
+ const lines = messages?.filter((message): message is { text: string; testID?: string } => Boolean(message)) ?? [];
+ if (!footer && lines.length === 0) return null;
+ return (
+ <View style={styles.groupFooterStack}>
+ {footer ? <Text style={styles.groupFooter} testID={testID}>{footer}</Text> : null}
+ {lines.map((message, index) => (
+ <Text accessibilityLiveRegion="polite" key={message.testID ?? index} style={styles.groupFooter} testID={message.testID}>
+ {message.text}
+ </Text>
+ ))}
+ </View>
+ );
+}
+
/** 设置项的单选入口行:iOS 由外层原生下拉菜单接管点击,其它平台打开选择面板。 */
export function ChoicePickerRow({
expanded,
@@ -100,14 +135,12 @@ export function ChoicePickerRow({
);
}
-/** 只读信息行:标签左、值右;可选 detail 另起一行。 */
+/** 只读信息行:标签左、值右。 */
export function InfoRow({
- detail,
label,
testID,
value,
}: {
- detail?: string;
label: string;
testID?: string;
value: string;
@@ -119,16 +152,18 @@ export function InfoRow({
<Text style={styles.rowLabel}>{label}</Text>
<Text style={styles.rowValue} numberOfLines={1}>{value}</Text>
</View>
- {detail ? <Text style={styles.rowDetail}>{detail}</Text> : null}
</View>
);
}
-/** 可点击信息行:进入子页、轻量编辑或打开外部信息;右侧统一 lg + textTertiary 箭头。 */
+/**
+ * 可点击信息行:进入子页、轻量编辑或打开外部信息;右侧统一 lg + textTertiary 箭头。
+ * 原地执行的动作(检查更新、清空日志)传 chevron={false},不画进入箭头。
+ */
export function ActionInfoRow({
accessibilityLabel,
accessibilityRole = 'button',
- detail,
+ chevron = true,
disabled = false,
label,
onPress,
@@ -137,7 +172,7 @@ export function ActionInfoRow({
}: {
accessibilityLabel: string;
accessibilityRole?: 'button' | 'link';
- detail?: string;
+ chevron?: boolean;
disabled?: boolean;
label: string;
onPress(): void;
@@ -159,67 +194,25 @@ export function ActionInfoRow({
<View style={styles.rowLine}>
<Text style={styles.rowLabel}>{label}</Text>
{value ? <Text style={styles.rowValue} numberOfLines={1}>{value}</Text> : null}
- <ChevronRight color={colors.textTertiary} size={iconSize.lg} strokeWidth={iconStroke.regular} />
- </View>
- {detail ? <Text style={styles.rowDetail}>{detail}</Text> : null}
- </Pressable>
- );
-}
-
-/** 卡片内的折叠开关行(如「调试 / 开发者」):展开后其余行接在同一张卡片里。 */
-export function SettingsDisclosureRow({
- expanded,
- label,
- onPress,
- testID,
-}: {
- expanded: boolean;
- label: string;
- onPress(): void;
- testID?: string;
-}) {
- const styles = useSettingsRowStyles();
- const { colors } = useTheme();
- const prepareDisclosure = useDisclosurePrepare();
- const Chevron = expanded ? ChevronDown : ChevronRight;
- return (
- <Pressable
- accessibilityLabel={label}
- accessibilityRole="button"
- accessibilityState={{ expanded }}
- onPress={onPress}
- onPressIn={() => prepareDisclosure()}
- style={({ pressed }) => [styles.row, pressed && styles.pressed]}
- testID={testID}
- >
- <View style={styles.rowLine}>
- <Text style={styles.rowLabel}>{label}</Text>
- <Chevron color={colors.textTertiary} size={iconSize.lg} strokeWidth={iconStroke.regular} />
+ {chevron ? <ChevronRight color={colors.textTertiary} size={iconSize.lg} strokeWidth={iconStroke.regular} /> : null}
</View>
</Pressable>
);
}
-/** 开关行:标签 + 说明在左(可换行),系统开关在右;accessory 可追加开关右侧的次级入口。 */
+/** 开关行:标签在左(可换行),系统开关在右;说明与提示写在所在分组的 footer。 */
export function SettingsSwitchRow({
- accessory,
accessibilityLabel,
disabled,
- hint,
label,
- messages,
onValueChange,
switchTestID,
testID,
value,
}: {
- accessory?: ReactNode;
accessibilityLabel?: string;
disabled?: boolean;
- hint?: string;
label: string;
- /** 开关下方的附加提示(保存失败、权限被拒等),按 13/18 说明档呈现。 */
- messages?: ReadonlyArray<{ text: string; testID?: string } | null | undefined>;
onValueChange(value: boolean): void;
switchTestID?: string;
testID?: string;
@@ -229,13 +222,7 @@ export function SettingsSwitchRow({
const { colors } = useTheme();
return (
<View style={styles.switchRow} testID={testID}>
- <View style={styles.switchTexts}>
- <Text style={styles.rowLabel}>{label}</Text>
- {hint ? <Text style={styles.hint}>{hint}</Text> : null}
- {messages?.map((message, index) => message ? (
- <Text key={message.testID ?? index} style={styles.hint} testID={message.testID}>{message.text}</Text>
- ) : null)}
- </View>
+ <Text style={styles.rowLabel}>{label}</Text>
<NativeSwitch
accessibilityLabel={accessibilityLabel ?? label}
disabled={disabled}
@@ -244,7 +231,6 @@ export function SettingsSwitchRow({
testID={switchTestID}
value={value}
/>
- {accessory}
</View>
);
}
@@ -260,6 +246,7 @@ const makeSettingsRowStyles = (colors: ThemeColors) => StyleSheet.create({
paddingHorizontal: spacing.md,
},
groupTitle: { color: colors.textTertiary, flex: 1, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.semibold },
+ groupFooterStack: { gap: spacing.xs },
groupFooter: {
color: colors.textSecondary,
fontSize: typeScale.footnote,
@@ -280,6 +267,7 @@ const makeSettingsRowStyles = (colors: ThemeColors) => StyleSheet.create({
// 左侧标签可换行(flex 1 + shrink);右侧取值右对齐、不收缩,过长截断在行宽 60% 内。
rowLabel: { color: colors.textPrimary, flex: 1, flexShrink: 1, fontSize: typeScale.body, fontWeight: fontWeight.medium, lineHeight: lineHeight.body, minWidth: 0 },
rowValue: { color: colors.textSecondary, flexShrink: 0, fontSize: typeScale.body, fontWeight: fontWeight.regular, lineHeight: lineHeight.body, maxWidth: '60%', textAlign: 'right' },
+ // 行内次级文字只留给列表条目自身的元数据(如词典别名)与录入流程的步骤提示,不放设置说明。
rowDetail: { color: colors.textSecondary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.caption },
switchRow: {
alignItems: 'center',
@@ -289,7 +277,5 @@ const makeSettingsRowStyles = (colors: ThemeColors) => StyleSheet.create({
paddingHorizontal: spacing.lg,
paddingVertical: spacing.md,
},
- switchTexts: { flex: 1, gap: spacing.xs, minWidth: 0 },
- hint: { color: colors.textSecondary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.caption },
pressed: mobileInteractionStyles.pressed,
});
diff --git a/apps/mobile/src/settings/mobileSettings.ts b/apps/mobile/src/settings/mobileSettings.ts
index d6f75e89d9..132d3e4053 100644
--- a/apps/mobile/src/settings/mobileSettings.ts
+++ b/apps/mobile/src/settings/mobileSettings.ts
@@ -17,15 +17,14 @@ export interface MobileSettingsOverviewInput {
export interface MobileSettingsRow {
copyValue?: string;
- detail?: string;
id: string;
label: string;
value: string;
}
export interface MobileSettingsSection {
- /** true 表示该分组默认折叠(如「调试 / 开发者」),普通用户不必直面。 */
- collapsible?: boolean;
+ /** 分组下方的说明(iOS Section footer);行内不再放说明文字。 */
+ footer?: string;
id: 'about' | 'debug';
rows: MobileSettingsRow[];
title: string;
@@ -53,7 +52,7 @@ export interface MobileSettingsOverview {
/**
* 把账号 / 设备 / 连接 / 调试信息整理成设置页的展示模型(纯函数,便于单测)。
* 分两层:`header` 承载用户最常看的身份 + 连接状态;`sections` 把「关于这台手机」与
- * 默认折叠的「调试 / 开发者」分开,避免一墙 ID / hash 与真正可操作项平铺等权重。
+ * 二级页「开发者」用的标识信息分开,避免一墙 ID / hash 与真正可操作项平铺等权重。
* App 版本 / OTA 运行信息不在此处 —— 由设置页的「版本」行直接读 expo-constants / expo-updates。
*/
export function buildMobileSettingsOverview(input: MobileSettingsOverviewInput): MobileSettingsOverview {
@@ -73,6 +72,7 @@ export function buildMobileSettingsOverview(input: MobileSettingsOverviewInput):
},
sections: [
{
+ footer: i18n.t('settings.about.deviceNameDetail'),
id: 'about',
title: i18n.t('settings.about.sectionTitle'),
rows: compactRows([
@@ -80,7 +80,6 @@ export function buildMobileSettingsOverview(input: MobileSettingsOverviewInput):
id: 'about.deviceName',
label: i18n.t('settings.about.deviceName'),
value: deviceName,
- detail: i18n.t('settings.about.deviceNameDetail'),
},
{
id: 'about.platform',
@@ -92,37 +91,43 @@ export function buildMobileSettingsOverview(input: MobileSettingsOverviewInput):
{
id: 'debug',
title: i18n.t('settings.debug.sectionTitle'),
- collapsible: true,
- rows: compactRows([
- {
- id: 'debug.userId',
- label: i18n.t('settings.debug.userId'),
- value: input.userId?.trim() || i18n.t('settings.debug.notSynced'),
- copyValue: input.userId?.trim() || undefined,
- },
- {
- id: 'debug.deviceId',
- label: i18n.t('settings.debug.deviceId'),
- value: input.deviceId?.trim() || i18n.t('settings.debug.initializing'),
- copyValue: input.deviceId?.trim() || undefined,
- },
- {
- id: 'debug.authBaseUrl',
- label: i18n.t('settings.debug.authServer'),
- value: input.authBaseUrl,
- copyValue: input.authBaseUrl,
- },
- {
- id: 'debug.authRegion',
- label: i18n.t('settings.debug.authRegion'),
- value: input.authRegion === 'global' ? 'Global' : 'CN',
- },
- ]),
+ rows: buildMobileDebugRows(input),
},
],
};
}
+export type MobileDebugRowsInput = Pick<MobileSettingsOverviewInput, 'authBaseUrl' | 'authRegion' | 'deviceId' | 'userId'>;
+
+/** 二级页「开发者」的「标识信息」分组:账号 / 设备 ID 可复制,外加登录服务器与区域。 */
+export function buildMobileDebugRows(input: MobileDebugRowsInput): MobileSettingsRow[] {
+ return compactRows([
+ {
+ id: 'debug.userId',
+ label: i18n.t('settings.debug.userId'),
+ value: input.userId?.trim() || i18n.t('settings.debug.notSynced'),
+ copyValue: input.userId?.trim() || undefined,
+ },
+ {
+ id: 'debug.deviceId',
+ label: i18n.t('settings.debug.deviceId'),
+ value: input.deviceId?.trim() || i18n.t('settings.debug.initializing'),
+ copyValue: input.deviceId?.trim() || undefined,
+ },
+ {
+ id: 'debug.authBaseUrl',
+ label: i18n.t('settings.debug.authServer'),
+ value: input.authBaseUrl,
+ copyValue: input.authBaseUrl,
+ },
+ {
+ id: 'debug.authRegion',
+ label: i18n.t('settings.debug.authRegion'),
+ value: input.authRegion === 'global' ? 'Global' : 'CN',
+ },
+ ]);
+}
+
export function relayStatusTone(status: DeviceLinkStatus): 'ready' | 'busy' | 'off' {
if (status === 'online') return 'ready';
if (status === 'connecting') return 'busy';
diff --git a/apps/mobile/src/update/manualUpdateCheck.test.ts b/apps/mobile/src/update/manualUpdateCheck.test.ts
index 1babb94e26..a4de3e5413 100644
--- a/apps/mobile/src/update/manualUpdateCheck.test.ts
+++ b/apps/mobile/src/update/manualUpdateCheck.test.ts
@@ -201,16 +201,18 @@ describe('manualUpdateCheckMessage', () => {
it('does not claim the Google Play app package is current after checking only content updates', async () => {
await i18n.changeLanguage('zh-CN');
const options = { isTestFlightBuild: false, isGooglePlayInstallation: true, t: i18n.t };
+ // 结果只说内容更新;「新版本请在 Google Play 中更新」常驻在版本分组的 footer。
expect(manualUpdateCheckMessage({ kind: 'up-to-date' }, options))
- .toBe('当前没有可用的内容更新。新应用版本请在 Google Play 中查看。');
+ .toBe('当前没有可用的内容更新。');
expect(manualUpdateCheckMessage({ kind: 'ota-unavailable' }, options))
- .toBe('当前构建无法检查内容更新。新应用版本请在 Google Play 中查看。');
+ .toBe('当前构建无法检查内容更新。');
+ expect(i18n.t('settings.version.googlePlayUpdateManaged')).toBe('新版本请在 Google Play 中更新。');
});
it('tells the user to fully reopen the app when reload was rejected', async () => {
await i18n.changeLanguage('zh-CN');
expect(manualUpdateCheckMessage({ kind: 'restart-required' }, { isTestFlightBuild: false, t: i18n.t }))
- .toBe('更新已下载,完全退出 App 后重新打开即可生效');
+ .toBe('更新已下载,完全退出并重新打开 App 后生效。');
});
it('uses the current language for an already completed TestFlight check', async () => {
@@ -218,10 +220,10 @@ describe('manualUpdateCheckMessage', () => {
await i18n.changeLanguage('zh-CN');
expect(manualUpdateCheckMessage(outcome, { isTestFlightBuild: true, t: i18n.t }))
- .toBe('当前没有可用的内容更新。新测试版本请在 TestFlight 中查看。');
+ .toBe('当前没有可用的内容更新。');
await i18n.changeLanguage('en');
expect(manualUpdateCheckMessage(outcome, { isTestFlightBuild: true, t: i18n.t }))
- .toBe('No content updates are available. Check TestFlight for new test builds.');
+ .toBe('No content update available.');
});
});