mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2025-01-05 21:54:15 +00:00
Confirm screenshot upload
Adds a message box on upload asking if the user is sure they want to upload to imgur
This commit is contained in:
parent
518568b803
commit
c37b7f771e
@ -314,6 +314,20 @@ void ScreenshotsPage::on_actionUpload_triggered()
|
||||
if (selection.isEmpty())
|
||||
return;
|
||||
|
||||
auto uploadText = tr("Upload screenshot to imgur.com?");
|
||||
if (selection.size() > 1)
|
||||
uploadText = tr("Upload %1 screenshots to imgur.com?").arg(selection.size());
|
||||
|
||||
auto response = CustomMessageBox::selectable(
|
||||
this,
|
||||
tr("Upload?"),
|
||||
uploadText,
|
||||
QMessageBox::Question,
|
||||
QMessageBox::Yes | QMessageBox::No
|
||||
)->exec();
|
||||
if (response == QMessageBox::No)
|
||||
return;
|
||||
|
||||
QList<ScreenShot::Ptr> uploaded;
|
||||
auto job = NetJob::Ptr(new NetJob("Screenshot Upload", APPLICATION->network()));
|
||||
if(selection.size() < 2)
|
||||
|
Loading…
Reference in New Issue
Block a user