Skip to content

Revert "fix(topup): add currency symbol to amounts in RechargeCard" - #1966

Merged
Calcium-Ion merged 1 commit into
alphafrom
revert-1952-main
Oct 3, 2025
Merged

Revert "fix(topup): add currency symbol to amounts in RechargeCard"#1966
Calcium-Ion merged 1 commit into
alphafrom
revert-1952-main

Conversation

@Calcium-Ion

@Calcium-Ion Calcium-Ion commented Oct 3, 2025

Copy link
Copy Markdown
Member

Reverts #1952

Summary by CodeRabbit

  • Refactor
    • Simplified registration: removed terms checkbox and client-side password/confirmation checks; relies on server-side validation.
  • Chores
    • Removed User Agreement and Privacy Policy pages and navigation routes.
    • Removed corresponding API endpoints.
    • Removed related admin settings fields.
    • Cleaned up related translations across supported languages.

@Calcium-Ion
Calcium-Ion merged commit 68d9751 into alpha Oct 3, 2025
@coderabbitai

coderabbitai Bot commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

The change removes user agreement and privacy policy functionality across backend and frontend: API handlers and routes, option-map initialization keys, React routes and pages, related registration checks/UI, settings inputs and handlers, locale strings, and a shared content detection utility. No replacements were introduced; existing unrelated flows remain unchanged.

Changes

Cohort / File(s) Summary
Backend handlers & routes
controller/misc.go, router/api-router.go
Deleted HTTP handlers GetUserAgreement, GetPrivacyPolicy and removed GET routes /user-agreement, /privacy-policy.
Backend options
model/option.go
Removed initialization of common.OptionMap["UserAgreement"] and ["PrivacyPolicy"].
Frontend routing & pages
web/src/App.jsx, web/src/pages/UserAgreement/*, web/src/pages/PrivacyPolicy/*
Removed imports and <Route> entries for /user-agreement and /privacy-policy. Deleted both page implementations.
Frontend auth form
web/src/components/auth/RegisterForm.jsx
Removed password length/confirm checks and terms agreement gating; deleted terms-related state, effects, and UI.
Frontend settings UI
web/src/components/settings/OtherSetting.jsx
Removed UserAgreement/PrivacyPolicy fields, handlers, loading flags, and related UI controls.
Localization
web/src/i18n/locales/en.json, .../fr.json, .../zh.json
Removed keys related to user agreement/privacy policy (EN, ZH). FR saw reordering without semantic change.
Frontend utilities
web/src/utils/contentDetector.js
Deleted utility and its exports: isUrl, isHtmlContent, isMarkdownContent, getContentType.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant FE as Frontend (Router)
  participant BE as API Server
  Note over U,BE: Previous flow (removed)
  U->>FE: Navigate /user-agreement or /privacy-policy
  FE->>BE: GET /api/user-agreement or /api/privacy-policy
  BE-->>FE: 200 + content (html/markdown/url)
  FE-->>U: Render page (iframe/HTML/Markdown)
Loading
sequenceDiagram
  autonumber
  participant U as User
  participant FE as Frontend (Router)
  participant BE as API Server
  rect rgba(255,230,230,0.4)
  Note over U,BE: New flow
  U->>FE: Navigate /user-agreement or /privacy-policy
  FE-->>U: Route not found (no page)
  U->>BE: GET /api/user-agreement or /api/privacy-policy
  BE-->>U: 404 (endpoint removed)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • creamlike1024

Poem

In burrows of code I thump with delight,
Two pages hop off into night.
No more links, no checkbox pause—
Sleek paths trimmed with tidy claws.
I twitch my nose at routes once grand,
Lighter fields across the land. 🐇✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-1952-main

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d33ec8 and 3473329.

⛔ Files ignored due to path filters (1)
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • controller/misc.go (0 hunks)
  • model/option.go (0 hunks)
  • router/api-router.go (0 hunks)
  • web/src/App.jsx (0 hunks)
  • web/src/components/auth/RegisterForm.jsx (1 hunks)
  • web/src/components/settings/OtherSetting.jsx (0 hunks)
  • web/src/i18n/locales/en.json (0 hunks)
  • web/src/i18n/locales/fr.json (0 hunks)
  • web/src/i18n/locales/zh.json (1 hunks)
  • web/src/pages/PrivacyPolicy/index.jsx (0 hunks)
  • web/src/pages/UserAgreement/index.jsx (0 hunks)
  • web/src/utils/contentDetector.js (0 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant