mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-08 10:54:50 +00:00
20 lines
526 B
Swift
20 lines
526 B
Swift
import SwiftUI
|
|
|
|
struct RulesPresetView: View {
|
|
@ObservedObject var workspaces: RulesWorkspaces
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: 0) {
|
|
Picker("规则方案", selection: $workspaces.selectedPreset) {
|
|
ForEach(RulePreset.allCases, id: \.self) { preset in
|
|
Text(preset.label).tag(preset)
|
|
}
|
|
}
|
|
.pickerStyle(.segmented)
|
|
.padding(.top)
|
|
.padding(.horizontal)
|
|
RulesView(workflow: workspaces.current).id(workspaces.selectedPreset)
|
|
}
|
|
}
|
|
}
|