Skip to content

Commit f02383d

Browse files
committed
refactor: clean up proxy descriptions and remove unused test descriptions in ProxySettingsForm
1 parent 474516b commit f02383d

3 files changed

Lines changed: 4 additions & 40 deletions

File tree

i18n/locales/en.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,11 @@
7272
"Proxy": {
7373
"Title": "Network proxy",
7474
"ScopeIncluded": "The proxy applies only to JumpServer API and background OAuth requests.",
75-
"ScopeExcluded": "The system browser and external SSH, RDP, VNC, and database clients are not affected.",
7675
"Loading": "Loading proxy settings",
7776
"LoadFailed": "Could not load proxy settings",
7877
"ConfigRecovered": "Proxy settings were safely recovered to Direct",
7978
"Retry": "Retry",
8079
"EnableProxy": "Enable proxy",
81-
"EnabledDescription": "Choose a system proxy, PAC, or manual proxy for JumpServer API and background OAuth requests.",
82-
"DisabledDescription": "The proxy is off. Supported requests connect directly to JumpServer.",
8380
"ProxySource": "Proxy source",
8481
"SystemProxy": "System proxy",
8582
"SystemProxyDescription": "Use operating system manual proxy, PAC, or WPAD settings. The route is resolved for each target.",
@@ -112,10 +109,6 @@
112109
"BypassDescription": "Enter one host, domain, IP, or CIDR per line or separate entries with commas. Local addresses always bypass the proxy.",
113110
"BypassPlaceholder": "localhost\n127.0.0.0/8\n.internal.example.com",
114111
"TestTitle": "Connection test",
115-
"TestDescriptionDirect": "Enter a JumpServer site origin to test a direct connection to its fixed well-known endpoint.",
116-
"TestDescriptionSystem": "Enter a JumpServer site origin. The app resolves the operating system proxy or PAC route for that target before testing the fixed well-known endpoint.",
117-
"TestDescriptionPac": "Enter a JumpServer site origin. The app uses the specified PAC file to resolve that target before testing the fixed well-known endpoint.",
118-
"TestDescriptionManual": "Enter a JumpServer site origin to test the manual proxy against its fixed well-known endpoint. A target matched by the bypass list does not test the proxy.",
119112
"TargetUrl": "JumpServer site address",
120113
"TestConnection": "Test connection",
121114
"TestSucceeded": "Connection succeeded",

i18n/locales/zh.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,11 @@
7272
"Proxy": {
7373
"Title": "网络代理",
7474
"ScopeIncluded": "代理仅用于 JumpServer API 和 OAuth 后台请求。",
75-
"ScopeExcluded": "系统浏览器以及外部 SSH、RDP、VNC 和数据库客户端不受此设置影响。",
7675
"Loading": "正在读取代理设置",
7776
"LoadFailed": "无法读取代理设置",
7877
"ConfigRecovered": "代理配置已安全恢复为直连",
7978
"Retry": "重试",
8079
"EnableProxy": "启用代理",
81-
"EnabledDescription": "为 JumpServer API 和 OAuth 后台请求选择系统代理、PAC 或手动代理。",
82-
"DisabledDescription": "代理已关闭,相关请求将直接连接 JumpServer。",
8380
"ProxySource": "代理来源",
8481
"SystemProxy": "系统代理",
8582
"SystemProxyDescription": "使用操作系统的手动代理、PAC 或 WPAD 设置;应用会按目标地址解析实际路径。",
@@ -112,10 +109,6 @@
112109
"BypassDescription": "每行或逗号分隔一个主机、域名、IP 或 CIDR;本机地址始终绕过代理。",
113110
"BypassPlaceholder": "localhost\n127.0.0.0/8\n.internal.example.com",
114111
"TestTitle": "连接测试",
115-
"TestDescriptionDirect": "输入 JumpServer 站点 origin,测试其固定 well-known 端点的直连访问。",
116-
"TestDescriptionSystem": "输入 JumpServer 站点 origin,应用会先按该目标解析操作系统代理或 PAC 路径,再测试固定的 well-known 端点。",
117-
"TestDescriptionPac": "输入 JumpServer 站点 origin,应用会先使用指定 PAC 解析该目标的路径,再测试固定的 well-known 端点。",
118-
"TestDescriptionManual": "输入 JumpServer 站点 origin,通过手动代理测试固定的 well-known 端点;命中绕过列表时不会测试代理。",
119112
"TargetUrl": "JumpServer 站点地址",
120113
"TestConnection": "测试连接",
121114
"TestSucceeded": "连接成功",

ui/components/ProxySettings/ProxySettingsForm.vue

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,12 @@ const proxySource = computed({
6262
if (settings.mode !== "direct") settings.mode = source;
6363
}
6464
});
65-
const proxyEnableDescription = computed(() =>
66-
proxyEnabled.value ? t("Proxy.EnabledDescription") : t("Proxy.DisabledDescription")
67-
);
6865
const proxySourceDescription = computed(() => {
6966
if (proxySource.value === "system") return t("Proxy.SystemProxyDescription");
7067
if (proxySource.value === "pac" && isLinux.value) return t("Proxy.PacProxyUnsupportedLinuxDescription");
7168
if (proxySource.value === "pac") return t("Proxy.PacProxyDescription");
7269
return t("Proxy.ManualProxyDescription");
7370
});
74-
const testDescription = computed(() => {
75-
if (settings.mode === "system") return t("Proxy.TestDescriptionSystem");
76-
if (settings.mode === "pac") return t("Proxy.TestDescriptionPac");
77-
if (settings.mode === "manual") return t("Proxy.TestDescriptionManual");
78-
return t("Proxy.TestDescriptionDirect");
79-
});
8071
const isBusy = computed(() => isPlatformLoading.value || isLoading.value || isSaving.value || isTesting.value);
8172
const passwordHelp = computed(() => {
8273
if (clearPassword.value) return t("Proxy.PasswordWillClear");
@@ -265,9 +256,6 @@ onMounted(async () => {
265256
<p class="text-sm leading-5 text-muted">
266257
{{ t("Proxy.ScopeIncluded") }}
267258
</p>
268-
<p class="text-xs leading-5 text-dimmed">
269-
{{ t("Proxy.ScopeExcluded") }}
270-
</p>
271259
</header>
272260

273261
<div v-if="loadError" class="space-y-3">
@@ -313,21 +301,16 @@ onMounted(async () => {
313301
name="proxy-enabled"
314302
:label="t('Proxy.EnableProxy')"
315303
:disabled="isBusy"
316-
aria-describedby="proxy-enabled-description"
317304
class="w-full"
318305
:ui="{
319306
root: 'w-full',
320307
wrapper: 'min-w-0',
321-
label: 'text-sm font-medium',
322-
description: 'leading-5'
308+
label: 'text-sm font-medium'
323309
}"
324310
>
325311
<template #label>
326312
<span id="proxy-enabled-label">{{ t("Proxy.EnableProxy") }}</span>
327313
</template>
328-
<template #description>
329-
<span id="proxy-enabled-description">{{ proxyEnableDescription }}</span>
330-
</template>
331314
</USwitch>
332315
</section>
333316

@@ -526,14 +509,9 @@ onMounted(async () => {
526509
<USeparator />
527510

528511
<section class="space-y-3" aria-labelledby="proxy-test-heading">
529-
<div class="space-y-1">
530-
<h2 id="proxy-test-heading" class="text-sm font-medium text-highlighted">
531-
{{ t("Proxy.TestTitle") }}
532-
</h2>
533-
<p class="text-xs leading-5 text-muted">
534-
{{ testDescription }}
535-
</p>
536-
</div>
512+
<h2 id="proxy-test-heading" class="text-sm font-medium text-highlighted">
513+
{{ t("Proxy.TestTitle") }}
514+
</h2>
537515

538516
<div class="flex flex-col items-start gap-3 sm:flex-row sm:items-start">
539517
<UFormField

0 commit comments

Comments
 (0)