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。

chore(legal): 服务条款与隐私协议链接改用官网域名

xd-bobo4f59eef34b7a
diff --git a/apps/desktop/src/renderer/components/login/LoginPage.tsx b/apps/desktop/src/renderer/components/login/LoginPage.tsx
index 0b60947923..8d89364f46 100644
--- a/apps/desktop/src/renderer/components/login/LoginPage.tsx
+++ b/apps/desktop/src/renderer/components/login/LoginPage.tsx
@@ -354,7 +354,7 @@ export function LoginPage({
}, [consentDialogOpen, currentConsentStamp.step, credentialStoreFailed]);
const openLegalLink = (kind: 'terms' | 'privacy') => {
// 链接经系统默认浏览器打开(shell:open-external 只放行 http(s),未登录可用);
- // URL 按构建区域分流(国内 protocol.xd.cn / 国际 protocol.xd.com)。
+ // URL 按构建区域分流(国内 cindy.cn / 国际 cindy.app)。
// 吞掉 IPC 失败(与移动端 Linking.openURL(...).catch 同口径),避免未处理 rejection
void window.electronAPI
?.openExternal?.(kind === 'terms' ? LEGAL_LINKS.termsOfService : LEGAL_LINKS.privacyPolicy)
diff --git a/apps/desktop/src/renderer/components/login/__tests__/LoginPage.consent.test.tsx b/apps/desktop/src/renderer/components/login/__tests__/LoginPage.consent.test.tsx
index 1cdaa11c8b..35b22aaac8 100644
--- a/apps/desktop/src/renderer/components/login/__tests__/LoginPage.consent.test.tsx
+++ b/apps/desktop/src/renderer/components/login/__tests__/LoginPage.consent.test.tsx
@@ -47,8 +47,8 @@ import { LoginPage } from '../LoginPage';
import { parseLegalSegments } from '../LoginControls';
import { LEGAL_LINKS } from '../../../../shared/legalLinks';
-const CN_TERMS_URL = 'https://protocol.xd.cn/cindy/agreement.html';
-const CN_PRIVACY_URL = 'https://protocol.xd.cn/cindy/privacy-1.0.html';
+const CN_TERMS_URL = 'https://cindy.cn/terms';
+const CN_PRIVACY_URL = 'https://cindy.cn/privacy';
async function identifierState(scenario: string): Promise<AuthFlowState> {
const client = new CindyAuthClient({
diff --git a/apps/desktop/src/renderer/components/login/__tests__/LoginPage.region.harness.test.tsx b/apps/desktop/src/renderer/components/login/__tests__/LoginPage.region.harness.test.tsx
index 90ef536080..ecb9b14bcd 100644
--- a/apps/desktop/src/renderer/components/login/__tests__/LoginPage.region.harness.test.tsx
+++ b/apps/desktop/src/renderer/components/login/__tests__/LoginPage.region.harness.test.tsx
@@ -43,7 +43,7 @@ vi.mock('react-i18next', () => ({
params ? [key, ...Object.values(params)].join('#') : (CONSENT_TEXT[key] ?? key),
}),
}));
-// 构建区域 = global(LEGAL_LINKS 亦随之解析为 protocol.xd.com 系)
+// 构建区域 = global(LEGAL_LINKS 亦随之解析为 cindy.app 系)
vi.mock('../../../../shared/brandRegion', () => ({
CURRENT_CINDY_REGION: 'global',
CURRENT_APP_ID: 'com.xd.cindy',
@@ -53,8 +53,8 @@ vi.mock('@/components/title-bar/WindowControls', () => ({ WindowControls: () =>
import { LoginPage } from '../LoginPage';
-const GLOBAL_TERMS_URL = 'https://protocol.xd.com/cindy/agreement-1.0.html';
-const GLOBAL_PRIVACY_URL = 'https://protocol.xd.com/cindy/privacy.html';
+const GLOBAL_TERMS_URL = 'https://cindy.app/terms';
+const GLOBAL_PRIVACY_URL = 'https://cindy.app/privacy';
async function globalIdentifierState(scenario = 'providers:global-social'): Promise<AuthFlowState> {
const client = new CindyAuthClient({
@@ -109,7 +109,7 @@ afterEach(() => {
});
describe('Global 构建变体:登录改版四件事同样生效', () => {
- it('确实处于 Global 变体(不挂区域徽标 + 邮箱 identifier + 协议链接走 protocol.xd.com)', async () => {
+ it('确实处于 Global 变体(不挂区域徽标 + 邮箱 identifier + 协议链接走 cindy.app)', async () => {
mount(await globalIdentifierState());
// global 构建不挂徽标(#554 起的产品叙事硬规则,DESIGN.md §16.3:不得回退);
// cn / dev 才标注。徽标的三档区域映射本身由 LoginPage.regionPill.test 覆盖,
diff --git a/apps/desktop/src/shared/legalLinks.ts b/apps/desktop/src/shared/legalLinks.ts
index 5879afa34b..37d9ad6bfd 100644
--- a/apps/desktop/src/shared/legalLinks.ts
+++ b/apps/desktop/src/shared/legalLinks.ts
@@ -2,8 +2,8 @@
* legalLinks — 服务条款 / 隐私协议链接的区域分流单点。
*
* 区域与 brandRegion 同口径:构建期 VITE_CINDY_AUTH_REGION 烘焙,运行时不可
- * 切换(cn 与 global 是两个可并存的系统身份)。国内走 protocol.xd.cn,国际走
- * protocol.xd.com;链接一律经系统默认浏览器打开(renderer 走
+ * 切换(cn 与 global 是两个可并存的系统身份)。国内走 cindy.cn,国际走
+ * cindy.app;链接一律经系统默认浏览器打开(renderer 走
* `window.electronAPI.openExternal`,channel `shell:open-external` 只放行 http(s))。
*/
@@ -17,13 +17,13 @@ export interface LegalLinks {
}
const CN_LEGAL_LINKS: LegalLinks = {
- termsOfService: 'https://protocol.xd.cn/cindy/agreement.html',
- privacyPolicy: 'https://protocol.xd.cn/cindy/privacy-1.0.html',
+ termsOfService: 'https://cindy.cn/terms',
+ privacyPolicy: 'https://cindy.cn/privacy',
};
const GLOBAL_LEGAL_LINKS: LegalLinks = {
- termsOfService: 'https://protocol.xd.com/cindy/agreement-1.0.html',
- privacyPolicy: 'https://protocol.xd.com/cindy/privacy.html',
+ termsOfService: 'https://cindy.app/terms',
+ privacyPolicy: 'https://cindy.app/privacy',
};
/** 本构建区域的协议链接(dev 区域归 cn 系,与登录 identifier 形态同口径)。 */
diff --git a/apps/mobile/src/__tests__/mobileSettings.test.ts b/apps/mobile/src/__tests__/mobileSettings.test.ts
index b70acacd87..360319e0e1 100644
--- a/apps/mobile/src/__tests__/mobileSettings.test.ts
+++ b/apps/mobile/src/__tests__/mobileSettings.test.ts
@@ -273,7 +273,7 @@ describe('mobile settings overview', () => {
const filingNumberIndex = source.indexOf('testID="settings.appFilingNumber"');
const accountActionsIndex = source.indexOf('testID="settings.accountActions"');
- // 链接不再本地写死:与登录页共用 legalLinks 区域分流单点(protocol.xd.cn/.com)
+ // 链接不再本地写死:与登录页共用 legalLinks 区域分流单点(cindy.cn / cindy.app)
expect(source).toContain("import { LEGAL_LINKS } from '@/config/legalLinks';");
expect(source).toContain('Linking.openURL(LEGAL_LINKS.privacyPolicy)');
expect(source).toContain('Linking.openURL(LEGAL_LINKS.termsOfService)');
diff --git a/apps/mobile/src/auth/__tests__/loginConsent.test.ts b/apps/mobile/src/auth/__tests__/loginConsent.test.ts
index 70afb9f80d..1144b39584 100644
--- a/apps/mobile/src/auth/__tests__/loginConsent.test.ts
+++ b/apps/mobile/src/auth/__tests__/loginConsent.test.ts
@@ -15,7 +15,7 @@ it('evaluates the production regional legal links for the Global build', () => {
const compiled = ts.transpileModule(source, { compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2022 } }).outputText;
const exports: any = {};
new Function('require', 'exports', compiled)(() => ({ AUTH_REGION: 'global' }), exports);
- expect(exports.LEGAL_LINKS).toEqual({ termsOfService: 'https://protocol.xd.com/cindy/agreement-1.0.html', privacyPolicy: 'https://protocol.xd.com/cindy/privacy.html' });
+ expect(exports.LEGAL_LINKS).toEqual({ termsOfService: 'https://cindy.app/terms', privacyPolicy: 'https://cindy.app/privacy' });
});
// The P1 was clipped Android hit bounds and an unlabeled checkbox. Run the
@@ -86,12 +86,12 @@ describe("parseLegalSegments(单 key 内联链接标记,词序无关)", () => {
});
describe("LEGAL_LINKS(区域分流,测试构建 = cn)", () => {
- it("cn 构建 → protocol.xd.cn 双链接", () => {
+ it("cn 构建 → cindy.cn 双链接", () => {
expect(LEGAL_LINKS.termsOfService).toBe(
- "https://protocol.xd.cn/cindy/agreement.html",
+ "https://cindy.cn/terms",
);
expect(LEGAL_LINKS.privacyPolicy).toBe(
- "https://protocol.xd.cn/cindy/privacy-1.0.html",
+ "https://cindy.cn/privacy",
);
});
});
diff --git a/apps/mobile/src/config/legalLinks.ts b/apps/mobile/src/config/legalLinks.ts
index e48b637c0b..e83a56a8c7 100644
--- a/apps/mobile/src/config/legalLinks.ts
+++ b/apps/mobile/src/config/legalLinks.ts
@@ -3,7 +3,7 @@
* shared/legalLinks.ts 同 URL 权威源)。
*
* 区域 = 构建期 EXPO_PUBLIC_CINDY_AUTH_REGION(env.ts AUTH_REGION);dev 归 cn 系
- * (与登录 identifier 形态同口径)。国内走 protocol.xd.cn,国际走 protocol.xd.com;
+ * (与登录 identifier 形态同口径)。国内走 cindy.cn,国际走 cindy.app;
* 链接一律 `Linking.openURL` 交系统默认浏览器打开。
*/
@@ -17,13 +17,13 @@ export interface LegalLinks {
}
const CN_LEGAL_LINKS: LegalLinks = {
- termsOfService: 'https://protocol.xd.cn/cindy/agreement.html',
- privacyPolicy: 'https://protocol.xd.cn/cindy/privacy-1.0.html',
+ termsOfService: 'https://cindy.cn/terms',
+ privacyPolicy: 'https://cindy.cn/privacy',
};
const GLOBAL_LEGAL_LINKS: LegalLinks = {
- termsOfService: 'https://protocol.xd.com/cindy/agreement-1.0.html',
- privacyPolicy: 'https://protocol.xd.com/cindy/privacy.html',
+ termsOfService: 'https://cindy.app/terms',
+ privacyPolicy: 'https://cindy.app/privacy',
};
/** 本构建区域的协议链接(dev 归 cn 系)。 */