mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-06-22 18:44:12 +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
|
const data = configSections
|
||||||
.filter(
|
.filter(
|
||||||
(section) =>
|
(section) =>
|
||||||
section.connection_type !== 'block' && section['.type'] !== 'settings',
|
section.connection_type !== 'block' &&
|
||||||
|
section.connection_type !== 'exclusion' &&
|
||||||
|
section['.type'] !== 'settings',
|
||||||
)
|
)
|
||||||
.map((section) => {
|
.map((section) => {
|
||||||
if (section.connection_type === 'proxy') {
|
if (section.connection_type === 'proxy') {
|
||||||
|
|||||||
@@ -122,13 +122,18 @@ export namespace Podkop {
|
|||||||
connection_type: 'block';
|
connection_type: 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ConfigExclusionSection {
|
||||||
|
connection_type: 'exclusion';
|
||||||
|
}
|
||||||
|
|
||||||
export type ConfigBaseSection =
|
export type ConfigBaseSection =
|
||||||
| ConfigProxyUrlTestSection
|
| ConfigProxyUrlTestSection
|
||||||
| ConfigProxySelectorSection
|
| ConfigProxySelectorSection
|
||||||
| ConfigProxyUrlSection
|
| ConfigProxyUrlSection
|
||||||
| ConfigProxyOutboundSection
|
| ConfigProxyOutboundSection
|
||||||
| ConfigVpnSection
|
| ConfigVpnSection
|
||||||
| ConfigBlockSection;
|
| ConfigBlockSection
|
||||||
|
| ConfigExclusionSection;
|
||||||
|
|
||||||
export type ConfigSection = ConfigBaseSection & {
|
export type ConfigSection = ConfigBaseSection & {
|
||||||
'.name': string;
|
'.name': string;
|
||||||
|
|||||||
@@ -716,7 +716,7 @@ async function getDashboardSections() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
const data = configSections.filter(
|
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) => {
|
).map((section) => {
|
||||||
if (section.connection_type === "proxy") {
|
if (section.connection_type === "proxy") {
|
||||||
if (section.proxy_config_type === "url") {
|
if (section.proxy_config_type === "url") {
|
||||||
|
|||||||
Reference in New Issue
Block a user