mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user