Make import button gooder, explicitly require excon http client

This commit is contained in:
2024-03-04 16:35:52 -06:00
parent aceed86cb4
commit 3383cbd019
7 changed files with 99 additions and 34 deletions

View File

@@ -1,26 +0,0 @@
class W3DHub
class ApplicationManager
class Importer < Task
LOG_TAG = "W3DHub::ApplicationManager::Importer".freeze
def type
:importer
end
def execute_task
path = W3DHub.ask_file
unless File.exist?(path) && !File.directory?(path)
fail!("File #{path.inspect} does not exist or is a directory")
fail_silently! if path.nil? || path&.length&.zero? # User likely canceled the file selection
end
return false if failed?
Store.application_manager.imported!(self, path)
true
end
end
end
end