mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 08:36:37 +08:00
fix(frontend): keep browser API on same-origin rewrites in dev
Document that NEXT_PUBLIC_WAVELET_BACKEND_URL must stay unset for local next dev so axios hits /api/* and Next rewrites proxy to the backend.
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import { apiSections, DOCS_LAST_UPDATED } from '@/components/common/docs/api';
|
||||
import {
|
||||
getApiSections,
|
||||
DOCS_LAST_UPDATED,
|
||||
} from '@/components/common/docs/api';
|
||||
|
||||
export default async function ApiDocPage() {
|
||||
const t = await getTranslations('docs');
|
||||
|
||||
export default function ApiDocPage() {
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='API 接口文档'
|
||||
title={t('api.title')}
|
||||
lastUpdated={DOCS_LAST_UPDATED}
|
||||
sections={apiSections}
|
||||
sections={getApiSections(t)}
|
||||
description={
|
||||
<p className='text-muted-foreground text-sm leading-relaxed'>
|
||||
Wavelet 提供简单、强大的 API
|
||||
接口,支持多种编程语言和开发环境。通过标准化的 RESTful
|
||||
接口,您可以轻松地与后端服务进行集成与二次开发。
|
||||
{t('api.description')}
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import { howToUseSections } from '@/components/common/docs/how-to-use';
|
||||
import { getHowToUseSections } from '@/components/common/docs/how-to-use';
|
||||
import { DOCS_LAST_UPDATED } from '@/components/common/docs/api';
|
||||
|
||||
export default function HowToUsePage() {
|
||||
export default async function HowToUsePage() {
|
||||
const t = await getTranslations('docs');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='平台使用指南'
|
||||
title={t('howToUse.title')}
|
||||
lastUpdated={DOCS_LAST_UPDATED}
|
||||
sections={howToUseSections}
|
||||
sections={getHowToUseSections(t)}
|
||||
description={
|
||||
<p className='text-muted-foreground text-sm leading-relaxed'>
|
||||
欢迎使用 Wavelet
|
||||
脚手架系统。本文档将引导您快速了解平台的核心组件、角色权限设计及二次开发流程,帮助您快速上手开发。
|
||||
{t('howToUse.description')}
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import { privacySections } from '@/components/common/docs/privacy';
|
||||
import { getPrivacySections } from '@/components/common/docs/privacy';
|
||||
import { TERMS_LAST_UPDATED } from '@/components/common/docs/terms';
|
||||
|
||||
export default function PrivacyPolicyPage() {
|
||||
export default async function PrivacyPolicyPage() {
|
||||
const t = await getTranslations('docs');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='隐私政策 (Privacy)'
|
||||
title={t('privacy.title')}
|
||||
lastUpdated={TERMS_LAST_UPDATED}
|
||||
sections={privacySections}
|
||||
sections={getPrivacySections(t)}
|
||||
description={
|
||||
<span>
|
||||
我们非常重视您的隐私保护。本政策将向您透明地展示我们如何收集、使用、存储您的个人信息,
|
||||
{t('privacy.description')}
|
||||
<br className='hidden md:block' />
|
||||
以及您享有的相关权利。
|
||||
{t('privacy.descriptionRights')}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { LegalPageLayout } from '@/components/common/docs/legal-page-layout';
|
||||
import {
|
||||
TERMS_LAST_UPDATED,
|
||||
termsSections,
|
||||
getTermsSections,
|
||||
} from '@/components/common/docs/terms';
|
||||
|
||||
export default function TermsOfServicePage() {
|
||||
export default async function TermsOfServicePage() {
|
||||
const t = await getTranslations('docs');
|
||||
|
||||
return (
|
||||
<LegalPageLayout
|
||||
title='服务协议 (Terms)'
|
||||
title={t('terms.title')}
|
||||
lastUpdated={TERMS_LAST_UPDATED}
|
||||
sections={termsSections}
|
||||
description={<span>为了保障您的合法权益,请您仔细阅读以下条款。</span>}
|
||||
sections={getTermsSections(t)}
|
||||
description={<span>{t('terms.description')}</span>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user