订阅健康检查默认开启,编辑支持改名
内核没有默认的健康检查地址,url 为空时检查根本不会运行 (adapter/provider/healthcheck.go:196-199),所以默认值必须写全; 开关只翻 enable,手写的 url/interval 留着下次开启时还用。 改名和策略组 use: 的引用同步收在同一次变换里,链式副本由保存 链路的 syncGenerated 按新名字重建,缓存路径刻意不动——file 类型 的数据本体和副本认亲都靠它。
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* 订阅列表。每行一个订阅:名字、当前线路数、上次更新时间、健康检查开没开。
|
||||
* 订阅列表。每行一个订阅:名字、当前线路数、上次更新时间。
|
||||
*
|
||||
* 只管显示和选中,不碰任何数据。
|
||||
*/
|
||||
@@ -13,8 +13,6 @@ defineProps<{
|
||||
lines: number | null
|
||||
/** 上次拉取成功的时刻。null 表示不知道或从没拉取过 */
|
||||
updated: Date | null
|
||||
/** 健康检查开没开 */
|
||||
healthCheck: boolean
|
||||
}>
|
||||
}>()
|
||||
const selected = defineModel<string | null>('selected', { required: true })
|
||||
@@ -40,9 +38,6 @@ function formatUpdated(at: Date): string {
|
||||
<template v-else>—</template>
|
||||
</span>
|
||||
<span class="updated mono">{{ row.updated ? formatUpdated(row.updated) : '—' }}</span>
|
||||
<span :class="['hc', !row.healthCheck && 'is-off']">
|
||||
{{ row.healthCheck ? '健康检查' : '—' }}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -66,7 +61,7 @@ function formatUpdated(at: Date): string {
|
||||
.line {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 4rem 6.5rem 4.5rem;
|
||||
grid-template-columns: minmax(0, 1fr) 4rem 6.5rem;
|
||||
align-items: center;
|
||||
gap: var(--s-3);
|
||||
padding: var(--s-3) var(--s-4);
|
||||
@@ -98,14 +93,4 @@ function formatUpdated(at: Date): string {
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--c-text-soft);
|
||||
}
|
||||
|
||||
.hc {
|
||||
text-align: right;
|
||||
font-size: var(--t-xs);
|
||||
color: var(--c-text-soft);
|
||||
}
|
||||
|
||||
.hc.is-off {
|
||||
color: var(--c-text-faint);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user