File tree Expand file tree Collapse file tree
TablePro/Views/Connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,30 +269,37 @@ struct ConnectionFormView: View { // swiftlint:disable:this type_body_length
269269 }
270270
271271 if type. isDownloadablePlugin && !PluginManager. shared. isDriverLoaded ( for: type) {
272- ContentUnavailableView {
273- Label ( type. rawValue, image: type. iconName)
274- } description: {
275- if isInstallingPlugin {
276- Text ( " Installing plugin… " )
277- } else if let error = pluginInstallError {
278- Text ( error)
279- } else {
280- Text ( " This plugin is not installed yet. " )
281- }
282- } actions: {
283- if isInstallingPlugin {
284- ProgressView ( )
285- . controlSize ( . small)
286- } else if pluginInstallError != nil {
287- Button ( " Retry " ) {
288- pluginInstallError = nil
289- installPlugin ( for: type)
290- }
291- } else {
292- Button ( " Install Plugin " ) {
293- installPlugin ( for: type)
272+ Section {
273+ LabeledContent ( String ( localized: " Plugin " ) ) {
274+ if isInstallingPlugin {
275+ HStack ( spacing: 6 ) {
276+ ProgressView ( )
277+ . controlSize ( . small)
278+ Text ( " Installing… " )
279+ . foregroundStyle ( . secondary)
280+ }
281+ } else if let error = pluginInstallError {
282+ HStack ( spacing: 6 ) {
283+ Text ( error)
284+ . foregroundStyle ( . red)
285+ . font ( . caption)
286+ . lineLimit ( 2 )
287+ Button ( " Retry " ) {
288+ pluginInstallError = nil
289+ installPlugin ( for: type)
290+ }
291+ . controlSize ( . small)
292+ }
293+ } else {
294+ HStack ( spacing: 6 ) {
295+ Text ( " Not installed " )
296+ . foregroundStyle ( . secondary)
297+ Button ( " Install " ) {
298+ installPlugin ( for: type)
299+ }
300+ . controlSize ( . small)
301+ }
294302 }
295- . buttonStyle ( . borderedProminent)
296303 }
297304 }
298305 } else if PluginManager . shared. connectionMode ( for: type) == . fileBased {
You can’t perform that action at this time.
0 commit comments