mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-24 10:52:14 +02:00
feat: add upload action for launcher logs
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
cb01d5c46e
commit
63d40ecda4
@ -90,6 +90,7 @@
|
||||
#include <updater/ExternalUpdater.h>
|
||||
#include "InstanceWindow.h"
|
||||
|
||||
#include "ui/GuiUtil.h"
|
||||
#include "ui/dialogs/AboutDialog.h"
|
||||
#include "ui/dialogs/CopyInstanceDialog.h"
|
||||
#include "ui/dialogs/CustomMessageBox.h"
|
||||
@ -235,6 +236,16 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
ui->actionViewJavaFolder->setEnabled(BuildConfig.JAVA_DOWNLOADER_ENABLED);
|
||||
}
|
||||
|
||||
{ // logs upload
|
||||
|
||||
auto menu = new QMenu(this);
|
||||
for (auto file : QDir("logs").entryInfoList(QDir::Files)) {
|
||||
auto action = menu->addAction(file.fileName());
|
||||
connect(action, &QAction::triggered, this, [this, file] { GuiUtil::uploadPaste(file.fileName(), file, this); });
|
||||
}
|
||||
ui->actionUploadLog->setMenu(menu);
|
||||
}
|
||||
|
||||
// add the toolbar toggles to the view menu
|
||||
ui->viewMenu->addAction(ui->instanceToolBar->toggleViewAction());
|
||||
ui->viewMenu->addAction(ui->newsToolBar->toggleViewAction());
|
||||
|
@ -215,6 +215,7 @@
|
||||
</property>
|
||||
<addaction name="actionClearMetadata"/>
|
||||
<addaction name="actionReportBug"/>
|
||||
<addaction name="actionUploadLog"/>
|
||||
<addaction name="actionAddToPATH"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionMATRIX"/>
|
||||
@ -696,6 +697,18 @@
|
||||
<string>Clear cached metadata</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionUploadLog">
|
||||
<property name="icon">
|
||||
<iconset theme="log">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upload logs</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Upload launcher logs to the selected log provider</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddToPATH">
|
||||
<property name="icon">
|
||||
<iconset theme="custom-commands">
|
||||
|
Loading…
x
Reference in New Issue
Block a user