This commit is contained in:
ZhangLei
2025-10-31 16:12:45 +08:00
parent 5969b7ae39
commit 50689c54a0

View File

@@ -105,8 +105,7 @@ struct PreferencesWindowView: View {
.labelsHidden()
}
if tempProxyEnabled {
//
// -
VStack(alignment: .leading, spacing: 12) {
Text("代理服务器配置")
.font(.caption)
@@ -122,6 +121,7 @@ struct PreferencesWindowView: View {
TextField("例如: proxy.example.com", text: $tempProxyHost)
.textFieldStyle(RoundedBorderTextFieldStyle())
.frame(maxWidth: .infinity)
.disabled(!tempProxyEnabled)
}
//
@@ -133,12 +133,11 @@ struct PreferencesWindowView: View {
TextField("8080", text: $tempProxyPort)
.textFieldStyle(RoundedBorderTextFieldStyle())
.frame(width: 80)
.disabled(!tempProxyEnabled)
}
}
}
.transition(.opacity.combined(with: .scale(scale: 0.95)))
.animation(.easeInOut(duration: 0.2), value: tempProxyEnabled)
}
.opacity(tempProxyEnabled ? 1.0 : 0.6) //
}
}
@@ -178,7 +177,7 @@ struct PreferencesWindowView: View {
.padding(.horizontal, 24)
.padding(.vertical, 16)
}
.frame(width: 480, height: 520)
.frame(width: 480, height: 600)
.alert("配置验证", isPresented: $showingValidationError) {
Button("确定", role: .cancel) { }
} message: {
@@ -310,7 +309,6 @@ struct IntervalSelectionButton: View {
let onSelect: () -> Void
var body: some View {
Button(action: onSelect) {
HStack {
Image(systemName: isSelected ? "checkmark.circle.fill" : "circle")
.font(.system(size: 14))
@@ -332,8 +330,10 @@ struct IntervalSelectionButton: View {
RoundedRectangle(cornerRadius: 6)
.stroke(isSelected ? Color.blue : Color(NSColor.separatorColor), lineWidth: 1)
)
.contentShape(RoundedRectangle(cornerRadius: 6)) //
.onTapGesture {
onSelect()
}
.buttonStyle(PlainButtonStyle())
}
}