single file cloud upload
This commit is contained in:
@@ -6,6 +6,39 @@
|
||||
|
||||
using namespace ui;
|
||||
|
||||
void App::cloud_upload()
|
||||
{
|
||||
if (!canvas)
|
||||
return;
|
||||
if (doc_name.empty())
|
||||
{
|
||||
auto msgbox = new NodeMessageBox();
|
||||
msgbox->m_manager = &layout;
|
||||
msgbox->init();
|
||||
msgbox->m_title->set_text("Warning");
|
||||
msgbox->m_message->set_text("This document needs to be saved before upload.");
|
||||
layout[main_id]->add_child(msgbox);
|
||||
layout[main_id]->update();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::thread([this] {
|
||||
std::string path = data_path + "/" + doc_name + ".pano";
|
||||
Canvas::I->project_save_thread(path);
|
||||
upload(path);
|
||||
async_start();
|
||||
auto msgbox = new NodeMessageBox();
|
||||
msgbox->m_manager = &layout;
|
||||
msgbox->init();
|
||||
msgbox->m_title->set_text("Success");
|
||||
msgbox->m_message->set_text("This document has been succesfully uploaded.");
|
||||
layout[main_id]->add_child(msgbox);
|
||||
layout[main_id]->update();
|
||||
async_end();
|
||||
}).detach();
|
||||
}
|
||||
}
|
||||
|
||||
void App::cloud_upload_all()
|
||||
{
|
||||
std::thread([] {
|
||||
|
||||
Reference in New Issue
Block a user