diff --git a/ShadowsocksX-NG2/App/Resources/Connectivity.xcstrings b/ShadowsocksX-NG2/App/Resources/Connectivity.xcstrings index e7754cae..7ce47859 100644 --- a/ShadowsocksX-NG2/App/Resources/Connectivity.xcstrings +++ b/ShadowsocksX-NG2/App/Resources/Connectivity.xcstrings @@ -391,23 +391,6 @@ } } } - }, - "最快 %@": { - "extractionState": "manual", - "localizations": { - "en": { - "stringUnit": { - "state": "translated", - "value": "Fastest %@" - } - }, - "zh-Hans": { - "stringUnit": { - "state": "translated", - "value": "最快 %@" - } - } - } } }, "version": "1.0" diff --git a/ShadowsocksX-NG2/App/UI/Servers/ConnectivityViews.swift b/ShadowsocksX-NG2/App/UI/Servers/ConnectivityViews.swift index c38997f5..b52b0c18 100644 --- a/ShadowsocksX-NG2/App/UI/Servers/ConnectivityViews.swift +++ b/ShadowsocksX-NG2/App/UI/Servers/ConnectivityViews.swift @@ -47,7 +47,7 @@ struct ConnectivityCell: View { let summary = module.summary(for: node.connectivityServerIDs, at: date) if node.isGroup { record = summary.record - text = record.map { ConnectivityCopy.fastest($0.outcome) } ?? (summary.hasResults ? "—" : "") + text = record.map { ConnectivityCopy.outcome($0.outcome) } ?? (summary.hasResults ? "—" : "") if let id = summary.serverID { prefix = workflow.displayName(for: id) + " · " } } else { record = module.history(for: node.id).first @@ -111,9 +111,6 @@ enum ConnectivityCopy { case .http(let status): "HTTP \(status)" } } - static func fastest(_ value: ServerConnectivity.Outcome) -> String { - String.localizedStringWithFormat(text("最快 %@"), outcome(value)) - } } struct ConnectivityDetailView: View { diff --git a/ShadowsocksX-NG2/App/UI/Servers/FavoriteServersTable.swift b/ShadowsocksX-NG2/App/UI/Servers/FavoriteServersTable.swift index f10d9138..1b3ea134 100644 --- a/ShadowsocksX-NG2/App/UI/Servers/FavoriteServersTable.swift +++ b/ShadowsocksX-NG2/App/UI/Servers/FavoriteServersTable.swift @@ -36,13 +36,13 @@ struct FavoriteServersTable: View { TableColumn("名称") { node in ServerTableNameCell(node: node, activeTargetID: activeTargetID) } - .width(min: 140, ideal: 200) + .width(min: 140, ideal: 160) TableColumn(ConnectivityCopy.text("响应延迟")) { node in if let module = workflow.connectivity { ConnectivityCell(module: module, node: node, workflow: workflow) } } - .width(min: 90, ideal: 110) + .width(min: 50, ideal: 60) TableColumn("路径") { node in let path = path(for: node) Text(path) diff --git a/ShadowsocksX-NG2/App/UI/Servers/ServersView.swift b/ShadowsocksX-NG2/App/UI/Servers/ServersView.swift index f639ac5a..2afcdad9 100644 --- a/ShadowsocksX-NG2/App/UI/Servers/ServersView.swift +++ b/ShadowsocksX-NG2/App/UI/Servers/ServersView.swift @@ -153,19 +153,19 @@ struct ServersView: View { } .padding(.leading, CGFloat(depths[node.id] ?? 0) * 14) } - .width(min: 160, ideal: 240) - TableColumn(ConnectivityCopy.text("响应延迟")) { node in - if let module = workflow.connectivity { - ConnectivityCell(module: module, node: node, workflow: workflow) - } - } - .width(min: 90, ideal: 110) + .width(min: 160, ideal: 180) TableColumn("收藏") { node in Image(systemName: workflow.isFavorite(node.id) ? "star.fill" : "star") .accessibilityLabel(Text("收藏")) .accessibilityValue(Text(workflow.isFavorite(node.id) ? "收藏" : "—")) } - .width(44) + .width(36) + TableColumn(ConnectivityCopy.text("响应延迟")) { node in + if let module = workflow.connectivity { + ConnectivityCell(module: module, node: node, workflow: workflow) + } + } + .width(min: 50, ideal: 60) TableColumn("创建时间", sortUsing: ServerTableSort(.createdAt)) { node in timestampCell(node.createdAt) }