mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-06-10 13:28:14 +03:00
feat(exclusion): hide section with type exclusion
This commit is contained in:
@@ -29,7 +29,9 @@ export async function getDashboardSections(): Promise<IGetDashboardSectionsRespo
|
||||
const data = configSections
|
||||
.filter(
|
||||
(section) =>
|
||||
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') {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user