Docs/readme mod log - #5538
Conversation
Drop the convention rule that forbade modifying new-api/QuantumNous branding; renumber remaining rules (now Rules 1-7).
The project attribution was force-rendered alongside any custom footer set in System Settings, so the admin-configured Footer field could never show clean. Remove the ProjectAttribution component and its render sites.
Rewrite Hero/Features/Stats/HowItWorks/CTA to target relay end-users (models, pricing, stability, easy setup, sign-up bonus) instead of framework operators. Add zh.json translations. Model chips switched to domestic (GLM/DeepSeek/MiniMax/Kimi/Tongyi/Doubao).
Drop the hardcoded 'Designed by New API' line from both classic footer branches, matching the default theme.
Add an admin-only Edit Pricing entry in the default theme model detail drawer. Edits ModelRatio/CompletionRatio/ModelPrice via PUT /api/option/ (reuses system-settings option API); changes take effect immediately because the backend refreshes in-memory ratio maps on each PUT. Plaza data is refetched on save.
… count Add a metric switch (费用消耗/调用次数) to the User Analytics ranking page. Switching re-selects Top N users, the ranking bar chart, and the trend chart to the chosen metric (count or quota). Default stays on quota, preserving prior behavior. Frontend-only; backend already returns sum(count).
Feat/user ranking metric toggle
Drop the '文档'/Docs CTA from the landing hero (both guest and authenticated states), keeping only Get Started + View Pricing (guest) and Go to Dashboard (auth). Removes the now-dead renderDocsButton helper, docsUrl, and unused BookOpen/useStatus imports.
feat(home): remove Docs button from homepage hero
Center the custom footer block (drop desktop left-align) and render its content with the shared Markdown component (react-markdown + remark-gfm + rehype-raw), so admins can write links like [ICP](https://beian.miit.gov.cn). External links open in a new tab. Update the Footer field description (en/zh) to hint Markdown support. Default multi-column footer unchanged.
feat(footer): center footer content and render Markdown links
Drop the logo + system name + 'Powerful API Management Platform' brand block from the default (non-custom) footer, leaving just the copyright/legal row. Tighten the footer padding and remove the now- unused displayLogo/systemLogo. Demo-mode link columns are unaffected.
chore(footer): remove brand column from default footer
Replace 3 hardcoded 'PaopaoApi' strings in the homepage (hero
description, features heading, cta sentence) with i18next {{name}}
interpolation bound to the configured system name. Change the global
DEFAULT_SYSTEM_NAME from 'New API' to 'Yunlong API'. zh.json updated;
other locales fall back to the key string.
feat(home): use dynamic system name instead of hardcoded brand
Force i18next to a single language (lng/fallbackLng/supportedLngs = zh),
drop the browser language detector, and delete the en/fr/ja/ru/vi locale
files. Remove all language-switching UI (header switcher, setup wizard,
profile language-preferences card) and the now-unused language-switcher,
language-preferences-card, and i18n/languages modules. README rewritten
to a minimal Chinese note (clone source + customization log); other
language READMEs removed. zh.json content unchanged; t('English key')
still resolves to Chinese. Backend i18n untouched.
Design specs and step-by-step implementation plans for the user-ranking metric toggle, footer centering + Markdown, and Chinese-only i18n/README changes.
Feat/chinese only
Manual (workflow_dispatch) multi-arch (amd64+arm64) build via the standard Dockerfile, pushed to <DOCKERHUB_USERNAME>/new-api with :latest, :sha-<short>, and optional :<version> tags. Runs on GitHub Actions overseas runners because the CN build host cannot reach Docker Hub. Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN repo secrets.
Resolved the single modify/delete conflict on language-preferences-card.tsx by keeping it deleted (the chinese-only change removed all language UI). All other upstream changes merged cleanly.
New brand icon for Agently: a rounded-square blue→violet gradient with a white geometric 'A' and a spark accent (SVG source + 512px PNG). favicon.ico regenerated from the same SVG (16/32/48/64 multi-size ICO) so the browser tab icon matches. Replaces the upstream new-api logo.
Regenerate logo.png at 180x180 (was 512x512) to match the original file's dimensions. Display is unchanged (CSS scales the img); this aligns the asset with the prior file.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (45)
WalkthroughThis PR customizes the new-api fork for a Yunlong/Agently deployment. It adds a multi-arch Docker publish GitHub Actions workflow, locks the frontend to Chinese-only i18n by removing all language-switching infrastructure, rebrands all homepage sections with new copy and dynamic system name, adds an admin-only model pricing editor in the model square, adds a quota/call-count metric toggle to the user dashboard, centers the footer with Markdown rendering support, and removes all non-Chinese README files. ChangesMulti-arch Docker Publish Workflow
Chinese-only i18n Lockdown
Homepage Content Rebrand
Footer Centering and Markdown Rendering
Admin Model Pricing Editor
User Dashboard Metric Toggle
README and CLAUDE.md Housekeeping
Sequence Diagram(s)sequenceDiagram
participant Admin
participant ModelHeader
participant EditPricingDialog
participant getSystemOptions
participant updateSystemOption
participant usePricingData
Admin->>ModelHeader: click "Edit Pricing" (isAdmin=true)
ModelHeader->>EditPricingDialog: open(modelName)
EditPricingDialog->>getSystemOptions: fetch ModelRatio/CompletionRatio/ModelPrice
getSystemOptions-->>EditPricingDialog: current option maps
Admin->>EditPricingDialog: edit ratio/price, click Save
EditPricingDialog->>getSystemOptions: re-fetch (avoid overwrite)
EditPricingDialog->>updateSystemOption: PUT ModelRatio
EditPricingDialog->>updateSystemOption: PUT CompletionRatio
EditPricingDialog->>updateSystemOption: PUT ModelPrice
EditPricingDialog-->>ModelHeader: onSaved()
ModelHeader->>usePricingData: refetch()
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
Important
📝 变更描述 / Description
(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
(请在此粘贴截图、关键日志或测试报告,以证明变更生效)
Summary by CodeRabbit
Release Notes
New Features
Refactor
Chores