mirror of
https://github.com/jiayouzl/Bitcoin-Monitoring.git
synced 2025-11-25 19:37:50 +08:00
bugsfix
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user