feat: add domain rules management feature

- Introduced a new DomainRulesPage component for managing custom and global equivalent domains.
- Updated AppMainRoutes to include a route for domain rules.
- Added API functions to fetch and save domain rules.
- Enhanced localization with new strings for domain rules in multiple languages.
- Updated styles for the new domain rules interface and ensured responsiveness.
- Added types for domain rules in the TypeScript definitions.
This commit is contained in:
shuaiplus
2026-05-06 00:33:09 +08:00
parent 246c73a3d3
commit 0a001bebcc
32 changed files with 2045 additions and 32 deletions
+22 -1
View File
@@ -874,7 +874,28 @@ const en: Record<string, string> = {
"txt_status_inactive": "Inactive",
"txt_language": "Language",
"txt_display_language": "Display language",
"txt_language_saved_locally": "This preference is saved in this browser and used before the app loads next time."
"txt_language_saved_locally": "This preference is saved in this browser and used before the app loads next time.",
"nav_domain_rules": "Domain Rules",
"txt_domain_rules_description": "Mark sites that share one login as equivalent domains. Global rules come from the preset list; custom rules only affect your own matching.",
"txt_submit_pr": "Submit PR",
"txt_custom_equivalent_domains": "Custom equivalent domains",
"txt_global_equivalent_domains": "Global equivalent domains",
"txt_domain_group": "Domain group",
"txt_no_custom_domain_rules": "No custom domain rules",
"txt_no_domain_rules_found": "No domain rules found",
"txt_search_domains": "Search domains",
"txt_domain_rules_saved": "Domain rules saved",
"txt_domain_rules_save_failed": "Saving domain rules failed",
"txt_domain_rules_load_failed": "Loading domain rules failed",
"txt_domain_rules_invalid_response": "Invalid domain rules response",
"txt_domain_rules_refreshed": "Domain rules refreshed",
"txt_saving": "Saving...",
"txt_domain_rule_needs_two_domains": "Each domain rule needs at least two domains.",
"txt_domain_rule_invalid_domains": "Please enter valid domains, such as example.com.",
"txt_add_domain": "Add domain",
"txt_expand": "Expand",
"txt_collapse": "Collapse",
"txt_remove_domain": "Remove domain"
};
export default en;