Skip to content

Commit 9eff912

Browse files
committed
fix: show plugin install prompt on test connection with missing plugin
1 parent 90c5723 commit 9eff912

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

TablePro/Views/Connection/ConnectionFormView.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,11 +1111,15 @@ struct ConnectionFormView: View {
11111111
} catch {
11121112
await MainActor.run {
11131113
isTesting = false
1114-
AlertHelper.showErrorSheet(
1115-
title: String(localized: "Connection Test Failed"),
1116-
message: error.localizedDescription,
1117-
window: window
1118-
)
1114+
if case PluginError.pluginNotInstalled = error {
1115+
pluginInstallConnection = testConn
1116+
} else {
1117+
AlertHelper.showErrorSheet(
1118+
title: String(localized: "Connection Test Failed"),
1119+
message: error.localizedDescription,
1120+
window: window
1121+
)
1122+
}
11191123
}
11201124
}
11211125
}

0 commit comments

Comments
 (0)