Disable start button if profiles is empty on macOS

This commit is contained in:
世界
2024-02-21 14:14:39 +08:00
parent e9d55c6125
commit be67111425
5 changed files with 8 additions and 2 deletions
@@ -207,6 +207,7 @@ public struct ProfileView: View {
return
}
}
environments.emptyProfiles = profileList.isEmpty
}
private func updateProfile(_ profile: Profile) async {
@@ -254,6 +255,7 @@ public struct ProfileView: View {
profileList[index].origin
}
profileList.remove(atOffsets: profileIndex)
environments.emptyProfiles = profileList.isEmpty
Task {
do {
_ = try await ProfileManager.delete(profileToDelete)