feat(UI): add Split Tunneling feature card

- Replace "Safing Support" feature with Split Tunneling in features.go,
  using a dedicated config key/scope and free package tier
- Fix feature-card component to prioritize ConfigKey over ConfigScope
  when resolving the config lookup key
This commit is contained in:
Alexandr Stelnykovych
2026-05-12 18:00:06 +03:00
parent ee2e3ef357
commit 2d5628a309
2 changed files with 15 additions and 11 deletions
@@ -73,10 +73,10 @@ export class FeatureCardComponent implements OnChanges, OnDestroy {
}
let key: string | undefined;
if (this.feature?.ConfigScope) {
key = 'config:' + this.feature?.ConfigScope;
if (this.feature?.ConfigKey) {
key = this.feature?.ConfigKey;
} else {
key = this.feature?.ConfigKey;
key = 'config:' + this.feature?.ConfigScope;
}
if (!key) {
+12 -8
View File
@@ -92,15 +92,19 @@ var (
`,
},
{
Name: "Safing Support",
ID: string(account.FeatureSafingSupport),
RequiredFeatureID: account.FeatureSafingSupport,
InPackage: packagePlus,
Name: "Split Tunneling",
ID: "splittun",
ConfigKey: "splittun/enable",
ConfigScope: "splittun/",
InPackage: packageFree,
icon: `
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round"
d="M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" fill="none">
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
<path d="M8.5 12h3" />
<path d="M11 12c4-2 6-4 6.5-4.5" /> <path d="M11 12c4 2 6 4 6.5 4.5" />
<circle cx="19" cy="6" r="2" /> <circle cx="19" cy="18" r="2" /> <circle cx="4" cy="12" r="2" />
</g>
</svg>
`,
},
{