fix(fe): resolve eslint any errors and format frontend files

This commit is contained in:
Dushnilin
2026-09-16 16:33:03 +03:00
parent 0f5967e51c
commit e10509033c
7 changed files with 1073 additions and 1055 deletions
File diff suppressed because it is too large Load Diff
@@ -137,7 +137,7 @@ export function resetDirectClashApiState() {
}
function getDisplayName(section: Tachyon.ConfigSection) {
return section.label || (section as any).name || section['.name'];
return section.label || section.name || section['.name'];
}
function getSettingsSection(configSections: Tachyon.ConfigSection[]) {
@@ -1806,7 +1806,7 @@ export async function getDashboardSections(
code: outbound?.code || sectionName,
displayName:
section.label ||
(section as any).name ||
section.name ||
section.interface ||
customName ||
defaultLabel,
@@ -184,7 +184,7 @@ function formatEndpoint(address?: string, port?: string | number): string {
function getDisplayName(section: Tachyon.ConfigSection) {
return (
normalizeString(section.label) ||
normalizeString((section as any).name) ||
normalizeString(section.name) ||
section['.name']
);
}
@@ -2031,7 +2031,7 @@ function renderComponentCard(card: ComponentCard) {
function isComponentCardVisible(
card: ComponentCard,
systemInfo: any,
systemInfo: Record<string, unknown>,
): boolean {
const component = card.component;
if (component === 'tachyon' || component === 'sing_box') {
@@ -2049,7 +2049,7 @@ function isComponentCardVisible(
}
const optKey = `show_component_${component}`;
const val = (systemInfo as Record<string, any>)[optKey];
const val = systemInfo[optKey];
if (val === undefined || val === null || val === '') {
return true;
}