From 6e7b8a6be2ba44fff70cc7360b4f5f00d43309bf Mon Sep 17 00:00:00 2001 From: divocatt <210179590+divocatt@users.noreply.github.com> Date: Fri, 29 May 2026 16:53:47 +0300 Subject: [PATCH] feat(exclusion): hide section with type exclusion --- .../src/podkop/methods/custom/getDashboardSections.ts | 4 +++- fe-app-podkop/src/podkop/types.ts | 7 ++++++- .../htdocs/luci-static/resources/view/podkop/main.js | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fe-app-podkop/src/podkop/methods/custom/getDashboardSections.ts b/fe-app-podkop/src/podkop/methods/custom/getDashboardSections.ts index 6696d66..a1f12d0 100644 --- a/fe-app-podkop/src/podkop/methods/custom/getDashboardSections.ts +++ b/fe-app-podkop/src/podkop/methods/custom/getDashboardSections.ts @@ -29,7 +29,9 @@ export async function getDashboardSections(): Promise - section.connection_type !== 'block' && section['.type'] !== 'settings', + section.connection_type !== 'block' && + section.connection_type !== 'exclusion' && + section['.type'] !== 'settings', ) .map((section) => { if (section.connection_type === 'proxy') { diff --git a/fe-app-podkop/src/podkop/types.ts b/fe-app-podkop/src/podkop/types.ts index 672ec0c..fff03c5 100644 --- a/fe-app-podkop/src/podkop/types.ts +++ b/fe-app-podkop/src/podkop/types.ts @@ -122,13 +122,18 @@ export namespace Podkop { connection_type: 'block'; } + export interface ConfigExclusionSection { + connection_type: 'exclusion'; + } + export type ConfigBaseSection = | ConfigProxyUrlTestSection | ConfigProxySelectorSection | ConfigProxyUrlSection | ConfigProxyOutboundSection | ConfigVpnSection - | ConfigBlockSection; + | ConfigBlockSection + | ConfigExclusionSection; export type ConfigSection = ConfigBaseSection & { '.name': string; diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index aefd183..009c1ae 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -716,7 +716,7 @@ async function getDashboardSections() { }) ); const data = configSections.filter( - (section) => section.connection_type !== "block" && section[".type"] !== "settings" + (section) => section.connection_type !== "block" && section.connection_type !== "exclusion" && section[".type"] !== "settings" ).map((section) => { if (section.connection_type === "proxy") { if (section.proxy_config_type === "url") {