mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-03 01:42:20 +08:00
commit
1780110e33
@ -32,6 +32,8 @@
|
||||
<file>icons/category_active.svg</file>
|
||||
<file>icons/refresh-page-dark.svg</file>
|
||||
<file>icons/refresh-page.svg</file>
|
||||
<file>icons/upgrades-symbolic_dark.svg</file>
|
||||
<file>icons/upgrades-symbolic.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file>tags/a2d.png</file>
|
||||
|
7
assets/icons/upgrades-symbolic.svg
Normal file
7
assets/icons/upgrades-symbolic.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" stroke="null" style="vector-effect: non-scaling-stroke;">
|
||||
|
||||
<g stroke="null">
|
||||
<title stroke="null">Layer 1</title>
|
||||
<path transform="rotate(-180 8 8)" stroke="null" id="svg_1" d="m8,1c3.86599,0 7,3.13401 7,7c0,3.86599 -3.13401,7 -7,7c-3.86599,0 -7,-3.13401 -7,-7c0,-3.86599 3.13401,-7 7,-7zm1.5,7l-3,0c-0.27614,0 -0.5,0.22386 -0.5,0.5c0,0.27614 -0.22386,0.5 -0.5,0.5l0,0l-0.5,0c-0.10986,0 -0.21521,0.04364 -0.29289,0.12132c-0.16176,0.16176 -0.16176,0.42403 0,0.58579l0,0l2.93934,2.93934c0.19526,0.19526 0.51184,0.19526 0.7071,0l0,0l2.93934,-2.93934c0.07768,-0.07768 0.12132,-0.18304 0.12132,-0.2929c0,-0.22876 -0.18545,-0.41421 -0.41421,-0.41421l0,0l-0.5,0c-0.27614,0 -0.5,-0.22386 -0.5,-0.5c0,-0.27614 -0.22386,-0.5 -0.5,-0.5l0,0zm0,-2l-3,0c-0.27614,0 -0.5,0.22386 -0.5,0.5c0,0.27614 0.22386,0.5 0.5,0.5l0,0l3,0c0.27614,0 0.5,-0.22386 0.5,-0.5c0,-0.27614 -0.22386,-0.5 -0.5,-0.5l0,0zm0,-2l-3,0c-0.27614,0 -0.5,0.22386 -0.5,0.5c0,0.27614 0.22386,0.5 0.5,0.5l0,0l3,0c0.27614,0 0.5,-0.22386 0.5,-0.5c0,-0.27614 -0.22386,-0.5 -0.5,-0.5l0,0z" fill-rule="evenodd"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
58
assets/icons/upgrades-symbolic_dark.svg
Normal file
58
assets/icons/upgrades-symbolic_dark.svg
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="downloads-symbolic_dark.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="982"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="14.75"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
transform="rotate(-180 8 8)"
|
||||
fill="#FFF"
|
||||
fill-opacity=".8"
|
||||
fill-rule="evenodd"
|
||||
d="M8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 Z M9.5,8 L6.5,8 C6.22385763,8 6,8.22385763 6,8.5 C6,8.77614237 5.77614237,9 5.5,9 L5.5,9 L5,9 C4.89014373,9 4.78478689,9.04364023 4.70710678,9.12132034 C4.54534632,9.2830808 4.54534632,9.54534632 4.70710678,9.70710678 L4.70710678,9.70710678 L7.64644661,12.6464466 C7.84170876,12.8417088 8.15829124,12.8417088 8.35355339,12.6464466 L8.35355339,12.6464466 L11.2928932,9.70710678 C11.3705733,9.62942667 11.4142136,9.52406983 11.4142136,9.41421356 C11.4142136,9.18544973 11.2287638,9 11,9 L11,9 L10.5,9 C10.2238576,9 10,8.77614237 10,8.5 C10,8.22385763 9.77614237,8 9.5,8 L9.5,8 Z M9.5,6 L6.5,6 C6.22385763,6 6,6.22385763 6,6.5 C6,6.77614237 6.22385763,7 6.5,7 L6.5,7 L9.5,7 C9.77614237,7 10,6.77614237 10,6.5 C10,6.22385763 9.77614237,6 9.5,6 L9.5,6 Z M9.5,4 L6.5,4 C6.22385763,4 6,4.22385763 6,4.5 C6,4.77614237 6.22385763,5 6.5,5 L6.5,5 L9.5,5 C9.77614237,5 10,4.77614237 10,4.5 C10,4.22385763 9.77614237,4 9.5,4 L9.5,4 Z"
|
||||
id="path2"
|
||||
style="fill:#ffffff;fill-opacity:0.60000002" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
26
debian/changelog
vendored
26
debian/changelog
vendored
@ -1,3 +1,29 @@
|
||||
spark-store (3.3) stable; urgency=medium
|
||||
|
||||
* 修复 检查更新 未刷新软件源
|
||||
* 把检查更新单独拿出作为左列
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (3.3~test3) stable; urgency=medium
|
||||
|
||||
* 把检查更新加入免密码
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (3.3~test2) stable; urgency=medium
|
||||
|
||||
* 更新检测功能全部更改到zenity
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (3.3~test1) stable; urgency=medium
|
||||
|
||||
* zenity,选择可更新应用
|
||||
* 自动更新检测现在会跳过hold
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (3.2.4) stable; urgency=medium
|
||||
|
||||
* 修改tag相关的文案内容:wine相关环境已可自动配置了
|
||||
|
3
debian/control
vendored
3
debian/control
vendored
@ -39,7 +39,8 @@ Depends:${shlibs:Depends}, ${misc:Depends},
|
||||
dde-qt5integration,
|
||||
bubblewrap,
|
||||
aria2,
|
||||
gcc
|
||||
gcc,
|
||||
zenity
|
||||
Description: Spark Store
|
||||
A community powered app store, based on DTK.
|
||||
Recommends: apt-fast
|
||||
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<vendor>Spark Store</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="store.spark-app.ss-do-upgrade">
|
||||
<description>运行ss-do-upgrade需要权限</description>
|
||||
<message>要使用ss-do-upgrade需要权限</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
@ -36,7 +36,7 @@ desktop.path = /usr/share/applications
|
||||
service.files += pkg/usr/lib/systemd/system/spark-update-notifier.service
|
||||
service.path = /usr/lib/systemd/system/
|
||||
|
||||
polkit-1.files +=pkg/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
polkit-1.files +=pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade.policy
|
||||
polkit-1.path = /usr/share/polkit-1/actions/
|
||||
|
||||
|
||||
@ -55,6 +55,6 @@ INSTALLS += \
|
||||
preferences \
|
||||
tmp \
|
||||
service \
|
||||
bash_completion
|
||||
# polkit-1
|
||||
bash_completion \
|
||||
polkit-1
|
||||
# 暂时不添加
|
||||
|
@ -37,7 +37,7 @@ int main(int argc, char *argv[])
|
||||
DAboutDialog dialog;
|
||||
a.setAboutDialog(&dialog);
|
||||
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
|
||||
dialog.setVersion(DApplication::buildVersion("Version 3.2.4"));
|
||||
dialog.setVersion(DApplication::buildVersion("Version 3.3"));
|
||||
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
|
||||
dialog.setProductName(QLabel::tr("Spark Store"));
|
||||
dialog.setDescription(
|
||||
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
||||
a.setOrganizationName("spark-union");
|
||||
a.setOrganizationDomain("https://www.deepinos.org/");
|
||||
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
|
||||
a.setApplicationVersion(DApplication::buildVersion("3.2.4"));
|
||||
a.setApplicationVersion(DApplication::buildVersion("3.3"));
|
||||
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
|
||||
a.setApplicationDescription(
|
||||
QObject::tr(
|
||||
|
@ -63,7 +63,8 @@ Widget::Widget(DBlurEffectWidget *parent) :
|
||||
connect(ui->menu_system, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(10);});
|
||||
connect(ui->menu_theme, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(11);});
|
||||
connect(ui->menu_other, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(12);});
|
||||
connect(ui->menu_download, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(13);});
|
||||
connect(ui->menu_upgrade, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(13);});
|
||||
connect(ui->menu_download, &QPushButton::clicked, this, [=](){Widget::chooseLeftMenu(14);});
|
||||
|
||||
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType)
|
||||
{
|
||||
@ -211,7 +212,7 @@ void Widget::initUI()
|
||||
|
||||
connect(actionSubmission, &QAction::triggered, this, [=]{QDesktopServices::openUrl(QUrl("https://upload.deepinos.org/"));});
|
||||
connect(setting, &QAction::triggered, this, &Widget::opensetting);
|
||||
connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("x-terminal-emulator -e /opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");});
|
||||
connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");});
|
||||
|
||||
// 投稿器
|
||||
connect(actionSubmissionWithClient, &QAction::triggered, this, [=]
|
||||
@ -255,7 +256,8 @@ void Widget::initUI()
|
||||
left_list[10] = ui->menu_system;
|
||||
left_list[11] = ui->menu_theme;
|
||||
left_list[12] = ui->menu_other;
|
||||
left_list[13] = ui->menu_download;
|
||||
left_list[13] = ui->menu_upgrade;
|
||||
left_list[14] = ui->menu_download;
|
||||
|
||||
ui->label_show->hide();
|
||||
|
||||
@ -482,7 +484,8 @@ void Widget::updateUI()
|
||||
left_list[10]->setIcon(QIcon(":/icons/icons/category_system_dark.svg"));
|
||||
left_list[11]->setIcon(QIcon(":/icons/icons/theme-symbolic_dark.svg"));
|
||||
left_list[12]->setIcon(QIcon(":/icons/icons/category_others_dark.svg"));
|
||||
left_list[13]->setIcon(QIcon(":/icons/icons/downloads-symbolic_dark.svg"));
|
||||
left_list[13]->setIcon(QIcon(":/icons/icons/upgrades-symbolic_dark.svg"));
|
||||
left_list[14]->setIcon(QIcon(":/icons/icons/downloads-symbolic_dark.svg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -499,10 +502,11 @@ void Widget::updateUI()
|
||||
left_list[10]->setIcon(QIcon(":/icons/icons/category_system.svg"));
|
||||
left_list[11]->setIcon(QIcon(":/icons/icons/theme-symbolic.svg"));
|
||||
left_list[12]->setIcon(QIcon(":/icons/icons/category_others.svg"));
|
||||
left_list[13]->setIcon(QIcon(":/icons/icons/downloads-symbolic.svg"));
|
||||
left_list[13]->setIcon(QIcon(":/icons/icons/upgrades-symbolic.svg"));
|
||||
left_list[14]->setIcon(QIcon(":/icons/icons/downloads-symbolic.svg"));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 14; i++)
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
/* 设置左侧菜单字体
|
||||
* QFont temp = font;
|
||||
@ -510,6 +514,9 @@ void Widget::updateUI()
|
||||
* left_list[i]->setFont(temp);
|
||||
*/
|
||||
|
||||
QFont temp;
|
||||
temp.setFamily(temp.defaultFamily());
|
||||
left_list[i]->setFont(temp);
|
||||
left_list[i]->setFixedHeight(38);
|
||||
if(themeIsDark)
|
||||
{
|
||||
@ -587,7 +594,10 @@ void Widget::updateUI()
|
||||
left_list[12]->setIcon(QIcon(":/icons/icons/category_others_dark.svg"));
|
||||
break;
|
||||
case 13:
|
||||
left_list[13]->setIcon(QIcon(":/icons/icons/downloads-symbolic_dark.svg"));
|
||||
left_list[13]->setIcon(QIcon(":/icons/icons/upgrades-symbolic_dark.svg"));
|
||||
break;
|
||||
case 14:
|
||||
left_list[14]->setIcon(QIcon(":/icons/icons/downloads-symbolic_dark.svg"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -627,6 +637,16 @@ void Widget::chooseLeftMenu(int index)
|
||||
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
else if (index == 13){
|
||||
QtConcurrent::run([=]{
|
||||
auto upgradeP = new QProcess();
|
||||
upgradeP->startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh");
|
||||
upgradeP->waitForStarted();
|
||||
upgradeP->waitForFinished(-1);
|
||||
|
||||
});
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->stackedWidget->setCurrentIndex(1);
|
||||
@ -646,7 +666,7 @@ void Widget::updatefoot()
|
||||
|
||||
void Widget::on_pushButton_download_clicked()
|
||||
{
|
||||
chooseLeftMenu(13);
|
||||
chooseLeftMenu(14);
|
||||
|
||||
allDownload += 1;
|
||||
|
||||
|
251
src/widget.ui
251
src/widget.ui
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1053</width>
|
||||
<height>711</height>
|
||||
<height>754</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -93,6 +93,20 @@
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="13" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_theme">
|
||||
<property name="text">
|
||||
<string>Beautify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_chat">
|
||||
<property name="text">
|
||||
<string>Chat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_7">
|
||||
<property name="orientation">
|
||||
@ -109,86 +123,30 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_music">
|
||||
<item row="3" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_network">
|
||||
<property name="text">
|
||||
<string>Music</string>
|
||||
<string>Network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_photo">
|
||||
<property name="text">
|
||||
<string>Graphics</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_dev">
|
||||
<property name="text">
|
||||
<string>Development</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<item row="18" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>3</width>
|
||||
<height>20</height>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_system">
|
||||
<item row="8" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_game">
|
||||
<property name="text">
|
||||
<string>Tools</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_read">
|
||||
<property name="text">
|
||||
<string>Reading</string>
|
||||
<string>Games</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -199,6 +157,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_download">
|
||||
<property name="text">
|
||||
<string>Download</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pushButton_refresh">
|
||||
<property name="maximumSize">
|
||||
@ -219,10 +184,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_chat">
|
||||
<item row="6" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_video">
|
||||
<property name="text">
|
||||
<string>Chat</string>
|
||||
<string>Video</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -246,44 +211,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_theme">
|
||||
<item row="12" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_system">
|
||||
<property name="text">
|
||||
<string>Beautify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_network">
|
||||
<property name="text">
|
||||
<string>Network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_game">
|
||||
<property name="text">
|
||||
<string>Games</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_other">
|
||||
<property name="text">
|
||||
<string>Others</string>
|
||||
<string>Tools</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -300,17 +231,63 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_download">
|
||||
<item row="10" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_read">
|
||||
<property name="text">
|
||||
<string>Download</string>
|
||||
<string>Reading</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_video">
|
||||
<item row="14" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_other">
|
||||
<property name="text">
|
||||
<string>Video</string>
|
||||
<string>Others</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_photo">
|
||||
<property name="text">
|
||||
<string>Graphics</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_dev">
|
||||
<property name="text">
|
||||
<string>Development</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -333,6 +310,36 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>3</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_music">
|
||||
<property name="text">
|
||||
<string>Music</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0" colspan="6">
|
||||
<widget class="QPushButton" name="menu_upgrade">
|
||||
<property name="text">
|
||||
<string>Upgrade</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -365,11 +372,11 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWebEngineView" name="webEngineView" native="true">
|
||||
<widget class="QWebEngineView" name="webEngineView">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<property name="url" stdset="0">
|
||||
<property name="url">
|
||||
<url>
|
||||
<string>about:blank</string>
|
||||
</url>
|
||||
@ -489,8 +496,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>889</width>
|
||||
<height>849</height>
|
||||
<width>903</width>
|
||||
<height>848</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||
@ -993,8 +1000,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>851</width>
|
||||
<height>324</height>
|
||||
<width>869</width>
|
||||
<height>326</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
@ -1123,8 +1130,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>889</width>
|
||||
<height>716</height>
|
||||
<width>738</width>
|
||||
<height>833</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<policyconfig>
|
||||
<vendor>Spark Store</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="org.maicss.dnf">
|
||||
<action id="store.spark-app.ssinstall">
|
||||
<description>运行ssinstall需要权限</description>
|
||||
<message>要使用ssinstall需要权限</message>
|
||||
<defaults>
|
||||
|
@ -1,24 +1,28 @@
|
||||
#!/bin/bash
|
||||
aptss ssupdate | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新检查,请稍候... --height 70 --width 400 --title="星火商店更新模块"
|
||||
PKG_LIST="$(bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)"
|
||||
####如果没更新,就弹出不需要更新
|
||||
if [ -z "$PKG_LIST" ];then
|
||||
zenity --info --icon-name=spark-store --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300
|
||||
else
|
||||
PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST;
|
||||
do
|
||||
#### 检测是否是hold状态
|
||||
if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" = "" ];then
|
||||
echo "true"
|
||||
echo "$PKG_NAME"
|
||||
else
|
||||
echo "false"
|
||||
echo "$PKG_NAME (无法更新:请先执行 sudo apt-mark unhold 后再更新)"
|
||||
fi
|
||||
done | zenity --list --text="选择你想更新的应用" --column=是否更新 --column=应用包名 --separator=" " --checklist --print-column=2 --multiple --height 350 --width 550 `
|
||||
|
||||
echo "以上可升级,是否升级?[y/n]"
|
||||
read yes_or_no
|
||||
if [ "$yes_or_no" = "y" ];then ###这是确定是否同意
|
||||
#### 如果没有选择,则直接退出
|
||||
|
||||
echo "获取更新列表..."
|
||||
PKG_LIST="$(bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)"
|
||||
if [ "$PKG_UPGRADE_LIST" = "" ];then
|
||||
zenity --info --icon-name=spark-store --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300
|
||||
else
|
||||
sudo aptss install $PKG_UPGRADE_LIST -y
|
||||
fi
|
||||
|
||||
|
||||
for PKG_NAME in $PKG_LIST;
|
||||
do
|
||||
echo "$PKG_NAME 正在更新..."
|
||||
if sudo aptss install "$PKG_NAME" -y >/dev/null 2>&1;
|
||||
then
|
||||
echo "$PKG_NAME 已更新"
|
||||
else
|
||||
echo "WARNING: $PKG_NAME 无法更新"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
fi ###这是确定是否同意
|
||||
fi
|
@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
reset
|
||||
|
||||
endloop=0
|
||||
|
||||
@ -21,85 +20,44 @@ else
|
||||
text_auto_install_open="开启"
|
||||
fi
|
||||
|
||||
|
||||
echo "欢迎使用星火更新和安装设置工具"
|
||||
echo "请在以下操作中选择一个进行~"
|
||||
echo "输入0 查看自动更新相关功能使用前须知(重要)"
|
||||
echo "输入1 $text_update_open星火更新检测工具(如果开启则会在系统启动后自动检测更新。如有更新则会弹出通知)"
|
||||
echo "输入2 查看可更新软件包列表并决定是否更新"
|
||||
echo "输入3 $text_auto_install_open点击安装免输入密码功能"
|
||||
echo "输入4 退出脚本"
|
||||
echo
|
||||
read -e option
|
||||
option=`zenity --list --text="欢迎使用星火更新和安装设置工具\n请在以下操作中选择一个进行~" --column 数字 --column=操作选项 --print-column=2 --height 350 --width 760 0 "查看自动更新相关功能使用前须知(重要)" 1 "$text_update_open星火更新检测工具(如果开启则会在系统启动后自动检测更新。如有更新则会弹出通知)" 2 查看可更新软件包列表并决定是否更新 3 "$text_auto_install_open点击安装免输入密码功能" 4 退出脚本 --hide-column=1 --print-column=1`
|
||||
|
||||
case $option in
|
||||
0)
|
||||
reset
|
||||
echo "此须知适用于自动更新功能"
|
||||
echo "此脚本可以检测星火源中是否有比当前系统更高版本的软件包,由您决定是否安装;在安装更新过程中请不要直接点击关闭本页面,以免发生错误"
|
||||
echo "此脚本使用apt update/apt list --upgrade/apt upgrade来更新软件源、列出更新列表和操作更新"
|
||||
echo
|
||||
echo "该脚本不对其使用效果有任何明示或暗示的担保,在使用前请您确保您清楚地知道您在干什么。您应当清楚,星火商店的软件包并不是适配所有发行版的;尽管绝大多数的软件更新是无害的,您仍然应该仔细检查显示出来的更新内容,以确保不会对您 的依赖环境造成破坏,尤其是那些看起来和系统依赖相关的软件包。在查看过更新列表之后,确认更新之前,您仍有一次取消更新的机会。"
|
||||
echo "本脚本的开发者不对使用该脚本可能造成的后果负责"
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo "请按回车继续..."
|
||||
#"只有回车可以用啊!""啊?"“你说的任意都行啊”“唔。。。戳到我的盲区了”
|
||||
read
|
||||
reset
|
||||
zenity --info --icon-name=spark-store --height 450 --width 500 --text "此须知适用于自动更新功能\n\n此脚本可以检测星火源中是否有比当前系统更高版本的软件包,由您决定是否安装;在安装更新过程中请不要直接点击关闭本页面,以免发生错误\n\n此脚本使用apt update/apt list --upgrade/apt upgrade来更新软件源、列出更新列表和操作更新\n\n该脚本不对其使用效果有任何明示或暗示的担保,在使用前请您确保您清楚地知道您在干什么。您应当清楚,星火商店的软件包并不是适配所有发行版的;尽管绝大多数的软件更新是无害的,您仍然应该仔细检查显示出来的更新内容,以确保不会对您的依赖环境造成破坏,尤其是那些看起来和系统依赖相关的软件包。在查看过更新列表之后,确认更新之前,您仍有取消更新的机会。\n\n本脚本的开发者不对使用该脚本可能造成的后果负责"
|
||||
;;
|
||||
1)
|
||||
echo "执行以下操作需要授权..."
|
||||
if [ -e /etc/systemd/system/multi-user.target.wants/spark-update-notifier.service ];then
|
||||
echo "---检测到已经启动了自动更新检测,执行关闭"
|
||||
sudo systemctl disable spark-update-notifier
|
||||
sleep 3
|
||||
reset
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "检测到已经启动了自动更新检测,执行关闭" --timeout=2
|
||||
pkexec systemctl disable spark-update-notifier
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "已关闭" --timeout=2
|
||||
else
|
||||
echo "---未检测到自动更新检测,执行启动"
|
||||
sudo systemctl enable spark-update-notifier
|
||||
sudo service spark-update-notifier start
|
||||
sleep 3
|
||||
reset
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "未检测到自动更新检测,执行启动" --timeout=2
|
||||
pkexec systemctl enable spark-update-notifier
|
||||
pkexec service spark-update-notifier start
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "已启动" --timeout=2
|
||||
fi
|
||||
;;
|
||||
|
||||
2)
|
||||
echo "执行以下操作需要授权..."
|
||||
sudo aptss ssupdate
|
||||
/opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh
|
||||
/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh
|
||||
echo "---请按回车返回"
|
||||
read
|
||||
reset
|
||||
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh
|
||||
;;
|
||||
3)
|
||||
if [ -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy ];then
|
||||
echo "---检测到已经启动了免输入密码,执行关闭"
|
||||
sudo rm /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
sleep 3
|
||||
reset
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "---检测到已经启动了免输入密码,执行关闭" --timeout=2
|
||||
pkexec rm /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "已关闭" --timeout=2
|
||||
else
|
||||
|
||||
cat << EOF
|
||||
请注意:这个功能尚未开发完成,一旦开启,则运行pkexec ssinstall时不再需要授权
|
||||
仅对星火内置安装器生效
|
||||
理论上会存在一定的安全风险~
|
||||
如果接受,请输入1,否则输入2
|
||||
EOF
|
||||
read is_accept_polkiy
|
||||
is_accept_polkiy=`zenity --list --height 350 --width 300 --text "请注意:这个功能尚未开发完成,一旦开启,则运行pkexec ssinstall时不再需要授权\n仅对星火内置安装器生效\n理论上会存在一定的安全风险" --column 数字 --column=操作选项 --hide-column=1 --print-column=1 1 同意 2 拒绝`
|
||||
|
||||
|
||||
|
||||
if [ "$is_accept_polkiy" = "1" ];then
|
||||
echo "执行以下操作需要授权..."
|
||||
sudo ln -s /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
echo "---已启动"
|
||||
sleep 3
|
||||
reset
|
||||
pkexec ln -s /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "---已启动"
|
||||
else
|
||||
echo "---未同意,返回"
|
||||
sleep 3
|
||||
reset
|
||||
zenity --info --icon-name=spark-store --height 150 --width 200 --text "---未同意,返回"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@ -107,8 +65,7 @@ fi
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "---无法识别的输入!请重新输入"
|
||||
reset
|
||||
exit 0
|
||||
esac
|
||||
|
||||
done
|
@ -66,12 +66,31 @@ isupdate=`echo ${updatetext: -5}`
|
||||
if [ "$isupdate" = "date." ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#### 从这里开始,只有检测到了更新才会进行
|
||||
|
||||
update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串`
|
||||
update_app_number=`echo ${update_app_number##*information...}`
|
||||
|
||||
|
||||
PKG_LIST="$(bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)"
|
||||
|
||||
|
||||
|
||||
for PKG_NAME in $PKG_LIST;do
|
||||
if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" != "" ];then
|
||||
let update_app_number=$update_app_number-1
|
||||
echo $update_app_number
|
||||
echo $PKG_NAME
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
if [ $update_app_number -lt 1 ];then
|
||||
exit
|
||||
fi
|
||||
#### 如果都是hold的那就直接退出,否则把剩余的给提醒了
|
||||
|
||||
notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理"
|
||||
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
|
||||
echo "---可更新的应用有:"
|
||||
bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
|
@ -617,7 +617,7 @@
|
||||
<message>
|
||||
<location filename="../src/widget.cpp" line="937"/>
|
||||
<source>Upgrade</source>
|
||||
<translation>升级</translation>
|
||||
<translation>软件升级</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget.cpp" line="1124"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user