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
+6
View File
@@ -909,6 +909,8 @@ export function createDemoMainRoutesProps(base: AppMainRoutesProps, notify: Noti
authorizedDevices: state.authorizedDevices,
authorizedDevicesLoading: false,
authorizedDevicesError: '',
domainRulesLoading: false,
domainRulesError: '',
onImport: async () => {
await readonly();
return createDemoImportResult();
@@ -1055,6 +1057,10 @@ export function createDemoMainRoutesProps(base: AppMainRoutesProps, notify: Noti
onRefreshAuthorizedDevices: async () => {
notify('success', t('txt_demo_devices_refreshed'));
},
onRefreshDomainRules: () => {
notify('success', t('txt_domain_rules_refreshed'));
},
onSaveDomainRules: readonly,
onRenameAuthorizedDevice: async (device, name) => {
const normalized = String(name || '').trim();
if (!normalized) {