mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-02 08:33:46 +00:00
ui(app): update labels for unmatched rule actions in Picker components
This commit is contained in:
@@ -161,14 +161,17 @@ private struct ModeCard: View {
|
||||
.labelsHidden()
|
||||
.frame(maxWidth: 480, alignment: .leading)
|
||||
if control.snapshot.proxyMode == .rule {
|
||||
Picker("未匹配默认动作", selection: ruleDefaultActionBinding) {
|
||||
ForEach(RuleDefaultAction.allCases, id: \.self) { action in
|
||||
Text(action.label).tag(action)
|
||||
HStack(spacing: 8) {
|
||||
Text("未匹配规则时")
|
||||
Picker("未匹配规则时", selection: ruleDefaultActionBinding) {
|
||||
ForEach(RuleDefaultAction.allCases, id: \.self) { action in
|
||||
Text(action.label).tag(action)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.labelsHidden()
|
||||
.frame(maxWidth: 480, alignment: .leading)
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.labelsHidden()
|
||||
.frame(maxWidth: 480, alignment: .leading)
|
||||
}
|
||||
Text(modeDescription(control.snapshot.proxyMode))
|
||||
.font(.callout)
|
||||
|
||||
@@ -72,7 +72,7 @@ struct ProxyStatusMenu: View {
|
||||
|
||||
// 规则模式子选项(issue #63):仅规则模式呈现。
|
||||
if snapshot.proxyMode == .rule {
|
||||
Picker("未匹配默认动作", selection: ruleDefaultActionBinding) {
|
||||
Picker("未匹配规则时", selection: ruleDefaultActionBinding) {
|
||||
ForEach(RuleDefaultAction.allCases, id: \.self) { action in
|
||||
Text(action.label).tag(action)
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ enum RuleDefaultAction: String, Codable, CaseIterable, Equatable, Hashable, Send
|
||||
|
||||
var label: String {
|
||||
switch self {
|
||||
case .proxyWhenUnmatched: "未匹配时代理"
|
||||
case .directWhenUnmatched: "未匹配时直连"
|
||||
case .proxyWhenUnmatched: "代理"
|
||||
case .directWhenUnmatched: "直连"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user