CI / changes (push) Successful in 11s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 1m3s
CI / go (push) Has been skipped
CI / bird2 (push) Has been skipped
CI / release (push) Successful in 4m4s
Updated the ModuleDetailComponent to include new queries for communities and DoH profiles, improving data handling. Added a module type alert function for better user guidance and refined the UI to display module type in a more user-friendly manner. Removed unused components and streamlined the refresh functionality for better performance.
30 lines
733 B
TypeScript
30 lines
733 B
TypeScript
import type { DohResolverPolicy } from '@/types/api'
|
|
|
|
export function dohPolicyRu(policy: DohResolverPolicy | string | null | undefined): string {
|
|
switch (policy) {
|
|
case 'primary_only':
|
|
return 'Только первый'
|
|
case 'failover':
|
|
return 'Резервирование'
|
|
case 'union':
|
|
return 'Объединение'
|
|
default:
|
|
return 'Только первый'
|
|
}
|
|
}
|
|
|
|
export function moduleTypeRu(type: string): string {
|
|
switch (type) {
|
|
case 'AS_PREFIXES':
|
|
return 'AS (номера)'
|
|
case 'CDN_CIDRS':
|
|
return 'CDN CIDR'
|
|
case 'DOMAINS':
|
|
return 'Домены'
|
|
case 'IP_RANGES':
|
|
return 'IP-диапазоны'
|
|
default:
|
|
return type
|
|
}
|
|
}
|