diff --git a/RsyncUI/Views/InspectorViews/Add/extensionAddTaskView+ViewBuilders.swift b/RsyncUI/Views/InspectorViews/Add/extensionAddTaskView+ViewBuilders.swift index d292d5d7..b1ff695f 100644 --- a/RsyncUI/Views/InspectorViews/Add/extensionAddTaskView+ViewBuilders.swift +++ b/RsyncUI/Views/InspectorViews/Add/extensionAddTaskView+ViewBuilders.swift @@ -22,51 +22,41 @@ extension AddTaskView { } var addTaskSheetView: some View { - VStack(alignment: .leading, spacing: 12) { - Text("Add Task").font(.headline) + VStack { + Text("Add Task") + .font(.title2) - HStack { - pickerselecttypeoftask - trailingslash - } + VStack(alignment: .leading, spacing: 12) { - synchronizeID - catalogSectionView - remoteuserandserver + HStack { + pickerselecttypeoftask + trailingslash + } - HStack { - ConditionalGlassButton(systemImage: "plus", - text: "Add", - helpText: "Add task") { + synchronizeID + catalogSectionView + remoteuserandserver + } + } + .padding() + .frame(minWidth: 600) + .onSubmit { handleSubmit() } + .toolbar { + ToolbarItem(placement: .confirmationAction) { + Button("Add") { Task { @MainActor in if await addConfig() { showAddPopover = false } } } + } - Spacer() - - if #available(macOS 26.0, *) { - Button("Close", role: .close) { - showAddPopover = false - } - .buttonStyle(RefinedGlassButtonStyle()) - .keyboardShortcut(.cancelAction) - } else { - Button { - showAddPopover = false - } label: { - Label("Close", systemImage: "return") - .labelStyle(.iconOnly) - } - .help("Close") - .keyboardShortcut(.cancelAction) + ToolbarItem(placement: .cancellationAction) { + Button("Cancel") { + showAddPopover = false } } } - .padding() - .frame(minWidth: 600) - .onSubmit { handleSubmit() } } } diff --git a/RsyncUI/Views/Profiles/ProfileView.swift b/RsyncUI/Views/Profiles/ProfileView.swift index c8b438c8..439cf1f3 100644 --- a/RsyncUI/Views/Profiles/ProfileView.swift +++ b/RsyncUI/Views/Profiles/ProfileView.swift @@ -123,8 +123,8 @@ struct AddProfileSheet: View { var body: some View { VStack(spacing: 20) { - Text("Add New Profile") - .font(.headline) + Text("Add Profile") + .font(.title2) TextField("Profile Name", text: $profileName) .textFieldStyle(.roundedBorder) @@ -135,23 +135,23 @@ struct AddProfileSheet: View { .foregroundStyle(.red) .font(.caption) } - - HStack(spacing: 12) { - ConditionalGlassButton(systemImage: "plus", - text: "Add", - helpText: "Create profile") { + } + .padding(24) + .frame(width: 400) + .toolbar { + ToolbarItem(placement: .confirmationAction) { + Button("Add") { addProfile() showSheet = false } + } + ToolbarItem(placement: .cancellationAction) { Button("Cancel") { showSheet = false } - .keyboardShortcut(.cancelAction) } } - .padding(24) - .frame(width: 400) } private func addProfile() {