mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 20:32:05 +08:00
feat: #I6OTLZ 设置中可开关平台不兼容提示
设置界面增加选项,控制进入详情页时是否发送“应用不兼容系统”通知 Log: 设置界面添加“其他设置”部分,新增单选框控制是否开启应用不兼容系统提示;SettingsPage 添加静态属性 needUncompatibleNotification,启动时从配置文件中同步开关状态,单选框点击修改时写入配置文件;详情页加载标签时,判断 needUncompatibleNotification 为 false 则不发送通知;更新翻译文件
This commit is contained in:
@@ -137,9 +137,9 @@ void Application::initAboutDialog()
|
||||
dialog->setProductName(productName());
|
||||
dialog->setProductIcon(productIcon());
|
||||
dialog->setVersion(translate("DAboutDialog", "Version: %1").arg(applicationVersion()));
|
||||
#if (DTK_VERSION >= DTK_VERSION_CHECK(5, 6, 4, 0))
|
||||
dialog->setVersion(applicationVersion());
|
||||
#endif
|
||||
if (runtimeDtkVersion() >= DTK_VERSION_CHECK(5, 6, 4, 0)) {
|
||||
dialog->setVersion(applicationVersion());
|
||||
}
|
||||
// 根据 shenmo 要求,不显示组织 Logo
|
||||
// dialog->setCompanyLogo(QPixmap(":/icon/Logo-Spark.png"));
|
||||
dialog->setCompanyLogo(QPixmap());
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "backend/image_show.h"
|
||||
#include "application.h"
|
||||
#include "utils/utils.h"
|
||||
#include "pages/settingspage.h"
|
||||
|
||||
#include <QtConcurrent>
|
||||
#include <QClipboard>
|
||||
@@ -380,6 +381,10 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
|
||||
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport)
|
||||
{
|
||||
if (!SettingsPage::needUncompatibleNotification) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool isDeepin = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Deepin;
|
||||
bool isUOS = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos;
|
||||
bool checkdeepin = (isDeepin && !deepinSupport);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define DEFAULT_SERVER_URL "https://cdn.d.store.deepinos.org.cn/"
|
||||
#define DEFAULT_CHECK_DOMAIN "deepinos"
|
||||
|
||||
bool SettingsPage::needUncompatibleNotification = true;
|
||||
bool SettingsPage::isdownload = false;
|
||||
|
||||
SettingsPage::SettingsPage(QWidget *parent)
|
||||
@@ -99,6 +100,9 @@ void SettingsPage::initConfig()
|
||||
SparkAPI::setServerUrl(config.value("server/choose").toString());
|
||||
}
|
||||
configCanSave = true; // 防止触发保存配置信号
|
||||
|
||||
needUncompatibleNotification = config.value("other/uncompatibleNotification", needUncompatibleNotification).toBool();
|
||||
ui->checkBox->setChecked(needUncompatibleNotification);
|
||||
}
|
||||
|
||||
SettingsPage::~SettingsPage()
|
||||
@@ -252,3 +256,11 @@ void SettingsPage::on_pushButton_clearWebCache_clicked()
|
||||
cacheDir.removeRecursively();
|
||||
});
|
||||
}
|
||||
|
||||
void SettingsPage::on_checkBox_clicked(bool checked)
|
||||
{
|
||||
needUncompatibleNotification = checked;
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
config.setValue("other/uncompatibleNotification", needUncompatibleNotification);
|
||||
config.sync();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,11 @@ private slots:
|
||||
|
||||
void on_pushButton_clearWebCache_clicked();
|
||||
|
||||
void on_checkBox_clicked(bool checked);
|
||||
|
||||
public:
|
||||
static bool needUncompatibleNotification;
|
||||
|
||||
private:
|
||||
static bool isdownload;
|
||||
bool configCanSave;
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea_2">
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
@@ -67,21 +67,21 @@
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_3">
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>743</width>
|
||||
<height>839</height>
|
||||
<height>950</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_6" native="true">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_22">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>18</pointsize>
|
||||
@@ -93,10 +93,10 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_7" native="true">
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
@@ -132,7 +132,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_setting1">
|
||||
<widget class="QLabel" name="label_setting">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
@@ -145,7 +145,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -161,10 +161,10 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_8" native="true">
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -177,7 +177,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#808080</string>
|
||||
</property>
|
||||
@@ -190,7 +190,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Spark Store Update</string>
|
||||
</property>
|
||||
@@ -217,10 +217,44 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_9" native="true">
|
||||
<widget class="QWidget" name="widget_7" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>18</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Other Settings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_8" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>Enable notification for apps not compatible with current system</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_26">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>18</pointsize>
|
||||
@@ -232,10 +266,10 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_10" native="true">
|
||||
<widget class="QWidget" name="widget_5" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="2" column="0" colspan="5">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#808080</string>
|
||||
</property>
|
||||
@@ -252,14 +286,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Location:/tmp/spark-store</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -279,7 +313,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
@@ -305,10 +339,10 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<widget class="QWidget" name="widget_6" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_25">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>18</pointsize>
|
||||
@@ -320,7 +354,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>We are <span style=" font-weight:600;">NOT</span> the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the &quot;Spark Store&quot;! &quot;, is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. </p><p>We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. </p><p>Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. </p><p>If any part of the store infringes your rights, please tell us <a href="mailto:jifengshenmo@outlook.com"><span style=" text-decoration: underline; color:#0082fa;">jifengshenmo@outlook.com</span></a> we will remove the infringing content as soon as possible. </p><p>If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. </p>
|
||||
<p><span style=" text-decoration: underline; color:#0000ff;"><br/></span>Our contact method can be found at <a href="https://blog.shenmo.tech/post/%E6%95%85%E9%9A%9C%E5%85%AC%E5%91%8A/"><span style=" text-decoration: underline; color:#0082fa;">Here</span></a></p></body></html></string>
|
||||
@@ -337,7 +371,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user