出站选项改成卡片,带协议和延迟

参照 fl-clash:一张卡三行——名字、协议(策略组显示「类型(当前选中)」)、最近一次延迟。
延迟按 200/500 毫秒分三档着色,没测过就留空而不是显示 0。
这些数据配置文件里都没有,全部来自内核的 /proxies。

另外主区最大宽度从 960 提到 1600,去掉选中行的左侧高亮条。
This commit is contained in:
im0o
2026-08-10 12:09:03 +08:00
parent 206e14c7e7
commit 69ae918e7c
4 changed files with 225 additions and 80 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import { collectInbounds, collectOutboundNames, outboundToProxyField } from '@sh
import type { Inbound, OutboundMode } from '@shared/inbounds.ts'
import type { ConfigObject } from '../../vendor/config-editor/index.ts'
import { ApiError, api } from '../api'
import type { ProxyInfo } from '../api'
import { density } from '../prefs'
import InboundDetail from './InboundDetail.vue'
import IconAdd from '~icons/ri/add-line'
@@ -13,6 +14,7 @@ const props = defineProps<{
revision: string
kernelOnline: boolean
providerLines: string[]
runtime: Record<string, ProxyInfo>
}>()
const emit = defineEmits<{ changed: [] }>()
@@ -145,6 +147,7 @@ async function pickOutbound(mode: OutboundMode) {
:groups="outbounds.groups"
:own-proxies="outbounds.ownProxies"
:provider-lines="providerLines"
:runtime="runtime"
:kernel-online="kernelOnline"
:saving="saving"
@pick="pickOutbound"
@@ -251,7 +254,6 @@ async function pickOutbound(mode: OutboundMode) {
gap: var(--s-3);
padding: var(--s-3) var(--s-4);
border: none;
border-left: 2px solid transparent;
background: none;
cursor: pointer;
text-align: left;
@@ -263,7 +265,6 @@ async function pickOutbound(mode: OutboundMode) {
.line.is-on {
background: var(--c-accent-soft);
border-left-color: var(--c-accent);
}
.port {