mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-24 19:22:21 +08:00
菜单中添加投稿器,更新等
This commit is contained in:
parent
dd0605d0ba
commit
ae1c50893d
@ -31,16 +31,41 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
updateUi(0);
|
||||
|
||||
QAction *actionSubmission = new QAction(tr("Submit App"), this);
|
||||
QAction *actionSubmissionWithClient = new QAction(tr("Submit App with client(Recommanded)"), this);
|
||||
QAction *setting = new QAction(tr("Settings"));
|
||||
|
||||
QAction *upgrade = new QAction(tr("APP Upgrade and Install Settings"));
|
||||
QMenu *menu = new QMenu;
|
||||
menu->addAction(setting);
|
||||
menu->addAction(upgrade);
|
||||
menu->addAction(actionSubmission);
|
||||
menu->addAction(actionSubmissionWithClient);
|
||||
|
||||
ui->titlebar->setMenu(menu);
|
||||
connect(actionSubmission, &QAction::triggered, this, [=]{QDesktopServices::openUrl(QUrl("https://upload.deepinos.org/"));});
|
||||
connect(setting, &QAction::triggered, this, [=]{
|
||||
switchPage(AppPageSettings);
|
||||
ui->settingspage->updateUI();
|
||||
});
|
||||
connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");});
|
||||
// 投稿器
|
||||
connect(actionSubmissionWithClient, &QAction::triggered, this, [=]
|
||||
{
|
||||
QString submitterSpk = "spk://store/tools/spark-store-submitter";
|
||||
QFile actionSubmissionClientStatus("/opt/spark-store-submitter/bin/spark-store-submitter");
|
||||
if (actionSubmissionClientStatus.exists())
|
||||
{
|
||||
qDebug() << "投稿器存在";
|
||||
QProcess::startDetached("/opt/spark-store-submitter/bin/spark-store-submitter");
|
||||
}
|
||||
else{
|
||||
qDebug() << "投稿器不存在,跳转页面";
|
||||
openUrl(submitterSpk);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
//主题切换
|
||||
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType) {
|
||||
if (themeType == DGuiApplicationHelper::DarkType) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user