mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-11 12:15:53 +00:00
Simplify permissions UI in welcome screen
- Removed white bordered containers - Simplified explanation text to be more concise - Removed redundant labels and icons - Made layout more compact - Cleaner, more minimal design
This commit is contained in:
parent
0e4d202d71
commit
042163d3ab
1 changed files with 26 additions and 62 deletions
|
|
@ -255,7 +255,7 @@ private struct RequestPermissionsPageView: View {
|
|||
.fontWeight(.semibold)
|
||||
|
||||
Text(
|
||||
"VibeTunnel needs permissions to launch terminal sessions and send commands to certain terminals."
|
||||
"VibeTunnel needs AppleScript to launch and manage terminal sessions\nand accessibility to send commands to certain terminals."
|
||||
)
|
||||
.font(.body)
|
||||
.foregroundColor(.secondary)
|
||||
|
|
@ -263,77 +263,41 @@ private struct RequestPermissionsPageView: View {
|
|||
.frame(maxWidth: 480)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
// Permissions list
|
||||
VStack(spacing: 20) {
|
||||
// AppleScript permission
|
||||
VStack(spacing: 12) {
|
||||
// Permissions buttons
|
||||
VStack(spacing: 16) {
|
||||
// Automation permission
|
||||
if appleScriptManager.hasPermission {
|
||||
HStack {
|
||||
Image(systemName: "applescript")
|
||||
.font(.title2)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Automation Permission")
|
||||
.font(.headline)
|
||||
Text("Required to launch and control terminal applications")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.foregroundColor(.green)
|
||||
Text("Automation permission granted")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
if appleScriptManager.hasPermission {
|
||||
HStack {
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.foregroundColor(.green)
|
||||
Text("Automation permission granted")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.font(.body)
|
||||
} else {
|
||||
Button("Grant Automation Permission") {
|
||||
appleScriptManager.requestPermission()
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.controlSize(.large)
|
||||
.font(.body)
|
||||
} else {
|
||||
Button("Grant Automation Permission") {
|
||||
appleScriptManager.requestPermission()
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.controlSize(.large)
|
||||
}
|
||||
.padding()
|
||||
.background(Color(NSColor.controlBackgroundColor))
|
||||
.cornerRadius(8)
|
||||
|
||||
// Accessibility permission
|
||||
VStack(spacing: 12) {
|
||||
if hasAccessibilityPermission {
|
||||
HStack {
|
||||
Image(systemName: "accessibility")
|
||||
.font(.title2)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Accessibility Permission")
|
||||
.font(.headline)
|
||||
Text("Required for terminals like Ghostty that need keystroke input")
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.foregroundColor(.green)
|
||||
Text("Accessibility permission granted")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
if hasAccessibilityPermission {
|
||||
HStack {
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.foregroundColor(.green)
|
||||
Text("Accessibility permission granted")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.font(.body)
|
||||
} else {
|
||||
Button("Grant Accessibility Permission") {
|
||||
AccessibilityPermissionManager.shared.requestPermission()
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.controlSize(.large)
|
||||
.font(.body)
|
||||
} else {
|
||||
Button("Grant Accessibility Permission") {
|
||||
AccessibilityPermissionManager.shared.requestPermission()
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.controlSize(.large)
|
||||
}
|
||||
.padding()
|
||||
.background(Color(NSColor.controlBackgroundColor))
|
||||
.cornerRadius(8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue