2019-11-18 17:39:45 +00:00
|
|
|
local CloudStorage = require("apps/cloudstorage/cloudstorage")
|
|
|
|
local UIManager = require("ui/uimanager")
|
|
|
|
local _ = require("gettext")
|
|
|
|
|
|
|
|
local CloudMgr = {
|
|
|
|
onConfirm = function() end,
|
|
|
|
}
|
|
|
|
|
|
|
|
function CloudMgr:new(from_o)
|
|
|
|
local o = from_o or {}
|
|
|
|
setmetatable(o, self)
|
|
|
|
self.__index = self
|
|
|
|
return o
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Displays a PathChooser for cloud drive for picking a (source) directory.
|
|
|
|
-- @treturn string path chosen by the user
|
|
|
|
function CloudMgr:chooseDir()
|
|
|
|
local cloud_storage = CloudStorage:new{
|
2021-08-24 20:19:07 +00:00
|
|
|
title = _("Long-press to choose a folder"),
|
2019-11-18 17:39:45 +00:00
|
|
|
item = self.item,
|
|
|
|
onConfirm = function(dir_path)
|
|
|
|
self.onConfirm(dir_path)
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
UIManager:show(cloud_storage)
|
|
|
|
end
|
|
|
|
|
|
|
|
return CloudMgr
|