Compare commits

..

54 Commits

Author SHA1 Message Date
shenmo7192 8850cfd4a3 update dtk-build-release-tag-20220425.yml 2022-12-25 07:45:19 +00:00
shenmo7192 bec8a14baf !177 将默认的README改为英文
Merge pull request !177 from shenmo/dev
2022-12-25 04:46:51 +00:00
shenmo7192 1b9c925183 把默认的README改成英文 2022-12-25 12:43:51 +08:00
shenmo7192 09221bc2e9 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-25 03:21:04 +00:00
uniartisan2018 98da0c22fc enhance: 规范代码行为 2022-12-24 10:29:55 +08:00
uniartisan2018 cadbb351fb enhance: 限制循环变量的作用范围 2022-12-24 10:04:40 +08:00
shenmo7192 2de237ce83 fix: aptss ssupdate出错时不再锁死
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-24 10:04:40 +08:00
shenmo7192 511fbaa0b0 update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-23 13:55:58 +00:00
shenmo7192 a6d85b6ade update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-23 13:55:40 +00:00
uniartisan2018 5889ac3045 enhance: 下载列表新增 wayland 窗口标题 2022-12-23 18:42:19 +08:00
uniartisan2018 c1ba14bbd0 fix: 安装依赖缺失 2022-12-23 18:28:38 +08:00
uniartisan2018 7bdccc7783 Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into dev 2022-12-23 18:12:36 +08:00
momen 3a54cba3e5 !176 让浏览器获取中文页面
* !1 enhanced: 判断系统语言,中文则修改请求头,请求中文网页
2022-12-23 10:12:18 +00:00
uniartisan2018 79463246fb fix: 修复编译依赖 2022-12-23 18:11:44 +08:00
uniartisan2018 cc8ff5eff2 enhance: 消除 c11 标准警告 2022-12-23 16:46:32 +08:00
uniartisan2018 613327b2cc fix: 修复非deepin的wayland环境下ui显示 2022-12-23 16:30:36 +08:00
uniartisan2018 8b31db843c fix: Wayland 在某些环境下错误识别为 dde 2022-12-23 16:30:36 +08:00
uniartisan2018 fd4fdbe970 format: 代码格式化 2022-12-23 12:13:48 +08:00
uniartisan2018 89a3ab0b4c feat: support wayland 2022-12-22 21:50:27 +08:00
uniartisan2018 0179c2f04f feat: wayland 2022-12-22 00:49:11 +08:00
shenmo7192 8918e63484 !171 4.1.1-real
Merge pull request !171 from shenmo/dev
2022-12-21 16:18:05 +00:00
shenmo7192 6d1fb80f0f update src/main.cpp.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-21 16:17:32 +00:00
shenmo7192 4add78c6d7 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-21 16:17:19 +00:00
zty199 89c32013bf fix: 修复应用更新失败问题
zenity 处理多选框时,返回结果取值错误导致,获取值实际为已安装版本号,而不是包名

Log: 修改 zenity 参数为 --print-column=2 获取包名
2022-12-21 23:57:06 +08:00
zty199 8f7ce54584 fix: 修复检查到应用更新没有系统通知的问题
错误地把 sudo 改为了 su(su $USER -c xxxxxx)

Log: 还原为 sudo -u $USER xxxxxx
2022-12-21 05:59:10 +00:00
shenmo7192 65f3114078 !168 4.1.0
Merge pull request !168 from shenmo/dev
2022-12-21 05:31:36 +00:00
shenmo7192 00386c7aeb 修复文案 2022-12-21 13:22:41 +08:00
zty199 3a89394838 fix: 修复可更新应用列表为空时仍然弹出选择应用更新对话框的问题
获取可更新应用列表后直接赋值给 zenity 处理,未对列表为空进行处理

Log: 获取可更新应用列表后,若列表为空则退出;不为空再交给 zenity 处理
2022-12-21 12:09:59 +08:00
shenmo7192 a3f3a9153a 仍然有点小问题的更新检测 2022-12-21 09:24:59 +08:00
shenmo7192 cc582da96b !167 4.0.1 优化Ubuntu
Merge pull request !167 from shenmo/dev
2022-12-20 02:18:57 +00:00
shenmo7192 d5877ffe00 ubuntu 优化显示 2022-12-20 10:17:53 +08:00
shenmo7192 58f590560e !166 4.0 代号:Flamescion
Merge pull request !166 from shenmo/dev
2022-12-19 11:04:38 +00:00
shenmo7192 f636b82f02 4.0Flamescion 2022-12-19 18:54:36 +08:00
shenmo7192 877c3aafd1 正式版 2022-12-19 18:52:37 +08:00
zty199 65c26f035b fix: ISSUE #I66334 安装结束后仍显示 Installing
DownloadItem::install 中 finished 信号发送时间错误:安装操作被放入 QtConcurrent::run 中异步执行,发送信号在主线程中,安装未结束就发送了信号

Log: 调整信号发送位置至子线程中;AppIntoPage::isDownloading 中,若安装任务正在执行,需要 return,否则会出现安装后卸载再重新安装时,直接显示卸载按钮的问题
2022-12-19 17:38:41 +08:00
zty199 ba331cb3fb fix: ISSUE #I66N4Y 关闭动画播放时快速按Alt+F4可反复关闭动画而关不掉商店
动画执行标志位仅在动画结束后被置为不再执行,需要提前

Log: 修改 BaseWidgetOpacity::closeEvent,动画开始执行就修改标志位
2022-12-19 10:55:03 +08:00
zty199 27c95991c5 fix: 修复窗口关闭时崩溃问题
DownloadListWidget 析构时未对 downloadController 指针判空,直接调用 downloadController->stopDownload() 空指针导致崩溃

Log: DownloadListWidget 析构时对 downloadController 指针添加判断
2022-12-19 10:49:53 +08:00
shenmo7192 ffd31445b9 !165 4.0.0.3
Merge pull request !165 from shenmo/Framescion
2022-12-19 02:11:26 +00:00
zinface 02fd887116 cmake-patch: 更新补丁用于支持 BaseWidgetOpacity 基础类的构建内容
此补丁包含以下内容:
 .gitignore                           |   34 ++++
 CMakeLists.txt                       |   93 ++++++++++
 Makefile                             |   60 ++++++
 assets/spark.png                     |  Bin
 cmake/DebPackageConfig.cmake         |  327 ++++++++++++++++++++++++++++++++++
 cmake/SparkAppimageConfig.cmake      |  133 ++++++++++++++
 cmake/SparkBuildGraphviz.cmake       |    8 +
 cmake/SparkDesktopMacros.cmake       |   35 ++++
 cmake/SparkEnvConfig.cmake           |    8 +
 cmake/SparkFindDtkConfig.cmake       |   11 +
 cmake/SparkFindLibraries.cmake       |    7 +
 cmake/SparkFindQt5Config.cmake       |  154 ++++++++++++++++
 cmake/SparkFindQt6Config.cmake       |   24 ++
 cmake/SparkInstallMacrosConfig.cmake |  132 ++++++++++++++
 cmake/SparkMacrosConfig.cmake        |  129 +++++++++++++
 cmake/SparkMacrosExtendConfig.cmake  |  197 ++++++++++++++++++++
 cmake/SparkTranslatorConfig.cmake    |   27 +++
 cmake/linuxdeployqt-help             |   48 +++++
 cmake/package-deb.descript           |   45 +++++
 cmake/spark-appimage.desktop.in      |    9 +
 cmake/spark-desktop.desktop.in       |   11 +
 Makefile                             |   16 ++
 cmake/DebPackageConfig.cmake         |    8 -
 DOCS/spark-cmake-build-system.md     |  301 +++++++++++++++++++++++++++++++
 CMakeLists.txt                       |    1
 cmake/SparkFindQt5Config.cmake       |    4
 CMakeLists.txt                       |    4
 27 files changed, 1818 insertions(+), 8 deletions(-)
2022-12-19 03:00:25 +08:00
zinface fd3df91017 docs: 添加有关 src 下内容的改进,与"描述主体结构预览"文档的编写规范说明 2022-12-19 02:49:36 +08:00
zinface c9d0c8b751 repo: 添加 BaseWidgetOpacity 基础类来实现继承者的淡出动画来代替主窗口的实现
BaseWidgetOpacity 是一个提供了淡出/淡入动画的基础类

1. closeEvent 窗口关闭时进行淡出动画
    此前在 MainWindow 中实现的淡出动画将由 BaseWidgetOpacity 来实现。

    此前 MainWindow 原有的 DBlurEffectWidget 父类将移交至 BaseWidgetOpacity 继承。

注意:
    如果 MainWindow 在未来重写 closeEvent 事件时将可能丢失 BaseWidgetOpacity 中的淡出效果
2022-12-19 02:47:38 +08:00
uiYzzi adf9032897 fix:商店点击刷新线路之后未默认选中首位 2022-12-18 13:46:55 +08:00
uiYzzi 2c1679d0af fix:商店点击刷新线路之后未默认选中首位 2022-12-18 13:03:54 +08:00
shenmo7192 95f9806c1c update .workflow/dtk-build-commit-20220425.yml.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-17 01:24:39 +00:00
uiYzzi 252d2f491d 更新链接 2022-12-16 21:28:33 +08:00
uiYzzi e2f6d97f94 改为使用全新Web接口 2022-12-16 14:01:12 +08:00
uiYzzi 48fd79e9be fix:商店更换线路的选项无效,点击刷新线路之后未默认选中首位 2022-12-15 22:31:00 +08:00
zinface 07eb9493cb cmake-patch: 更新补丁用于支持 Qt5 Svg 依赖的构建内容
此补丁包含以下内容:
 .gitignore                           |   34 ++++
 CMakeLists.txt                       |   93 ++++++++++
 Makefile                             |   60 ++++++
 assets/spark.png                     |  Bin
 cmake/DebPackageConfig.cmake         |  327 ++++++++++++++++++++++++++++++++++
 cmake/SparkAppimageConfig.cmake      |  133 ++++++++++++++
 cmake/SparkBuildGraphviz.cmake       |    8 +
 cmake/SparkDesktopMacros.cmake       |   35 ++++
 cmake/SparkEnvConfig.cmake           |    8 +
 cmake/SparkFindDtkConfig.cmake       |   11 +
 cmake/SparkFindLibraries.cmake       |    7 +
 cmake/SparkFindQt5Config.cmake       |  154 ++++++++++++++++
 cmake/SparkFindQt6Config.cmake       |   24 ++
 cmake/SparkInstallMacrosConfig.cmake |  132 ++++++++++++++
 cmake/SparkMacrosConfig.cmake        |  129 +++++++++++++
 cmake/SparkMacrosExtendConfig.cmake  |  197 ++++++++++++++++++++
 cmake/SparkTranslatorConfig.cmake    |   27 +++
 cmake/linuxdeployqt-help             |   48 +++++
 cmake/package-deb.descript           |   45 +++++
 cmake/spark-appimage.desktop.in      |    9 +
 cmake/spark-desktop.desktop.in       |   11 +
 Makefile                             |   16 ++
 cmake/DebPackageConfig.cmake         |    8 -
 DOCS/spark-cmake-build-system.md     |  301 +++++++++++++++++++++++++++++++
 CMakeLists.txt                       |    1
 cmake/SparkFindQt5Config.cmake       |    4
 26 files changed, 1815 insertions(+), 7 deletions(-)
2022-12-15 20:10:34 +08:00
shenmo7192 217b299a67 update tool/ssinstall.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-12-15 12:04:37 +00:00
zinface 9738c41bb9 patch: 为星火商店提交一个基础的 cmake 构建补丁
此补丁包含以下内容:
 .gitignore                           |   34 ++++
 CMakeLists.txt                       |   93 ++++++++++
 Makefile                             |   60 ++++++
 assets/spark.png                     |  Bin
 cmake/DebPackageConfig.cmake         |  327 ++++++++++++++++++++++++++++++++++
 cmake/SparkAppimageConfig.cmake      |  133 ++++++++++++++
 cmake/SparkBuildGraphviz.cmake       |    8 +
 cmake/SparkDesktopMacros.cmake       |   35 ++++
 cmake/SparkEnvConfig.cmake           |    8 +
 cmake/SparkFindDtkConfig.cmake       |   11 +
 cmake/SparkFindLibraries.cmake       |    7 +
 cmake/SparkFindQt5Config.cmake       |  154 ++++++++++++++++
 cmake/SparkFindQt6Config.cmake       |   24 ++
 cmake/SparkInstallMacrosConfig.cmake |  132 ++++++++++++++
 cmake/SparkMacrosConfig.cmake        |  129 +++++++++++++
 cmake/SparkMacrosExtendConfig.cmake  |  197 ++++++++++++++++++++
 cmake/SparkTranslatorConfig.cmake    |   27 +++
 cmake/linuxdeployqt-help             |   48 +++++
 cmake/package-deb.descript           |   45 +++++
 cmake/spark-appimage.desktop.in      |    9 +
 cmake/spark-desktop.desktop.in       |   11 +
 Makefile                             |   16 ++
 cmake/DebPackageConfig.cmake         |    8 -
 DOCS/spark-cmake-build-system.md     |  301 +++++++++++++++++++++++++++++++
 24 files changed, 1812 insertions(+), 5 deletions(-)
2022-12-15 15:35:19 +08:00
uiYzzi e17c50d396 fix:安装结束后仍显示Installing 2022-12-15 14:55:46 +08:00
uiYzzi 795c3308d3 修改翻译 2022-12-15 14:47:56 +08:00
shenmo7192 f026844dba 更新部分翻译 2022-12-14 08:56:25 +08:00
shenmo7192 1a05ad05aa update dtk-build-release-tag-20220425.yml 2022-12-13 14:21:46 +00:00
44 changed files with 3571 additions and 936 deletions
+1
View File
@@ -32,6 +32,7 @@ stages:
- cd .. - cd ..
- rm -rf dtk-old-bundle - rm -rf dtk-old-bundle
- 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" ' - 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" '
- sed -i 's/-j$(JOBS)/-j2/g' debian/rules
- dpkg-buildpackage -b -us -uc - dpkg-buildpackage -b -us -uc
- cd .. - cd ..
- ls -all - ls -all
+1 -1
View File
@@ -33,7 +33,7 @@ stages:
- rm -rf dtk-old-bundle - rm -rf dtk-old-bundle
- '' - ''
- 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" ' - 'mk-build-deps --install --tool "apt-get -o Debug::pkgProblemResolver=yes -y" '
- '' - sed -i 's/-j$(JOBS)/-j2/g' debian/rules
- dpkg-buildpackage -b -us -uc - dpkg-buildpackage -b -us -uc
- cd .. - cd ..
- ls -all - ls -all
+82
View File
@@ -0,0 +1,82 @@
# 关于编写 "描述主体结构预览说明" 的规范
1. 主体结构预览
一般以 `tree` 命令进行获取目录结构进行展示所需要描述的预览内容。
2. 对主体结构中的内容单独说明
并使用所用语言进行非侵入式独立描述,而不是在代码中填充说明与注释。
在单行描述中,尽量不超过您认为最大的字符数量宽度,可以收缩内容的重要性。
在此种说明文档中,尽量使用您所描述的对象支持的代码注释,而不是以白底黑字进行描述。
对于规范的全部:主体结构 + 单独内容中进行简单(而不是简少)的说明。
一个简单的例子,例如: 有关项目源代码结构的预览说明
- 项目结构预览
```
.
├── assets
├── debian
├── DOCS
├── patchs
├── src
├── tool
└── translations
10 directories, 9 files
```
- 来自 debian 目录的说明
```shell
# 将此项目进行 debian 的标志,基于 debian 系列的发行版可对包含
# 此种目录的开源项目进行构建 deb 软件包。
# 1. 构建软件包(打包)
# 执行 dpkg-buildpackage 命令以尝试构建此软件包
dpkg-buildpackage
# 如果构建将会在上级目录中产生一个 deb,而源代码目录不会有任何变化。
# 如果出现以下内容可忽视,仅需要查看是否已成功构建软件包:
# gpg: 已跳过 "" 无效的用户ID
# gpg: ...: clear-sign failed: 无效的用户ID
# dpkg-buildpackage: error: failed to sign .dsc file
```
- 来自 patchs 目录的说明
```shell
# 一种用于可扩展的补丁,主要目的是为项目提供可选的应用方案,而不是直接堆砌到
# 当前项目的分支中。您可以认为所有分支都是主线分支。
# 例如:
# 主线稳定分支: master
# 主线开发分支: dev
# 主线其它: ...
# 注意:
# 当您认为您所提交的内容并不会为主线带来 bug fix 之类的内容,请使用补丁。
# 当您所提交的内容会带来不可预知的问题的时候,或会改变目前主线的开发模式时,
# 此种方式可确保您提交的方案可被任意时间被弃用,而不是由其它维护者耗费精力
# 去试图移除您提交的内容,而不是等待由提交者进行新的维护。
```
- 来自其它的内容...可随时由任何人进行补充
- 一些在关此种预览描述的文档
```shell
# 此种描述还将出现在 `src/README.md` 的描述中。
# 当然,我预期会由其它维护者进行移动到 `DOCS` 之下。
# 另外在 `patchs/zinface-community-cmake-build-system.patch` 补丁文件中,
# 也随附过一个简要的文档内容,而它是记录了 `Spark` 为名的构建模式。
# 在未应用此补丁时,将不会出现在任何地方。
```
-73
View File
@@ -1,73 +0,0 @@
# Spark App Store
[![star](https://gitee.com/deepin-community-store/spark-store/badge/star.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/stargazers) [![fork](https://gitee.com/deepin-community-store/spark-store/badge/fork.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/members)
Spark Store aims to collect Linux apps for the convieniece of Linux new comers
The collecting process needs everyone's help
We set up this APP Store and collect APPs/tools that everyone need widely. Also we pack Windows apps with wine.
All packages will be shared in our repository for users to get freely.
Distrobution supportedDeepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future ; UniontechOS Home 21
*About OpenKylin and deepin 23*
The adaptation work is scheduled after their official release.
You can track our Issue resoving progress here https://gitee.com/deepin-community-store/spark-store/board
We hope people who see here can also join our teamdevelopment help or submit applications are welcomed
If you want to submit an APP to share with othersPlease [Click here](https://upload.deepinos.org/index)
## 🙌 A simple start
If you simply want to install the Spark Store,just enter the [Release] page, find the version you want and install.
If you are using Debian11/Ubuntu 20.04, you will need extra dependency package. Available [here](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip)
---
#### Compile and developement
For Deepin V20/UOS 21/ Debian 11
```shell
sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev
```
Ubuntu 22.04
```shell
sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev
```
Then
```shell
git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store
dpkg-buildpackage
```
## 🚀 Coorperation
We use Gitee as our code hosting platform. Please click here to contact us.
https://gitee.com/deepin-community-store/spark-store
### Rocket Chat
https://chat.shenmo.tech/
PWA Client
spk://store/chat/store.spark-app.feedback
Copy and paste to search bar or in browser address bar after installing Spark Store
+31 -26
View File
@@ -1,50 +1,53 @@
# 星火应用商店 # Spark App Store
[![star](https://gitee.com/deepin-community-store/spark-store/badge/star.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/stargazers) [![fork](https://gitee.com/deepin-community-store/spark-store/badge/fork.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/members) [![star](https://gitee.com/deepin-community-store/spark-store/badge/star.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/stargazers) [![fork](https://gitee.com/deepin-community-store/spark-store/badge/fork.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/members)
众所周知,国内的Linux应用比较少,wine应用难以获取,优质工具分散在民间各大论坛,无法形成合力,难以改善生态 Spark Store aims to collect Linux apps for the convieniece of Linux new comers
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势 The collecting process needs everyone's help
我们创建了这个应用商店,广泛收录大家需要的软件包,搜集优质小工具,主动适配wine应用,存放到储存库供大家获取 We set up this APP Store and collect APPs/tools that everyone need widely. Also we pack Windows apps with wine.
我们支持:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(将会逐渐停止支持) ; UOS Home 21
## 关于协作:分支相关的文档见 [这里](https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo) All packages will be shared in our repository for users to get freely.
*关于OpenKylin和deepin 23* Distrobution supportedDeepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(May stop support in the future ; UniontechOS Home 21
支持计划将会在对应系统发布正式版之后开始评估和执行 *About OpenKylin and deepin 23*
希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态 The adaptation work is scheduled after their official release.
在这里追踪我们的Issue处理情况 https://gitee.com/deepin-community-store/spark-store/board You can track our Issue resoving progress here https://gitee.com/deepin-community-store/spark-store/board
如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index)
## 🙌 简单的开始 We hope people who see here can also join our teamdevelopment help or submit applications are welcomed
如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。 If you want to submit an APP to share with othersPlease [Click here](https://upload.deepinos.org/index)
如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip)
## 🙌 A simple start
If you simply want to install the Spark Store,just enter the [Release] page, find the version you want and install.
If you are using Debian11/Ubuntu 20.04, you will need extra dependency package. Available [here](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip)
--- ---
#### 编译安装 #### Compile and developement
Deepin V20/UOS 21 系统下, 安装依赖 For Deepin V20/UOS 21/ Debian 11
```shell ```shell
sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot qtwayland5 qtwayland5-dev-tools dde-qt5wayland-plugin
``` ```
Ubuntu 22.04 系统下, 安装依赖 Ubuntu 22.04
```shell ```shell
sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools
``` ```
然后 Then
```shell ```shell
git clone https://gitee.com/deepin-community-store/spark-store.git git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store cd spark-store
@@ -53,16 +56,18 @@ dpkg-buildpackage
## 🚀 协作 ## 🚀 Coorperation
非常感谢有兴趣的开发者或爱好者参与 `星火应用商店` 项目,分享你的见解与思路。 We use Gitee as our code hosting platform. Please click here to contact us.
### 交流平台 https://gitee.com/deepin-community-store/spark-store
### Rocket Chat
https://chat.shenmo.tech/ https://chat.shenmo.tech/
客户端PWA PWA Client
spk://store/chat/store.spark-app.feedback spk://store/chat/store.spark-app.feedback
安装星火商店后在浏览器打开或复制到搜索栏打开 Copy and paste to search bar or in browser address bar after installing Spark Store
+68
View File
@@ -0,0 +1,68 @@
# 星火应用商店
[![star](https://gitee.com/deepin-community-store/spark-store/badge/star.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/stargazers) [![fork](https://gitee.com/deepin-community-store/spark-store/badge/fork.svg?theme=gvp)](https://gitee.com/deepin-community-store/spark-store/members)
众所周知,国内的Linux应用比较少,wine应用难以获取,优质工具分散在民间各大论坛,无法形成合力,难以改善生态
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势
我们创建了这个应用商店,广泛收录大家需要的软件包,搜集优质小工具,主动适配wine应用,存放到储存库供大家获取
我们支持:Deepin 20 ; Ubuntu 22.04 LTS / Ubuntu 20.04 LTS(将会逐渐停止支持) ; UOS Home 21
## 关于协作:分支相关的文档见 [这里](https://deepin-community-store.gitee.io/spark-wiki/#/Dev/Spark-Store-Git-Repo)
*关于OpenKylin和deepin 23*
支持计划将会在对应系统发布正式版之后开始评估和执行
希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态
在这里追踪我们的Issue处理情况 https://gitee.com/deepin-community-store/spark-store/board
如果有想要提交的软件包,请 [在这里投稿](https://upload.deepinos.org/index)
## 🙌 简单的开始
如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。
如果你在使用 `Debian 11/Ubuntu 20.04`,你需要额外下载[依赖补充包](https://code.gitlink.org.cn/shenmo7192/spark-store-dependencies/raw/branch/master/spark-store-dependencies-kylin.zip)
---
#### 编译安装
Deepin V20/UOS 21 系统下, 安装依赖
```shell
sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev fakeroot qtwayland5 qtwayland5-dev-tools dde-qt5wayland-plugin
```
Ubuntu 22.04 系统下, 安装依赖
```shell
sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools
```
然后
```shell
git clone https://gitee.com/deepin-community-store/spark-store.git
cd spark-store
dpkg-buildpackage
```
## 🚀 协作
非常感谢有兴趣的开发者或爱好者参与 `星火应用商店` 项目,分享你的见解与思路。
### 交流平台
https://chat.shenmo.tech/
客户端PWA
spk://store/chat/store.spark-app.feedback
(安装星火商店后在浏览器打开或复制到搜索栏打开)
+34
View File
@@ -1,3 +1,37 @@
spark-store (4.1.2) stable; urgency=medium
* feat: 初步的wayland支持
* fix: 首页的捐赠页面在中文环境下显示中文
* chore: 新增编译依赖,测试安装时不会出现报错
* fix: 更新检测模块在aptss ssupdate操作失败后现在会正确地移除锁而不是错误的残留锁。
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.1) stable; urgency=medium
* fix:更新失效
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.1.0) stable; urgency=medium
* feat: 现在可以支持UOS签名包问题了
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.1) stable; urgency=medium
* feat: 提升Ubuntu下的显示效果
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.0) stable; urgency=medium
* feat: 修复了成吨的bug后开始正式版
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.0.0~test2) stable; urgency=medium spark-store (4.0.0~test2) stable; urgency=medium
* feat: 修复了成吨的bug后开始公测 * feat: 修复了成吨的bug后开始公测
+6 -2
View File
@@ -15,7 +15,11 @@ Build-Depends:
libdtkgui-dev(>=5.0), libdtkgui-dev(>=5.0),
libdtkwidget-dev(>=5.0), libdtkwidget-dev(>=5.0),
qttools5-private-dev, qttools5-private-dev,
qtwebengine5-dev qtwebengine5-dev,
qtwayland5,
qtwayland5-dev-tools,
gcc,
g++
Standards-Version: 3.0 Standards-Version: 3.0
Homepage: https://www.spark-app.store/ Homepage: https://www.spark-app.store/
@@ -28,12 +32,12 @@ Depends:${shlibs:Depends}, ${misc:Depends},
libqt5widgets5, libqt5widgets5,
libqt5network5, libqt5network5,
libqt5concurrent5, libqt5concurrent5,
qtwayland5,
libdtkcore5, libdtkcore5,
libdtkgui5, libdtkgui5,
libdtkwidget5, libdtkwidget5,
curl, curl,
openssl, openssl,
libssl-dev,
dde-qt5integration, dde-qt5integration,
bubblewrap, bubblewrap,
aria2, aria2,
File diff suppressed because it is too large Load Diff
+1
View File
@@ -8,6 +8,7 @@ TARGET = spark-store
TEMPLATE = subdirs TEMPLATE = subdirs
CONFIG += ordered CONFIG += ordered
CONFIG += wayland-compositor
SUBDIRS += \ SUBDIRS += \
src/spark-dstore-patch \ src/spark-dstore-patch \
+30
View File
@@ -0,0 +1,30 @@
# 有关 src 下的一些改进预览
> 1. 主体结构预览
> 2. 主体结构中的内容单独说明
> 并使用所用语言进行非侵入式独立描述,而不是在代码中填充说明与注释。
>
> 这是简单的预览说明规范
- widget/base 结构
```
src/widgets/base/
├── basewidgetopacity.cpp
└── basewidgetopacity.h
0 directories, 2 files
```
- 来源于 widget/base 的说明
```c++
// BaseWidgetOpacity 是一个提供了淡出/淡入动画的基础类:
// 1. closeEvent 窗口关闭时进行淡出动画
// 此前在 MainWindow 中实现的淡出动画将由 BaseWidgetOpacity 来实现。
// 此前 MainWindow 原有的 DBlurEffectWidget 父类将移交至 BaseWidgetOpacity 继承。
// 注意:
// 如果 MainWindow 在未来重写 closeEvent 事件时将可能丢失 BaseWidgetOpacity 中的淡出效果
```
-1
View File
@@ -30,7 +30,6 @@ void DownloadController::setFilename(QString filename)
this->filename = filename; this->filename = filename;
} }
bool checkMeatlink(QString metaUrl) bool checkMeatlink(QString metaUrl)
{ {
QFile metaStatus("/tmp/spark-store/metaStatus.txt"); QFile metaStatus("/tmp/spark-store/metaStatus.txt");
+3 -4
View File
@@ -4,8 +4,7 @@
#include <QScreen> // Qt5 不再建议使用 QDesktopWidget #include <QScreen> // Qt5 不再建议使用 QDesktopWidget
#include <QGuiApplication> #include <QGuiApplication>
image_show::image_show(QWidget *parent) : image_show::image_show(QWidget *parent) : QWidget(parent),
QWidget(parent),
m_dialog(new big_image), m_dialog(new big_image),
m_label(new QLabel) m_label(new QLabel)
{ {
@@ -27,7 +26,7 @@ void image_show::setImage(QPixmap image)
desktop_w = QGuiApplication::primaryScreen()->geometry().width(); desktop_w = QGuiApplication::primaryScreen()->geometry().width();
desktop_h = QGuiApplication::primaryScreen()->geometry().height(); desktop_h = QGuiApplication::primaryScreen()->geometry().height();
if(screen0.width() > (desktop_w - 20) || screen0.height() > (desktop_h - 20)) if (screen0.width() > (desktop_w - 20) || screen0.height() > (desktop_h - 20))
{ {
re_screen1 = screen0.scaled(QSize(desktop_w - 20, desktop_h - 20), Qt::KeepAspectRatio, Qt::SmoothTransformation); re_screen1 = screen0.scaled(QSize(desktop_w - 20, desktop_h - 20), Qt::KeepAspectRatio, Qt::SmoothTransformation);
m_image = QPixmap::fromImage(re_screen1); m_image = QPixmap::fromImage(re_screen1);
@@ -48,7 +47,7 @@ void image_show::mousePressEvent(QMouseEvent *)
// 识别主屏幕尺寸并设置 widget 大小 // 识别主屏幕尺寸并设置 widget 大小
m_dialog->setFixedSize(desktop_w, desktop_h); m_dialog->setFixedSize(desktop_w, desktop_h);
m_dialog->move(0,0); m_dialog->move(0, 0);
} }
image_show::~image_show() image_show::~image_show()
{ {
+19 -15
View File
@@ -6,14 +6,19 @@ QString SparkAPI::serverUrl = "";
SparkAPI::SparkAPI(QObject *parent) : QObject(parent) SparkAPI::SparkAPI(QObject *parent) : QObject(parent)
{ {
SparkAPI::serverUrl = "https://cdn.d.store.deepinos.org.cn/"; QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
if (!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE")
{
SparkAPI::setServerUrl(readConfig.value("server/choose").toString());
}
} }
void SparkAPI::get(QUrl url) void SparkAPI::get(QUrl url)
{ {
QNetworkRequest request; QNetworkRequest request;
HttpRequest *httprequest=new HttpRequest; HttpRequest *httprequest = new HttpRequest;
request.setUrl(QUrl(url.toString().replace("+","%2B"))); request.setUrl(QUrl(url.toString().replace("+", "%2B")));
connect(httprequest,&HttpRequest::finished,[=](QString data){ connect(httprequest, &HttpRequest::finished, [=](QString data)
{
QByteArray arr = data.toUtf8(); QByteArray arr = data.toUtf8();
//解析Json //解析Json
QJsonParseError error; QJsonParseError error;
@@ -26,36 +31,35 @@ void SparkAPI::get(QUrl url)
emit finishedObject(doc); emit finishedObject(doc);
} }
httprequest->deleteLater(); httprequest->deleteLater(); });
});
httprequest->getRequest(request); httprequest->getRequest(request);
} }
void SparkAPI::getRAW(QUrl url) void SparkAPI::getRAW(QUrl url)
{ {
QNetworkRequest request; QNetworkRequest request;
HttpRequest *httprequest=new HttpRequest; HttpRequest *httprequest = new HttpRequest;
request.setUrl(QUrl(url.toString().replace("+","%2B"))); request.setUrl(QUrl(url.toString().replace("+", "%2B")));
connect(httprequest,&HttpRequest::finished,[=](QString data){ connect(httprequest, &HttpRequest::finished, [=](QString data)
{
emit finishedRAW(data); emit finishedRAW(data);
httprequest->deleteLater(); httprequest->deleteLater(); });
});
httprequest->getRequest(request); httprequest->getRequest(request);
} }
void SparkAPI::getAppList(QString type) void SparkAPI::getAppList(QString type)
{ {
get(QUrl(getServerUrl()+"store/"+type+"/applist.json")); get(QUrl(getServerUrl() + "store/" + type + "/applist.json"));
} }
void SparkAPI::getSearchList(QString keyword) void SparkAPI::getSearchList(QString keyword)
{ {
get(QUrl("https://search.deepinos.org.cn/appinfo/search?keyword="+keyword)); get(QUrl("https://search.deepinos.org.cn/appinfo/search?keyword=" + keyword));
} }
void SparkAPI::getAppInfo(QUrl spk) void SparkAPI::getAppInfo(QUrl spk)
{ {
get(QUrl(getServerUrl()+"store"+spk.path().replace("+","%2B") + "/app.json")); get(QUrl(getServerUrl() + "store" + spk.path().replace("+", "%2B") + "/app.json"));
} }
void SparkAPI::getAppDownloadTimes(QUrl spk) void SparkAPI::getAppDownloadTimes(QUrl spk)
{ {
getRAW(QUrl(getServerUrl()+"store"+spk.path().replace("+","%2B") + "/download-times.txt")); getRAW(QUrl(getServerUrl() + "store" + spk.path().replace("+", "%2B") + "/download-times.txt"));
} }
QString SparkAPI::getServerUrl() QString SparkAPI::getServerUrl()
{ {
+2 -1
View File
@@ -5,7 +5,8 @@
#include <QJsonArray> #include <QJsonArray>
#include <QJsonParseError> #include <QJsonParseError>
#include "utils/httprequest.h" #include "utils/httprequest.h"
#include <QSettings>
#include <QDir>
class SparkAPI : public QObject class SparkAPI : public QObject
{ {
Q_OBJECT Q_OBJECT
+1 -2
View File
@@ -3,10 +3,9 @@
DBusSparkStoreService::DBusSparkStoreService(QObject *parent) DBusSparkStoreService::DBusSparkStoreService(QObject *parent)
: QDBusAbstractAdaptor(parent) : QDBusAbstractAdaptor(parent)
{ {
} }
void DBusSparkStoreService::activeWindow(const QString & arg) void DBusSparkStoreService::activeWindow(const QString &arg)
{ {
emit sigOpenUrl(arg); emit sigOpenUrl(arg);
} }
+78 -32
View File
@@ -7,68 +7,115 @@
#include <DAboutDialog> #include <DAboutDialog>
#include <QLabel> #include <QLabel>
#include <DWidgetUtil> #include <DWidgetUtil>
#include <DSysInfo>
DCORE_USE_NAMESPACE DCORE_USE_NAMESPACE
DWIDGET_USE_NAMESPACE DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// Get build time // Get build time
static const QString version = "Version 4.0.0~test2"; static const QString version = "Version 4.1.2";
static const QDate buildDate = QLocale( QLocale::English ).toDate( QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss");
QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
//设置桌面环境环境变量 // 设置桌面环境环境变量
if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin")) { bool isDeepinOS = true;
if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
{
setenv("XDG_CURRENT_DESKTOP", "Deepin", 1); setenv("XDG_CURRENT_DESKTOP", "Deepin", 1);
isDeepinOS = false;
}
bool isWayland = false;
auto e = QProcessEnvironment::systemEnvironment();
QString XDG_SESSION_TYPE = e.value(QStringLiteral("XDG_SESSION_TYPE"));
QString WAYLAND_DISPLAY = e.value(QStringLiteral("WAYLAND_DISPLAY"));
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
{
isWayland = true;
}
setConfig->setValue("build/isWayland", isWayland);
setConfig->setValue("build/isDeepinOS", isDeepinOS);
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
if (!readConfig.contains("build/useWayland"))
{
setConfig->setValue("build/useWayland", true);
}
bool useWayland = readConfig.value("build/useWayland").toBool();
qDebug() << "System Wayland enabled:" << isWayland << ". Spark Wayland enabled:" << useWayland;
// Set display backend
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDDE() || isDeepinOS))
{
qputenv("QT_QPA_PLATFORM", "wayland");
}
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDDE() && isDeepinOS))
{
qputenv("QT_QPA_PLATFORM", "dwayland");
}
else
{
qputenv("QT_QPA_PLATFORM", "dxcb");
} }
DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持 DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持
#ifndef DSTORE_NO_DXCBs
DApplication::loadDXcbPlugin(); // 加载 DXCB 插件
#endif
// 浏览器开启 GPU 支持 // 浏览器开启 GPU 支持
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blocklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode"); qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blocklist --enable-gpu-rasterization --enable-native-gpu-memory-buffers --enable-accelerated-video-decode");
//初始化日志模块 (默认日志位置 ~/.cache/deepin/spark-store) QVector<char *> fakeArgs(argc + 2);
fakeArgs[0] = argv[0];
QString fakeArgs1 = "-platformtheme";
QByteArray fakeArgsTemp = fakeArgs1.toLatin1(); // must
fakeArgs[1] = fakeArgsTemp.data();
fakeArgs1 = "deepin";
fakeArgsTemp = fakeArgs1.toLatin1(); // must
fakeArgs[2] = fakeArgsTemp.data();
for (int i = 1; i < argc; i++)
fakeArgs[i + 2] = argv[i];
int fakeArgc = argc + 2; // DApplication的argc要用引用,避免c++编译器优化
DApplication a(fakeArgc, fakeArgs.data());
// 初始化日志模块 (默认日志位置 ~/.cache/deepin/spark-store)
DLogManager::registerConsoleAppender(); DLogManager::registerConsoleAppender();
DLogManager::registerFileAppender(); DLogManager::registerFileAppender();
DApplication a(argc, argv); // Wayland 环境下使用,防止子控件 Native 化
if (!DPlatformWindowHandle::pluginVersion().isEmpty())
//Wayland 环境下使用,防止子控件 Native 化 {
if (!DPlatformWindowHandle::pluginVersion().isEmpty()) {
a.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true); a.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true);
} }
a.setAttribute(Qt::AA_UseHighDpiPixmaps); a.setAttribute(Qt::AA_UseHighDpiPixmaps);
a.loadDXcbPlugin(); a.setApplicationDisplayName("Spark Store");
a.loadTranslator(); // 载入翻译 a.loadTranslator(); // 载入翻译
QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); if (readConfig.value("build/version").toString() != version)
{
if (readConfig.value("build/version").toString() != version){
qDebug() << "Spark Store has been updated!"; qDebug() << "Spark Store has been updated!";
QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
setConfig->setValue("build/version", version); setConfig->setValue("build/version", version);
setConfig->setValue("build/time", buildDate.toString("yyyy.MM.dd")+"-"+buildTime.toString()); setConfig->setValue("build/time", buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString());
setConfig->deleteLater();
} }
setConfig->deleteLater();
//Customized DAboutDialog // Customized DAboutDialog
DAboutDialog dialog; DAboutDialog dialog;
a.setAboutDialog(&dialog); a.setAboutDialog(&dialog);
dialog.setLicense(QObject::tr("We publish this program under GPL V3")); dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
dialog.setVersion(DApplication::buildVersion(readConfig.value("build/version").toString()+"-"+readConfig.value("build/time").toString())); dialog.setVersion(DApplication::buildVersion(readConfig.value("build/version").toString() + "-" + "Flamescion" + "-" + readConfig.value("build/time").toString()));
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
dialog.setProductName(QLabel::tr("Spark Store")); dialog.setProductName(QLabel::tr("Spark Store"));
dialog.setDescription( dialog.setDescription(
QObject::tr( QObject::tr(
"<span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/>" "<span style=' font-size:10pt;font-weight:60;'>An appstore powered by community</span><br/>"
"<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>" "<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>"
"<span style=' font-size:12pt;'>Spark developers</span>" "<span style=' font-size:12pt;'>Spark developers</span>"));
)
);
dialog.setProductName(QLabel::tr("Spark Store")); dialog.setProductName(QLabel::tr("Spark Store"));
dialog.setCompanyLogo(QPixmap(":/spark-store.png")); dialog.setCompanyLogo(QPixmap(":/spark-store.png"));
@@ -85,11 +132,9 @@ int main(int argc, char *argv[])
"<span style='font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/>" "<span style='font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/>"
"<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>" "<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>"
"<span style='font-size:12pt;'>Spark developers</span><br/><br/>" "<span style='font-size:12pt;'>Spark developers</span><br/><br/>"
"Published under GPL V3" "Published under GPL V3"));
)
);
// 限制单实例运行 // 限制单实例运行
if(!a.setSingleInstance("spark-store")) if (!a.setSingleInstance("spark-store"))
{ {
qDebug() << "The application is already running!"; qDebug() << "The application is already running!";
QDBusInterface iface("com.gitee.spark.store", QDBusInterface iface("com.gitee.spark.store",
@@ -99,13 +144,12 @@ int main(int argc, char *argv[])
QString arg1 = argv[1]; QString arg1 = argv[1];
iface.asyncCall("activeWindow",arg1); iface.asyncCall("activeWindow", arg1);
return -1; return -1;
} }
DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); //固定主题为浅色主题 DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); // 固定主题为浅色主题
DApplicationSettings settings; // 定义 DApplicationSettings,自动保存主题设置 DApplicationSettings settings; // 定义 DApplicationSettings,自动保存主题设置
MainWindow w; MainWindow w;
@@ -113,10 +157,12 @@ int main(int argc, char *argv[])
Dtk::Widget::moveToCenter(&w); Dtk::Widget::moveToCenter(&w);
QString arg1 = argv[1]; QString arg1 = argv[1];
if (arg1.startsWith("spk://")) { if (arg1.startsWith("spk://"))
{
w.openUrl(QUrl(argv[1])); w.openUrl(QUrl(argv[1]));
} }
w.show(); w.show();
w.setWindowTitle("Spark Store");
return a.exec(); return a.exec();
} }
+96 -105
View File
@@ -3,22 +3,25 @@
#include <DWidgetUtil> #include <DWidgetUtil>
#include <DGuiApplicationHelper> #include <DGuiApplicationHelper>
#include <DApplicationSettings>
#include <QSizePolicy> #include <QSizePolicy>
#define AppPageApplist 0 #define AppPageApplist 0
#define AppPageSearchlist 1 #define AppPageSearchlist 1
#define AppPageAppdetail 2 #define AppPageAppdetail 2
#define AppPageSettings 3 #define AppPageSettings 3
#define WaylandSearchCenter 1
#define OtherSearchCenter 2
#define RightSearchSpace 1
MainWindow::MainWindow(QWidget *parent) MainWindow::MainWindow(QWidget *parent)
: DBlurEffectWidget(parent) : BaseWidgetOpacity(parent), ui(new Ui::MainWindow)
, ui(new Ui::MainWindow)
{ {
ui->setupUi(this); ui->setupUi(this);
initConfig(); initConfig();
moveToCenter(this); //让窗口居中显示 moveToCenter(this); // 让窗口居中显示
WidgetAnimation::widgetOpacity(this,true); WidgetAnimation::widgetOpacity(this, true);
downloadlistwidget = new DownloadListWidget; downloadlistwidget = new DownloadListWidget;
downloadButton = new ProgressButton(ui->titlebar); downloadButton = new ProgressButton(ui->titlebar);
@@ -26,7 +29,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->appintopage->setDownloadWidget(downloadlistwidget); ui->appintopage->setDownloadWidget(downloadlistwidget);
ui->stackedWidget->setCurrentIndex(0); ui->stackedWidget->setCurrentIndex(0);
ui->titlebar->setBackgroundTransparent(true); ui->titlebar->setBackgroundTransparent(true);
//ui->titlebar->setSwitchThemeMenuVisible(false); // 去除 dtk 标题栏主题切换菜单 // ui->titlebar->setSwitchThemeMenuVisible(false); // 去除 dtk 标题栏主题切换菜单
setMaskAlpha(250); setMaskAlpha(250);
updateUi(0); updateUi(0);
@@ -42,12 +45,14 @@ MainWindow::MainWindow(QWidget *parent)
menu->addAction(actionSubmissionWithClient); menu->addAction(actionSubmissionWithClient);
ui->titlebar->setMenu(menu); ui->titlebar->setMenu(menu);
connect(actionSubmission, &QAction::triggered, this, [=]{QDesktopServices::openUrl(QUrl("https://upload.deepinos.org/"));}); connect(actionSubmission, &QAction::triggered, this, [=]
connect(setting, &QAction::triggered, this, [=]{ { QDesktopServices::openUrl(QUrl("https://upload.deepinos.org/")); });
connect(setting, &QAction::triggered, this, [=]
{
switchPage(AppPageSettings); switchPage(AppPageSettings);
ui->settingspage->updateUI(); ui->settingspage->updateUI(); });
}); connect(upgrade, &QAction::triggered, this, [=]
connect(upgrade, &QAction::triggered, this, [=]{QProcess::startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh");}); { QProcess::startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh"); });
// 投稿器 // 投稿器
connect(actionSubmissionWithClient, &QAction::triggered, this, [=] connect(actionSubmissionWithClient, &QAction::triggered, this, [=]
{ {
@@ -58,16 +63,15 @@ MainWindow::MainWindow(QWidget *parent)
qDebug() << "投稿器存在"; qDebug() << "投稿器存在";
QProcess::startDetached("/opt/spark-store-submitter/bin/spark-store-submitter"); QProcess::startDetached("/opt/spark-store-submitter/bin/spark-store-submitter");
} }
else{ else
{
qDebug() << "投稿器不存在,跳转页面"; qDebug() << "投稿器不存在,跳转页面";
openUrl(submitterSpk); openUrl(submitterSpk);
} } });
}); // 主题切换
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType)
{
//主题切换
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType) {
if (themeType == DGuiApplicationHelper::DarkType) { if (themeType == DGuiApplicationHelper::DarkType) {
//深色模式 //深色模式
setMaskColor(QColor("#2a2b2b")); setMaskColor(QColor("#2a2b2b"));
@@ -79,8 +83,7 @@ MainWindow::MainWindow(QWidget *parent)
downloadButton->setBackgroundColor(QColor("#444444")); downloadButton->setBackgroundColor(QColor("#444444"));
downloadButton->setColor(QColor("#66CCFF")); downloadButton->setColor(QColor("#66CCFF"));
ui->pushButton_14->setIcon(QIcon(":/icon/dark/update.svg")); ui->pushButton_14->setIcon(QIcon(":/icon/dark/update.svg"));
int i = 0; for (int i = 0; i < ui->buttonGroup->buttons().size(); i++) {
while (i < ui->buttonGroup->buttons().size()) {
ui->buttonGroup->buttons()[i]->setIcon(QIcon(":/icon/dark/leftbutton_" + QString::number(i) + ".svg")); ui->buttonGroup->buttons()[i]->setIcon(QIcon(":/icon/dark/leftbutton_" + QString::number(i) + ".svg"));
if (QLocale::system().name() == "zh_CN") { if (QLocale::system().name() == "zh_CN") {
ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{background-color:transparent;}\ ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{background-color:transparent;}\
@@ -91,7 +94,6 @@ MainWindow::MainWindow(QWidget *parent)
QPushButton:hover{background-color:#7a7a7a;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}\ QPushButton:hover{background-color:#7a7a7a;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}\
QPushButton:checked{background-color:#6e6e6e;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}"); QPushButton:checked{background-color:#6e6e6e;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}");
} }
i++;
} }
} else { } else {
//亮色模式 //亮色模式
@@ -104,8 +106,7 @@ MainWindow::MainWindow(QWidget *parent)
downloadButton->setColor(QColor("#66CCFF")); downloadButton->setColor(QColor("#66CCFF"));
downloadButton->setIcon(":/icon/light/download.svg"); downloadButton->setIcon(":/icon/light/download.svg");
ui->pushButton_14->setIcon(QIcon(":/icon/light/update.svg")); ui->pushButton_14->setIcon(QIcon(":/icon/light/update.svg"));
int i = 0; for (int i = 0; i < ui->buttonGroup->buttons().size(); i++) {
while (i < ui->buttonGroup->buttons().size()) {
ui->buttonGroup->buttons()[i]->setIcon(QIcon(":/icon/light/leftbutton_" + QString::number(i) + ".svg")); ui->buttonGroup->buttons()[i]->setIcon(QIcon(":/icon/light/leftbutton_" + QString::number(i) + ".svg"));
if (QLocale::system().name() == "zh_CN") { if (QLocale::system().name() == "zh_CN") {
ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{background-color:transparent;}\ ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{background-color:transparent;}\
@@ -116,42 +117,45 @@ MainWindow::MainWindow(QWidget *parent)
QPushButton:hover{background-color:#eAeAeA;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}\ QPushButton:hover{background-color:#eAeAeA;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}\
QPushButton:checked{background-color:#dddddd;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}"); QPushButton:checked{background-color:#dddddd;border:0px;border-radius:8px;text-align: left; padding-left: 15px;}");
} }
i++;
} }
} }
ui->pushButton_14->setStyleSheet(ui->pushButton_4->styleSheet()); ui->pushButton_14->setStyleSheet(ui->pushButton_4->styleSheet());
ui->applistpage->setTheme(themeType == DGuiApplicationHelper::DarkType); ui->applistpage->setTheme(themeType == DGuiApplicationHelper::DarkType);
ui->applistpage_1->setTheme(themeType == DGuiApplicationHelper::DarkType); ui->applistpage_1->setTheme(themeType == DGuiApplicationHelper::DarkType);
ui->appintopage->setTheme(themeType == DGuiApplicationHelper::DarkType); ui->appintopage->setTheme(themeType == DGuiApplicationHelper::DarkType);
ui->settingspage->setTheme(themeType == DGuiApplicationHelper::DarkType); ui->settingspage->setTheme(themeType == DGuiApplicationHelper::DarkType); });
});
//初始化标题栏控件 // 初始化标题栏控件
connect(downloadButton, &ProgressButton::clicked, [=]() { connect(downloadButton, &ProgressButton::clicked, [=]()
{
QPoint pos; QPoint pos;
pos.setX(downloadButton->mapToGlobal(QPoint(0, 0)).x() + downloadButton->width() / 2 - downloadlistwidget->width() / 2); pos.setX(downloadButton->mapToGlobal(QPoint(0, 0)).x() + downloadButton->width() / 2 - downloadlistwidget->width() / 2);
pos.setY(downloadButton->mapToGlobal(QPoint(0, 0)).y() + downloadButton->height() + 5); pos.setY(downloadButton->mapToGlobal(QPoint(0, 0)).y() + downloadButton->height() + 5);
downloadlistwidget->m_move(pos.x(), pos.y()); downloadlistwidget->m_move(pos.x(), pos.y());
downloadlistwidget->show(); downloadlistwidget->show(); });
// appintopage按下下载按钮时标题栏下载列表按钮抖动
connect(ui->appintopage, &AppIntoPage::clickedDownloadBtn, [=]()
{
WidgetAnimation::widgetShake(downloadButton, 6); // 第一个参数是抖动的控件,第二个参数是抖动范围(像素)
}); });
//appintopage按下下载按钮时标题栏下载列表按钮抖动 connect(backButtom, &QPushButton::clicked, [=]()
connect(ui->appintopage, &AppIntoPage::clickedDownloadBtn, [=]() { {
WidgetAnimation::widgetShake(downloadButton,6);//第一个参数是抖动的控件,第二个参数是抖动范围(像素)
});
connect(backButtom, &QPushButton::clicked, [=]() {
ui->stackedWidget->setCurrentIndex(pageHistory.at(pageHistory.count() - 2)); ui->stackedWidget->setCurrentIndex(pageHistory.at(pageHistory.count() - 2));
pageHistory.removeLast(); pageHistory.removeLast();
if (pageHistory.count() > 1) { if (pageHistory.count() > 1) {
backButtom->show(); backButtom->show();
} else { } else {
backButtom->hide(); backButtom->hide();
} } });
});
downloadlistwidget->hide(); downloadlistwidget->hide();
backButtom->hide(); backButtom->hide();
ui->titlebar->setIcon(QIcon::fromTheme(":/icon/logo.svg")); ui->titlebar->setIcon(QIcon::fromTheme(":/icon/logo.svg"));
// Check wayland configs
QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
QWidget *w_titlebar = new QWidget(ui->titlebar); QWidget *w_titlebar = new QWidget(ui->titlebar);
QHBoxLayout *ly_titlebar = new QHBoxLayout(w_titlebar); QHBoxLayout *ly_titlebar = new QHBoxLayout(w_titlebar);
QLabel *title = new QLabel(this); QLabel *title = new QLabel(this);
@@ -159,26 +163,39 @@ MainWindow::MainWindow(QWidget *parent)
searchEdit->setPlaceholderText(tr("Search or enter spk://")); searchEdit->setPlaceholderText(tr("Search or enter spk://"));
ly_titlebar->addWidget(title); ly_titlebar->addWidget(title);
ly_titlebar->addWidget(backButtom); ly_titlebar->addWidget(backButtom);
ly_titlebar->addStretch(2.5);
if (!readConfig.value("build/isDeepinOS").toBool() && readConfig.value("build/useWayland").toBool())
{
// Wayland 搜索栏居中
ly_titlebar->addStretch(WaylandSearchCenter);
}
else
{
// dwayland dxcb 搜索栏顶部右侧居中
ly_titlebar->addStretch(OtherSearchCenter);
}
ly_titlebar->addWidget(searchEdit); ly_titlebar->addWidget(searchEdit);
ly_titlebar->addWidget(downloadButton); ly_titlebar->addWidget(downloadButton);
ly_titlebar->addStretch(1); ly_titlebar->addStretch(RightSearchSpace);
ui->titlebar->setCustomWidget(w_titlebar); ui->titlebar->setCustomWidget(w_titlebar);
//侧边栏按钮 // 侧边栏按钮
int i = 0; int i = 0;
while (i < ui->buttonGroup->buttons().size()) { while (i < ui->buttonGroup->buttons().size())
{
ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{qproperty-icon: url(data/images/userMangaer/teacher.png);}"); ui->buttonGroup->buttons()[i]->setStyleSheet("QPushButton{qproperty-icon: url(data/images/userMangaer/teacher.png);}");
connect(ui->buttonGroup->buttons()[i], &QPushButton::toggled, [=](bool checked) { connect(ui->buttonGroup->buttons()[i], &QPushButton::toggled, [=](bool checked)
{
if (checked == true) { if (checked == true) {
searchEdit->clearEdit(); searchEdit->clearEdit();
updateUi(i); updateUi(i);
} } });
});
i++; i++;
} }
// 搜索事件 // 搜索事件
connect(searchEdit, &DSearchEdit::returnPressed, this, [=]() { connect(searchEdit, &DSearchEdit::returnPressed, this, [=]()
{
QString searchtext = searchEdit->text(); QString searchtext = searchEdit->text();
if (!searchtext.isEmpty()) { if (!searchtext.isEmpty()) {
if (searchtext.startsWith("spk://")) { if (searchtext.startsWith("spk://")) {
@@ -189,22 +206,17 @@ MainWindow::MainWindow(QWidget *parent)
switchPage(AppPageSearchlist); switchPage(AppPageSearchlist);
} }
} }
this->setFocus(); this->setFocus(); });
});
connect(downloadlistwidget, &DownloadListWidget::downloadProgress, this, [=](int i) { connect(downloadlistwidget, &DownloadListWidget::downloadProgress, this, [=](int i)
downloadButton->setProgress(i); { downloadButton->setProgress(i); });
});
// 列表点击事件 // 列表点击事件
connect(ui->applistpage, &AppListPage::clicked, this, [=](QUrl spk) { connect(ui->applistpage, &AppListPage::clicked, this, [=](QUrl spk)
openUrl(spk); { openUrl(spk); });
}); connect(ui->applistpage_1, &AppListPage::clicked, this, [=](QUrl spk)
connect(ui->applistpage_1, &AppListPage::clicked, this, [=](QUrl spk) { { openUrl(spk); });
openUrl(spk); connect(ui->settingspage, &SettingsPage::openUrl, this, [=](QUrl spk)
}); { openUrl(spk); });
connect(ui->settingspage, &SettingsPage::openUrl, this, [=](QUrl spk) {
openUrl(spk);
});
emit DGuiApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); emit DGuiApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType());
initDbus(); initDbus();
@@ -223,12 +235,12 @@ void MainWindow::initDbus()
QDBusConnection::sessionBus().registerService("com.gitee.spark.store"); QDBusConnection::sessionBus().registerService("com.gitee.spark.store");
QDBusConnection::sessionBus().registerObject("/com/gitee/spark/store", "com.gitee.spark.store", this); QDBusConnection::sessionBus().registerObject("/com/gitee/spark/store", "com.gitee.spark.store", this);
connect(dbusInter,&DBusSparkStoreService::sigOpenUrl,this,&MainWindow::onGetUrl); connect(dbusInter, &DBusSparkStoreService::sigOpenUrl, this, &MainWindow::onGetUrl);
} }
void MainWindow::onGetUrl(const QString &url) void MainWindow::onGetUrl(const QString &url)
{ {
if(url.left(6)=="spk://") if (url.left(6) == "spk://")
{ {
openUrl(QUrl(url)); openUrl(QUrl(url));
} }
@@ -237,11 +249,14 @@ void MainWindow::onGetUrl(const QString &url)
void MainWindow::openUrl(QUrl url) void MainWindow::openUrl(QUrl url)
{ {
if (url.toString().startsWith("spk://")) { if (url.toString().startsWith("spk://"))
ui->appintopage->openUrl(QUrl(url.toString().replace("+","%2B"))); {
ui->appintopage->openUrl(QUrl(url.toString().replace("+", "%2B")));
switchPage(AppPageAppdetail); switchPage(AppPageAppdetail);
} else { }
QDesktopServices::openUrl(QUrl(url.toString().replace("+","%2B"))); else
{
QDesktopServices::openUrl(QUrl(url.toString().replace("+", "%2B")));
} }
} }
@@ -252,33 +267,36 @@ void MainWindow::initConfig()
dir.mkpath("/tmp/spark-store"); dir.mkpath("/tmp/spark-store");
} }
void MainWindow::switchPage(int now) //临时方案,回家后修改 void MainWindow::switchPage(int now) // 临时方案,回家后修改
{ {
qDebug() << pageHistory.count(); qDebug() << pageHistory.count();
if (pageHistory.count() >= 1) { if (pageHistory.count() >= 1)
{
backButtom->show(); backButtom->show();
} else { }
else
{
backButtom->hide(); backButtom->hide();
} }
ui->stackedWidget->setCurrentIndex(now); ui->stackedWidget->setCurrentIndex(now);
pageHistory << now; pageHistory << now;
} }
//刷新界面 // 刷新界面
void MainWindow::updateUi(int now) void MainWindow::updateUi(int now)
{ {
pageHistory.clear(); pageHistory.clear();
QStringList itemlist; QStringList itemlist;
itemlist << "" itemlist << ""
<< "network" << "network"
<< "relations" << "chat"
<< "musicandsound" << "music"
<< "videos" << "video"
<< "photos" << "image_graphics"
<< "games" << "games"
<< "office" << "office"
<< "reading" << "reading"
<< "programming" << "development"
<< "tools" << "tools"
<< "themes" << "themes"
<< "others"; << "others";
@@ -290,41 +308,14 @@ void MainWindow::updateUi(int now)
void MainWindow::on_pushButton_14_clicked() void MainWindow::on_pushButton_14_clicked()
{ {
QFile upgradeStatus("/tmp/spark-store/upgradeStatus.txt"); QFile upgradeStatus("/tmp/spark-store/upgradeStatus.txt");
if (!upgradeStatus.exists()){ if (!upgradeStatus.exists())
QtConcurrent::run([=]{ {
QtConcurrent::run([=]
{
auto upgradeP = new QProcess(); auto upgradeP = new QProcess();
upgradeP->startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh"); upgradeP->startDetached("/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh");
upgradeP->waitForStarted(); upgradeP->waitForStarted();
upgradeP->waitForFinished(-1); upgradeP->waitForFinished(-1);
}); upgradeP->deleteLater(); });
}
}
/// @brief 窗口关闭事件
/// @param event
void MainWindow::closeEvent(QCloseEvent *event)
{
if (!closeWindowAnimation) {
QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
animation->setEasingCurve(QEasingCurve::OutQuart);
animation->setDuration(500);
animation->setStartValue(1.0);
animation->setEndValue(0.0);
QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value){
this->update();
// setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100)));
});
QObject::connect(animation, &QPropertyAnimation::finished, this, [=](){
closeWindowAnimation = true;
this->close();
});
animation->start();
event->ignore();
} else {
event->accept();
} }
} }
+2 -6
View File
@@ -2,7 +2,6 @@
#define MAINWINDOWDTK_H #define MAINWINDOWDTK_H
#include <DMainWindow> #include <DMainWindow>
#include <DBlurEffectWidget>
#include <DTitlebar> #include <DTitlebar>
#include <DSearchEdit> #include <DSearchEdit>
#include <QGraphicsDropShadowEffect> #include <QGraphicsDropShadowEffect>
@@ -12,6 +11,7 @@
#include <QDir> #include <QDir>
#include <QDesktopServices> #include <QDesktopServices>
#include "widgets/base/basewidgetopacity.h"
#include "widgets/downloadlistwidget.h" #include "widgets/downloadlistwidget.h"
#include "widgets/common/progressbutton.h" #include "widgets/common/progressbutton.h"
#include "utils/widgetanimation.h" #include "utils/widgetanimation.h"
@@ -23,7 +23,7 @@ namespace Ui {
class MainWindow; class MainWindow;
} }
class MainWindow : public DBlurEffectWidget class MainWindow : public BaseWidgetOpacity
{ {
Q_OBJECT Q_OBJECT
@@ -53,10 +53,6 @@ private slots:
void onGetUrl(const QString &url); void onGetUrl(const QString &url);
void on_pushButton_14_clicked(); void on_pushButton_14_clicked();
// QWidget interface
protected:
bool closeWindowAnimation = false;
void closeEvent(QCloseEvent *event) override;
}; };
#endif // MAINWINDOWDTK_H #endif // MAINWINDOWDTK_H
+58 -48
View File
@@ -1,7 +1,6 @@
#include "appintopage.h" #include "appintopage.h"
#include "ui_appintopage.h" #include "ui_appintopage.h"
AppIntoPage::AppIntoPage(QWidget *parent) : AppIntoPage::AppIntoPage(QWidget *parent) : QWidget(parent),
QWidget(parent),
ui(new Ui::AppIntoPage) ui(new Ui::AppIntoPage)
{ {
ui->setupUi(this); ui->setupUi(this);
@@ -9,12 +8,12 @@ AppIntoPage::AppIntoPage(QWidget *parent) :
ui->listWidget->setMovement(QListView::Static); ui->listWidget->setMovement(QListView::Static);
ui->listWidget->setMaximumHeight(200); ui->listWidget->setMaximumHeight(200);
ui->listWidget->setFlow(QListView::TopToBottom); ui->listWidget->setFlow(QListView::TopToBottom);
api1=new SparkAPI(this); api1 = new SparkAPI(this);
connect(api1,&SparkAPI::finishedRAW,[=](QString download_times){ connect(api1, &SparkAPI::finishedRAW, [=](QString download_times)
{
download_times.remove(QRegExp("\\n")); download_times.remove(QRegExp("\\n"));
ui->download_times->setText(download_times); ui->download_times->setText(download_times);
qDebug()<<"Download Times:"+download_times; qDebug()<<"Download Times:"+download_times; });
});
clear(); clear();
} }
@@ -35,8 +34,8 @@ void AppIntoPage::clear()
ui->downloadButton->hide(); ui->downloadButton->hide();
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->pushButton_3->hide(); ui->pushButton_3->hide();
int n=ui->listWidget->count(); int n = ui->listWidget->count();
for(int i=0;i<n;i++) for (int i = 0; i < n; i++)
{ {
QListWidgetItem *item = ui->listWidget->takeItem(0); QListWidgetItem *item = ui->listWidget->takeItem(0);
QWidget *card = ui->listWidget->itemWidget(item); QWidget *card = ui->listWidget->itemWidget(item);
@@ -49,17 +48,17 @@ void AppIntoPage::clear()
} }
void AppIntoPage::setDownloadWidget(DownloadListWidget *w) void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
{ {
dw=w; dw = w;
connect(w, &DownloadListWidget::downloadFinished, [=]() { connect(w, &DownloadListWidget::downloadFinished, [=]()
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); { isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); });
});
} }
void AppIntoPage::openUrl(QUrl url) void AppIntoPage::openUrl(QUrl url)
{ {
spk=url; spk = url;
SparkAPI *api=new SparkAPI(this); SparkAPI *api = new SparkAPI(this);
clear(); clear();
connect(api,&SparkAPI::finishedObject,[=](QJsonObject appinfo){ connect(api, &SparkAPI::finishedObject, [=](QJsonObject appinfo)
{
info = appinfo; info = appinfo;
// qDebug()<<url; // qDebug()<<url;
@@ -188,37 +187,41 @@ void AppIntoPage::openUrl(QUrl url)
} }
this->sltAppinfoTags(&taglist); this->sltAppinfoTags(&taglist);
disconnect(api,&SparkAPI::finished,nullptr,nullptr); disconnect(api,&SparkAPI::finished,nullptr,nullptr);
api->deleteLater(); api->deleteLater(); });
});
api->getAppInfo(url); api->getAppInfo(url);
api1->getAppDownloadTimes(url); api1->getAppDownloadTimes(url);
} }
void AppIntoPage::isDownloading(QUrl url) void AppIntoPage::isDownloading(QUrl url)
{ {
if(dw->getUrlList().lastIndexOf(url) == -1) if (dw->getUrlList().lastIndexOf(url) == -1)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
return; return;
}else{ }
else
{
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(false);
} }
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2)
ui->pushButton_3->hide();
if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 2)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->downloadButton->setText(tr("Download")); ui->downloadButton->setText(tr("Download"));
} }
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1) if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 1)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->downloadButton->setText(tr("Install")); ui->downloadButton->setText(tr("Install"));
} }
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall) if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->isInstall)
{ {
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(false);
ui->downloadButton->setText(tr("Installing")); ui->downloadButton->setText(tr("Installing"));
return;
} }
if(dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3) if (dw->getDIList()[dw->getUrlList().lastIndexOf(url)]->download == 3)
{ {
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->downloadButton->setText(tr("Reinstall")); ui->downloadButton->setText(tr("Reinstall"));
@@ -229,37 +232,37 @@ void AppIntoPage::isDownloading(QUrl url)
void AppIntoPage::sltAppinfoTags(QStringList *tagList) void AppIntoPage::sltAppinfoTags(QStringList *tagList)
{ {
foreach(const QString &tag, *tagList) foreach (const QString &tag, *tagList)
{ {
if(tag=="community") if (tag == "community")
{ {
ui->tag_community->show(); ui->tag_community->show();
} }
else if(tag=="ubuntu") else if (tag == "ubuntu")
{ {
ui->tag_ubuntu->show(); ui->tag_ubuntu->show();
} }
else if(tag=="deepin") else if (tag == "deepin")
{ {
ui->tag_deepin->show(); ui->tag_deepin->show();
} }
else if(tag=="uos") else if (tag == "uos")
{ {
ui->tag_uos->show(); ui->tag_uos->show();
} }
else if(tag=="dtk5") else if (tag == "dtk5")
{ {
ui->tag_dtk5->show(); ui->tag_dtk5->show();
} }
else if(tag=="dwine2") else if (tag == "dwine2")
{ {
ui->tag_dwine2->show(); ui->tag_dwine2->show();
} }
else if(tag=="dwine5") else if (tag == "dwine5")
{ {
ui->tag_dwine5->show(); ui->tag_dwine5->show();
} }
else if(tag=="a2d") else if (tag == "a2d")
{ {
ui->tag_a2d->show(); ui->tag_a2d->show();
} }
@@ -267,9 +270,9 @@ void AppIntoPage::sltAppinfoTags(QStringList *tagList)
} }
void AppIntoPage::setTheme(bool dark) void AppIntoPage::setTheme(bool dark)
{ {
if(dark) if (dark)
{ {
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}"; QString frameStyleSheet = "#frame,#frame_2,#frame_3,#frame_4{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}";
ui->frame->setStyleSheet(frameStyleSheet); ui->frame->setStyleSheet(frameStyleSheet);
ui->frame_2->setStyleSheet(frameStyleSheet); ui->frame_2->setStyleSheet(frameStyleSheet);
ui->frame_3->setStyleSheet(frameStyleSheet); ui->frame_3->setStyleSheet(frameStyleSheet);
@@ -281,9 +284,11 @@ void AppIntoPage::setTheme(bool dark)
ui->icon_4->setPixmap(QPixmap(":/icon/dark/text.svg")); ui->icon_4->setPixmap(QPixmap(":/icon/dark/text.svg"));
ui->icon_5->setPixmap(QPixmap(":/icon/dark/folder.svg")); ui->icon_5->setPixmap(QPixmap(":/icon/dark/folder.svg"));
ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg")); ui->icon_6->setPixmap(QPixmap(":/icon/dark/globe.svg"));
}else { }
//亮色模式 else
QString frameStyleSheet ="#frame,#frame_2,#frame_3,#frame_4{background-color: #fbfbfb;border-radius:14px;border:1px solid rgb(229,229,229);}"; {
// 亮色模式
QString frameStyleSheet = "#frame,#frame_2,#frame_3,#frame_4{background-color: #fbfbfb;border-radius:14px;border:1px solid rgb(229,229,229);}";
ui->frame->setStyleSheet(frameStyleSheet); ui->frame->setStyleSheet(frameStyleSheet);
ui->frame_2->setStyleSheet(frameStyleSheet); ui->frame_2->setStyleSheet(frameStyleSheet);
ui->frame_3->setStyleSheet(frameStyleSheet); ui->frame_3->setStyleSheet(frameStyleSheet);
@@ -295,7 +300,6 @@ void AppIntoPage::setTheme(bool dark)
ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg")); ui->icon_4->setPixmap(QPixmap(":/icon/light/text.svg"));
ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg")); ui->icon_5->setPixmap(QPixmap(":/icon/light/folder.svg"));
ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg")); ui->icon_6->setPixmap(QPixmap(":/icon/light/globe.svg"));
} }
} }
AppIntoPage::~AppIntoPage() AppIntoPage::~AppIntoPage()
@@ -305,20 +309,28 @@ AppIntoPage::~AppIntoPage()
void AppIntoPage::on_downloadButton_clicked() void AppIntoPage::on_downloadButton_clicked()
{ {
if(ui->downloadButton->text() == tr("Install")) if (ui->downloadButton->text() == tr("Install"))
{
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())]->install(0);
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]()
{ {
dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())]->install(0);
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); });
return; return;
} }
emit clickedDownloadBtn(); emit clickedDownloadBtn();
dw->addItem(info["Name"].toString(),info["Filename"].toString(),info["Pkgname"].toString(),iconpixmap,SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); dw->addItem(info["Name"].toString(), info["Filename"].toString(), info["Pkgname"].toString(), iconpixmap, SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
if(ui->downloadButton->text() == tr("Reinstall")) if (ui->downloadButton->text() == tr("Reinstall"))
{ {
dw->getDIList()[dw->allDownload - 1]->reinstall = true; dw->getDIList()[dw->allDownload - 1]->reinstall = true;
} }
ui->downloadButton->setEnabled(false); ui->downloadButton->setEnabled(false);
QObject::connect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString())], &DownloadItem::finished, [=]()
{
isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString()); isDownloading(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString());
disconnect(dw->getDIList()[dw->getUrlList().lastIndexOf(SparkAPI::getServerUrl()+"store"+spk.path()+"/"+info["Filename"].toString())],&DownloadItem::finished,nullptr,nullptr); });
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
} }
void AppIntoPage::on_pushButton_3_clicked() void AppIntoPage::on_pushButton_3_clicked()
@@ -346,19 +358,17 @@ void AppIntoPage::on_pushButton_3_clicked()
} }
ui->downloadButton->setEnabled(true); ui->downloadButton->setEnabled(true);
ui->pushButton_3->setEnabled(true); ui->pushButton_3->setEnabled(true); });
});
} }
void AppIntoPage::on_shareButton_clicked() void AppIntoPage::on_shareButton_clicked()
{ {
qDebug() << "Share" << spk; qDebug() << "Share" << spk;
Utils::sendNotification("spark-store",tr("Spark Store"),tr("The URL has been copied to the clipboard")); Utils::sendNotification("spark-store", tr("Spark Store"), tr("The URL has been copied to the clipboard"));
QClipboard *clipboard = QApplication::clipboard(); QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(spk.toString()); clipboard->setText(spk.toString());
} }
void AppIntoPage::on_updateButton_clicked() void AppIntoPage::on_updateButton_clicked()
{ {
QString feedbackSpk = "spk://store/chat/store.spark-app.feedback"; QString feedbackSpk = "spk://store/chat/store.spark-app.feedback";
@@ -368,9 +378,9 @@ void AppIntoPage::on_updateButton_clicked()
qDebug() << "反馈器存在"; qDebug() << "反馈器存在";
QProcess::startDetached("sh /opt/durapps/store.spark-app.feedback/launch.sh"); QProcess::startDetached("sh /opt/durapps/store.spark-app.feedback/launch.sh");
} }
else{ else
{
qDebug() << "反馈器不存在,跳转页面"; qDebug() << "反馈器不存在,跳转页面";
openUrl(feedbackSpk); openUrl(feedbackSpk);
} }
} }
+1 -1
View File
@@ -762,7 +762,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Description</string> <string>Introduction</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+44 -26
View File
@@ -1,8 +1,7 @@
#include "applistpage.h" #include "applistpage.h"
#include "ui_applistpage.h" #include "ui_applistpage.h"
AppListPage::AppListPage(QWidget *parent) : AppListPage::AppListPage(QWidget *parent) : QWidget(parent),
QWidget(parent),
ui(new Ui::AppListPage) ui(new Ui::AppListPage)
{ {
ui->setupUi(this); ui->setupUi(this);
@@ -10,48 +9,68 @@ AppListPage::AppListPage(QWidget *parent) :
} }
void AppListPage::setTheme(bool dark) void AppListPage::setTheme(bool dark)
{ {
isDark=dark; isDark = dark;
if(dark) if (dark)
{ {
this->setStyleSheet("#frame{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}"); this->setStyleSheet("#frame{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}");
}else { }
//亮色模式 else
{
// 亮色模式
this->setStyleSheet("#frame{background-color: #ffffff;border-radius:14px;border:1px solid rgb(229,229,229);}"); this->setStyleSheet("#frame{background-color: #ffffff;border-radius:14px;border:1px solid rgb(229,229,229);}");
} }
if(isSearch) if (isSearch)
{ {
getSearchList(nowType); getSearchList(nowType);
}else{ }
else
{
getAppList(nowType); getAppList(nowType);
} }
} }
void AppListPage::getAppList(QString type) void AppListPage::getAppList(QString type)
{ {
isSearch=false; isSearch = false;
nowType=type; nowType = type;
SparkAPI *api=new SparkAPI(this); SparkAPI *api = new SparkAPI(this);
QString url; QString url;
if(isDark) QString theme;
if (isDark)
{ {
url=api->getServerUrl()+"store/#/dark"+type; theme = "theme=dark";
}else{
url=api->getServerUrl()+"store/#/"+type;
} }
else
{
theme = "theme=light";
}
if (type == "")
{
url = api->getServerUrl() + "store/#/flamescion/?" + theme;
}
else
{
url = api->getServerUrl() + "store/#/flamescion/applist?type=" + type + "&" + theme;
}
ui->webEngineView->setUrl(url); ui->webEngineView->setUrl(url);
} }
void AppListPage::getSearchList(QString keyword) void AppListPage::getSearchList(QString keyword)
{ {
isSearch=true; isSearch = true;
nowType=keyword; nowType = keyword;
SparkAPI *api=new SparkAPI(this); SparkAPI *api = new SparkAPI(this);
QString url; QString url;
if(isDark) QString theme;
if (isDark)
{ {
url=api->getServerUrl()+"store/#/darksearch?keywords="+keyword; theme = "theme=dark";
}else{
url=api->getServerUrl()+"store/#/search?keywords="+keyword;
} }
else
{
theme = "theme=light";
}
url = api->getServerUrl() + "store/#/flamescion/search?keywords=" + keyword + "&" + theme;
ui->webEngineView->setUrl(url); ui->webEngineView->setUrl(url);
} }
@@ -62,15 +81,14 @@ AppListPage::~AppListPage()
void AppListPage::on_webEngineView_urlChanged(const QUrl &arg1) void AppListPage::on_webEngineView_urlChanged(const QUrl &arg1)
{ {
if(arg1.path().right(8) == "app.json") if (arg1.path().right(8) == "app.json")
{ {
QString url = arg1.toString(); QString url = arg1.toString();
url = url.mid(url.indexOf("/store/")); url = url.mid(url.indexOf("/store/"));
url = "spk:/"+url; url = "spk:/" + url;
url = url.mid(0,url.indexOf("/app.json")); url = url.mid(0, url.indexOf("/app.json"));
qDebug() << "程序跳转链接地址:" << url; qDebug() << "程序跳转链接地址:" << url;
ui->webEngineView->back(); ui->webEngineView->back();
emit clicked(url); emit clicked(url);
} }
} }
+31 -37
View File
@@ -1,21 +1,23 @@
#include "settingspage.h" #include "settingspage.h"
#include "ui_settingspage.h" #include "ui_settingspage.h"
bool SettingsPage::isdownload = false; bool SettingsPage::isdownload = false;
SettingsPage::SettingsPage(QWidget *parent) : SettingsPage::SettingsPage(QWidget *parent) : QWidget(parent),
QWidget(parent),
ui(new Ui::SettingsPage) ui(new Ui::SettingsPage)
{ {
ui->setupUi(this); ui->setupUi(this);
configCanSave = false;
initConfig(); initConfig();
} }
void SettingsPage::setTheme(bool dark) void SettingsPage::setTheme(bool dark)
{ {
if(dark) if (dark)
{ {
this->setStyleSheet("#frame{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}"); this->setStyleSheet("#frame{background-color: #252525;border-radius:14px;border:1px solid rgb(64, 64, 64);}");
}else { }
//亮色模式 else
{
// 亮色模式
this->setStyleSheet("#frame{background-color: #ffffff;border-radius:14px;border:1px solid rgb(229,229,229);}"); this->setStyleSheet("#frame{background-color: #ffffff;border-radius:14px;border:1px solid rgb(229,229,229);}");
} }
} }
@@ -25,7 +27,7 @@ void SettingsPage::readServerList()
// 读取服务器列表并初始化 // 读取服务器列表并初始化
QFile file(QDir::homePath().toUtf8() + "/.config/spark-store/server.list"); QFile file(QDir::homePath().toUtf8() + "/.config/spark-store/server.list");
//判断文件是否存在 // 判断文件是否存在
if (!file.exists()) if (!file.exists())
{ {
ui->comboBox_server->addItem("https://d.store.deepinos.org.cn/"); ui->comboBox_server->addItem("https://d.store.deepinos.org.cn/");
@@ -33,28 +35,28 @@ void SettingsPage::readServerList()
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
qDebug()<<"无法读取server.list"; qDebug() << "无法读取server.list";
} }
//创建QTextStream对象 // 创建QTextStream对象
QTextStream textStream(&file); QTextStream textStream(&file);
QString lineData = textStream.readLine();//读取文件的第一行 QString lineData = textStream.readLine(); // 读取文件的第一行
ui->comboBox_server->addItem(lineData); ui->comboBox_server->addItem(lineData);
while(!lineData.isNull()) while (!lineData.isNull())
{ {
lineData = textStream.readLine(); lineData = textStream.readLine();
ui->comboBox_server->addItem(lineData); ui->comboBox_server->addItem(lineData);
} }
for(int i = 0; i < ui->comboBox_server->count(); i++) for (int i = 0; i < ui->comboBox_server->count(); i++)
{ {
if(ui->comboBox_server->itemText(i) == "开发者模式 Dev only") if (ui->comboBox_server->itemText(i) == "开发者模式 Dev only")
{ {
ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(i, 0), QVariant(0), Qt::UserRole - 1); ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(i, 0), QVariant(0), Qt::UserRole - 1);
} }
if(ui->comboBox_server->itemText(i) == "镜像源 Download only") if (ui->comboBox_server->itemText(i) == "镜像源 Download only")
{ {
for(int j = i; j < ui->comboBox_server->count(); j++) for (int j = i; j < ui->comboBox_server->count(); j++)
{ {
ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(j, 0), QVariant(0), Qt::UserRole - 1); ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(j, 0), QVariant(0), Qt::UserRole - 1);
} }
@@ -70,12 +72,13 @@ void SettingsPage::initConfig()
// 读取服务器URL并初始化菜单项的链接 // 读取服务器URL并初始化菜单项的链接
QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
if(!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE") if (!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE")
{ {
qDebug() << readConfig.value("server/choose").toString();
ui->comboBox_server->setCurrentText(readConfig.value("server/choose").toString()); ui->comboBox_server->setCurrentText(readConfig.value("server/choose").toString());
SparkAPI::setServerUrl(readConfig.value("server/choose").toString()); SparkAPI::setServerUrl(readConfig.value("server/choose").toString());
} }
configCanSave = true; // 防止触发保存配置信号 configCanSave = true; //  防止触发保存配置信号
} }
SettingsPage::~SettingsPage() SettingsPage::~SettingsPage()
@@ -94,19 +97,16 @@ void SettingsPage::on_pushButton_updateServer_clicked()
system("curl -o " + QDir::homePath().toUtf8() + "/.config/spark-store/server.list https://d.store.deepinos.org.cn/store/server-and-mirror.list"); system("curl -o " + QDir::homePath().toUtf8() + "/.config/spark-store/server.list https://d.store.deepinos.org.cn/store/server-and-mirror.list");
ui->pushButton_updateServer->setEnabled(true); ui->pushButton_updateServer->setEnabled(true);
ui->comboBox_server->setCurrentIndex(0);
readServerList(); readServerList();
}); ui->comboBox_server->setCurrentIndex(0); });
} }
void SettingsPage::on_comboBox_server_currentIndexChanged(const QString &arg1) void SettingsPage::on_comboBox_server_currentIndexChanged(const QString &arg1)
{ {
SparkAPI::setServerUrl(arg1); // 服务器信息更新 SparkAPI::setServerUrl(arg1); // 服务器信息更新
qDebug() << arg1;
const QString updatedInfo = "TRUE"; const QString updatedInfo = "TRUE";
if(configCanSave) if (configCanSave)
{ {
// ui->label_setting1->show(); // ui->label_setting1->show();
QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat); QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
@@ -123,7 +123,7 @@ void SettingsPage::setIsDownload(bool isdownload)
void SettingsPage::updateUI() void SettingsPage::updateUI()
{ {
if(isdownload) if (isdownload)
{ {
ui->pushButton_clear->setEnabled(false); ui->pushButton_clear->setEnabled(false);
} }
@@ -134,15 +134,15 @@ void SettingsPage::updateUI()
// 显示缓存占用空间 // 显示缓存占用空间
quint64 tmp_size = dirFileSize(QString::fromUtf8(TMP_PATH)); quint64 tmp_size = dirFileSize(QString::fromUtf8(TMP_PATH));
QString tmp_size_str; QString tmp_size_str;
if(tmp_size < 1024) if (tmp_size < 1024)
{ {
tmp_size_str = QString::number(tmp_size) + "B"; tmp_size_str = QString::number(tmp_size) + "B";
} }
else if(tmp_size < (1024 * 1024)) else if (tmp_size < (1024 * 1024))
{ {
tmp_size_str = QString::number(0.01 * int(100 * (tmp_size / 1024))) + "KB"; tmp_size_str = QString::number(0.01 * int(100 * (tmp_size / 1024))) + "KB";
} }
else if(tmp_size<(1024*1024*1024)) else if (tmp_size < (1024 * 1024 * 1024))
{ {
tmp_size_str = QString::number(0.01 * int(100 * (tmp_size / (1024 * 1024)))) + "MB"; tmp_size_str = QString::number(0.01 * int(100 * (tmp_size / (1024 * 1024)))) + "MB";
} }
@@ -159,13 +159,13 @@ quint64 SettingsPage::dirFileSize(const QString &path)
QDir dir(path); QDir dir(path);
quint64 size = 0; quint64 size = 0;
// dir.entryInfoList(QDir::Files); // 返回文件信息 // dir.entryInfoList(QDir::Files); // 返回文件信息
foreach(QFileInfo fileInfo, dir.entryInfoList(QDir::Files)) foreach (QFileInfo fileInfo, dir.entryInfoList(QDir::Files))
{ {
// 计算文件大小 // 计算文件大小
size += quint64(fileInfo.size()); size += quint64(fileInfo.size());
} }
// dir.entryList(QDir::Dirs|QDir::NoDotAndDotDot); // 返回所有子目录,并进行过滤 // dir.entryList(QDir::Dirs|QDir::NoDotAndDotDot); // 返回所有子目录,并进行过滤
foreach(QString subDir, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) foreach (QString subDir, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
{ {
// 若存在子目录,则递归调用 dirFileSize() 函数 // 若存在子目录,则递归调用 dirFileSize() 函数
size += dirFileSize(path + QDir::separator() + subDir); size += dirFileSize(path + QDir::separator() + subDir);
@@ -183,11 +183,9 @@ void SettingsPage::on_pushButton_updateApt_clicked()
emit openUrl(QUrl("spk://store/tools/spark-store")); emit openUrl(QUrl("spk://store/tools/spark-store"));
ui->label_aptserver->setText(tr("")); ui->label_aptserver->setText(tr(""));
ui->pushButton_updateApt->setEnabled(true); ui->pushButton_updateApt->setEnabled(true); });
});
} }
void SettingsPage::on_pushButton_clear_clicked() void SettingsPage::on_pushButton_clear_clicked()
{ {
QtConcurrent::run([=]() QtConcurrent::run([=]()
@@ -203,11 +201,9 @@ void SettingsPage::on_pushButton_clear_clicked()
} }
Utils::sendNotification("spark-store",tr("Spark Store"),tr("Temporary cache was cleaned")); Utils::sendNotification("spark-store",tr("Spark Store"),tr("Temporary cache was cleaned"));
ui->pushButton_clear->setEnabled(true); ui->pushButton_clear->setEnabled(true);
updateUI(); updateUI(); });
});
} }
void SettingsPage::on_pushButton_clearWebCache_clicked() void SettingsPage::on_pushButton_clearWebCache_clicked()
{ {
QtConcurrent::run([=]() QtConcurrent::run([=]()
@@ -219,7 +215,5 @@ void SettingsPage::on_pushButton_clearWebCache_clicked()
dataLocal = QStandardPaths::writableLocation(QStandardPaths::TempLocation); dataLocal = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
qDebug() << dataLocal; qDebug() << dataLocal;
QDir cacheDir(dataLocal); QDir cacheDir(dataLocal);
cacheDir.removeRecursively(); cacheDir.removeRecursively(); });
});
} }
+4 -2
View File
@@ -58,7 +58,8 @@ SOURCES += \
backend/downloadworker.cpp \ backend/downloadworker.cpp \
pages/appintopage.cpp \ pages/appintopage.cpp \
widgets/big_image.cpp \ widgets/big_image.cpp \
backend/image_show.cpp backend/image_show.cpp \
widgets/base/basewidgetopacity.cpp
HEADERS += \ HEADERS += \
dbus/dbussparkstoreservice.h \ dbus/dbussparkstoreservice.h \
@@ -79,7 +80,8 @@ HEADERS += \
backend/downloadworker.h \ backend/downloadworker.h \
pages/appintopage.h \ pages/appintopage.h \
widgets/big_image.h \ widgets/big_image.h \
backend/image_show.h backend/image_show.h \
widgets/base/basewidgetopacity.h
FORMS += \ FORMS += \
mainwindow-dtk.ui \ mainwindow-dtk.ui \
+8 -11
View File
@@ -1,22 +1,19 @@
#include "httprequest.h" #include "httprequest.h"
HttpRequest::HttpRequest() HttpRequest::HttpRequest()
{ {
} }
void HttpRequest::getRequest(QNetworkRequest request) void HttpRequest::getRequest(QNetworkRequest request)
{ {
QNetworkAccessManager *naManager=new QNetworkAccessManager(this); QNetworkAccessManager *naManager = new QNetworkAccessManager(this);
request.setRawHeader("User-Agent", "Mozilla/5.0"); request.setRawHeader("User-Agent", "Mozilla/5.0");
request.setRawHeader("Content-Type", "charset='utf-8'"); request.setRawHeader("Content-Type", "charset='utf-8'");
request.setRawHeader("Content-Type", "application/json"); request.setRawHeader("Content-Type", "application/json");
naManager->get(request); naManager->get(request);
QObject::connect(naManager,&QNetworkAccessManager::finished,this,&HttpRequest::readdata_slot); QObject::connect(naManager, &QNetworkAccessManager::finished, this, &HttpRequest::readdata_slot);
} }
void HttpRequest::readdata_slot(QNetworkReply *reply) void HttpRequest::readdata_slot(QNetworkReply *reply)
{ {
@@ -24,19 +21,19 @@ void HttpRequest::readdata_slot(QNetworkReply *reply)
} }
QString HttpRequest::postRequest(QString url, QString jsondata) QString HttpRequest::postRequest(QString url, QString jsondata)
{ {
QByteArray array= jsondata.toLatin1(); QByteArray array = jsondata.toLatin1();
QNetworkRequest request; QNetworkRequest request;
QNetworkAccessManager *naManager=new QNetworkAccessManager(this); QNetworkAccessManager *naManager = new QNetworkAccessManager(this);
QUrl strUrl = url.replace("+","%2B"); QUrl strUrl = url.replace("+", "%2B");
request.setUrl(strUrl); request.setUrl(strUrl);
request.setRawHeader("Content-Type", "charset='utf-8'"); request.setRawHeader("Content-Type", "charset='utf-8'");
request.setRawHeader("Content-Type", "application/json"); request.setRawHeader("Content-Type", "application/json");
QNetworkReply* reply = naManager->post(request, array); QNetworkReply *reply = naManager->post(request, array);
QEventLoop eventLoop; QEventLoop eventLoop;
connect(naManager, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit())); connect(naManager, SIGNAL(finished(QNetworkReply *)), &eventLoop, SLOT(quit()));
eventLoop.exec(); eventLoop.exec();
QTextCodec* codec = QTextCodec::codecForName("utf8"); QTextCodec *codec = QTextCodec::codecForName("utf8");
QString strReply = codec->toUnicode(reply->readAll()); QString strReply = codec->toUnicode(reply->readAll());
reply->deleteLater(); reply->deleteLater();
return strReply; return strReply;
+2 -3
View File
@@ -2,11 +2,10 @@
Utils::Utils() Utils::Utils()
{ {
} }
//这个函数是chatGPT写的 // Author: chatGPT
void Utils::sendNotification(QString icon,QString title,QString body) void Utils::sendNotification(QString icon, QString title, QString body)
{ {
QDBusInterface iface("org.freedesktop.Notifications", QDBusInterface iface("org.freedesktop.Notifications",
"/org/freedesktop/Notifications", "/org/freedesktop/Notifications",
+22 -15
View File
@@ -2,46 +2,53 @@
WidgetAnimation::WidgetAnimation() WidgetAnimation::WidgetAnimation()
{ {
} }
void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange) void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
{ {
int nX = pWidget->x(); int nX = pWidget->x();
int nY = pWidget->y(); int nY = pWidget->y();
QPropertyAnimation *pAnimation = new QPropertyAnimation(pWidget,"geometry"); QPropertyAnimation *pAnimation = new QPropertyAnimation(pWidget, "geometry");
pAnimation->setEasingCurve(QEasingCurve::InOutSine); pAnimation->setEasingCurve(QEasingCurve::InOutSine);
pAnimation->setDuration(400); pAnimation->setDuration(400);
pAnimation->setStartValue(QRect(QPoint(nX,nY),pWidget->size())); pAnimation->setStartValue(QRect(QPoint(nX, nY), pWidget->size()));
int nShakeCount = 8; int nShakeCount = 8;
double nStep = 1.0/nShakeCount; double nStep = 1.0 / nShakeCount;
for(int i = 1; i < nShakeCount; i++){ for (int i = 1; i < nShakeCount; i++)
nRange = i&1 ? -nRange : nRange; {
pAnimation->setKeyValueAt(nStep*i,QRect(QPoint(nX + nRange,nY),pWidget->size())); nRange = i & 1 ? -nRange : nRange;
pAnimation->setKeyValueAt(nStep * i, QRect(QPoint(nX + nRange, nY), pWidget->size()));
} }
pAnimation->setEndValue(QRect(QPoint(nX,nY),pWidget->size())); pAnimation->setEndValue(QRect(QPoint(nX, nY), pWidget->size()));
pAnimation->start(QAbstractAnimation::DeleteWhenStopped); pAnimation->start(QAbstractAnimation::DeleteWhenStopped);
} }
void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear) QPropertyAnimation *WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear)
{ {
QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget); QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget);
//设置动画效果 // 设置动画效果
animation->setEasingCurve(QEasingCurve::Linear); animation->setEasingCurve(QEasingCurve::Linear);
//设置动画时间(单位:毫秒) // 设置动画时间(单位:毫秒)
animation->setDuration(500); animation->setDuration(500);
// 设置动画步长值,以及在该位置时显示的透明度 // 设置动画步长值,以及在该位置时显示的透明度
if(isAppear) if (isAppear)
{ {
animation->setKeyValueAt(0, 0); animation->setKeyValueAt(0, 0);
// m_animation->setKeyValueAt(0.5, 0); // m_animation->setKeyValueAt(0.5, 0);
animation->setKeyValueAt(1, 1); animation->setKeyValueAt(1, 1);
}else{ }
else
{
animation->setKeyValueAt(0, 1); animation->setKeyValueAt(0, 1);
animation->setKeyValueAt(1, 0); animation->setKeyValueAt(1, 0);
} }
// 开始动画 return animation;
animation->start(); }
void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear)
{
// 开始动画
createWidgetOpacity(pWidget, isAppear)->start();
} }
+2
View File
@@ -10,6 +10,8 @@ class WidgetAnimation
public: public:
WidgetAnimation(); WidgetAnimation();
static void widgetShake(QWidget *pWidget, int nRange); static void widgetShake(QWidget *pWidget, int nRange);
static QPropertyAnimation* createWidgetOpacity(QWidget *pWidget, bool isAppear);
static void widgetOpacity(QWidget *pWidget, bool isAppear); static void widgetOpacity(QWidget *pWidget, bool isAppear);
}; };
+41
View File
@@ -0,0 +1,41 @@
#include "basewidgetopacity.h"
#include <QCloseEvent>
#include <QPropertyAnimation>
BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent)
{
// WidgetAnimation::widgetOpacity(this,true);
}
/// @brief 窗口关闭事件
/// @param event
void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
{
if (!closeWindowAnimation)
{
closeWindowAnimation = true;
QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
animation->setEasingCurve(QEasingCurve::OutQuart);
animation->setDuration(500);
animation->setStartValue(1.0);
animation->setEndValue(0.0);
QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value)
{
this->update();
// setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100)));
});
QObject::connect(animation, &QPropertyAnimation::finished, this, [=]()
{ this->close(); });
animation->start();
event->ignore();
}
else
{
event->accept();
}
}
+24
View File
@@ -0,0 +1,24 @@
#ifndef BASEWIDGETOPACITY_H
#define BASEWIDGETOPACITY_H
#include <DBlurEffectWidget>
DWIDGET_USE_NAMESPACE
class BaseWidgetOpacity : public DBlurEffectWidget
{
Q_OBJECT
public:
explicit BaseWidgetOpacity(QWidget *parent = nullptr);
signals:
public slots:
// QWidget interface
protected:
bool closeWindowAnimation = false;
void closeEvent(QCloseEvent *event) override;
};
#endif // BASEWIDGETOPACITY_H
+2 -3
View File
@@ -3,11 +3,10 @@
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QtConcurrent> #include <QtConcurrent>
big_image::big_image(DBlurEffectWidget *parent) : big_image::big_image(DBlurEffectWidget *parent) : DBlurEffectWidget(parent),
DBlurEffectWidget(parent),
m_image(new QLabel) m_image(new QLabel)
{ {
// setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint); // 设置图片对话框总在最前 // setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint); // 设置图片对话框总在最前
setWindowModality(Qt::ApplicationModal); // 以上无效不如直接使用 模态化对话框 setWindowModality(Qt::ApplicationModal); // 以上无效不如直接使用 模态化对话框
setRadius(0); setRadius(0);
setMaskAlpha(60); setMaskAlpha(60);
+7 -9
View File
@@ -6,8 +6,7 @@
bool DownloadItem::isInstall = false; bool DownloadItem::isInstall = false;
DownloadItem::DownloadItem(QWidget *parent) : DownloadItem::DownloadItem(QWidget *parent) : QWidget(parent),
QWidget(parent),
reinstall(false), reinstall(false),
close(false), close(false),
ui(new Ui::DownloadItem), ui(new Ui::DownloadItem),
@@ -34,7 +33,7 @@ void DownloadItem::setValue(qint64 value)
{ {
ui->progressBar->setValue(qint32(value)); ui->progressBar->setValue(qint32(value));
ui->label_2->setText(QString::number(double(value) / 100) + "% (" + speed + ")"); ui->label_2->setText(QString::number(double(value) / 100) + "% (" + speed + ")");
if(ui->label_2->text().left(4) == "100%") if (ui->label_2->text().left(4) == "100%")
{ {
download = 1; download = 1;
ui->label_2->setText(tr("Download Complete.")); ui->label_2->setText(tr("Download Complete."));
@@ -58,7 +57,7 @@ QString DownloadItem::getName()
void DownloadItem::readyInstall() void DownloadItem::readyInstall()
{ {
if(!close) if (!close)
{ {
ui->progressBar->hide(); ui->progressBar->hide();
ui->pushButton_install->setEnabled(true); ui->pushButton_install->setEnabled(true);
@@ -90,7 +89,7 @@ void DownloadItem::setSpeed(QString s)
void DownloadItem::install(int t) void DownloadItem::install(int t)
{ {
if(!isInstall) if (!isInstall)
{ {
isInstall = true; isInstall = true;
ui->pushButton_install->hide(); ui->pushButton_install->hide();
@@ -164,11 +163,10 @@ void DownloadItem::install(int t)
ui->widget_spinner->hide(); ui->widget_spinner->hide();
DownloadItem::isInstall = false; DownloadItem::isInstall = false;
}); emit finished(); });
// emit finished();
qDebug()<<ui->label_filename->text().toUtf8(); qDebug() << ui->label_filename->text().toUtf8();
} }
} }
void DownloadItem::on_pushButton_install_clicked() void DownloadItem::on_pushButton_install_clicked()
+36 -39
View File
@@ -8,15 +8,15 @@
ProgressButton::ProgressButton(QWidget *parent) ProgressButton::ProgressButton(QWidget *parent)
: QWidget{parent} : QWidget{parent}
{ {
//this->setWindowFlags(Qt::FramelessWindowHint); // this->setWindowFlags(Qt::FramelessWindowHint);
this->setAttribute(Qt::WA_TranslucentBackground, true); this->setAttribute(Qt::WA_TranslucentBackground, true);
setMinimumWidth(36); setMinimumWidth(36);
setMinimumHeight(36); setMinimumHeight(36);
svgPath=""; svgPath = "";
backColor=Qt::transparent; backColor = Qt::transparent;
setMouseTracking(true); setMouseTracking(true);
connect(this,&ProgressButton::startProcessing,this,&ProgressButton::operationProcessing,Qt::QueuedConnection); connect(this, &ProgressButton::startProcessing, this, &ProgressButton::operationProcessing, Qt::QueuedConnection);
} }
ProgressButton::~ProgressButton() ProgressButton::~ProgressButton()
@@ -26,63 +26,63 @@ ProgressButton::~ProgressButton()
void ProgressButton::paintEvent(QPaintEvent *event) void ProgressButton::paintEvent(QPaintEvent *event)
{ {
QPainter painter(this); QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing,true); painter.setRenderHint(QPainter::Antialiasing, true);
auto rect = event->rect(); auto rect = event->rect();
if(buttonState == state::normal || buttonState == state::hover) if (buttonState == state::normal || buttonState == state::hover)
{ {
auto radiu = (rect.height() - 6) / 2; auto radiu = (rect.height() - 6) / 2;
painter.translate(rect.center()); painter.translate(rect.center());
painter.setPen(Qt::transparent); painter.setPen(Qt::transparent);
painter.setBrush(QColor(buttonState == state::normal ? color : color.darker())); painter.setBrush(QColor(buttonState == state::normal ? color : color.darker()));
//painter.drawEllipse(QPoint(0,0),radiu,radiu); // painter.drawEllipse(QPoint(0,0),radiu,radiu);
//radiu -= 3; // radiu -= 3;
painter.setBrush(backColor); painter.setBrush(backColor);
painter.drawEllipse(QPoint(0,0),radiu,radiu); painter.drawEllipse(QPoint(0, 0), radiu, radiu);
QSvgRenderer m_svgRender; QSvgRenderer m_svgRender;
m_svgRender.load(svgPath); m_svgRender.load(svgPath);
m_svgRender.render(&painter ,QRectF(-radiu / 2,-radiu / 2,radiu,radiu)); m_svgRender.render(&painter, QRectF(-radiu / 2, -radiu / 2, radiu, radiu));
} }
else if(buttonState == state::openProgress) else if (buttonState == state::openProgress)
{ {
painter.translate(rect.center()); painter.translate(rect.center());
auto radiu = (rect.height() - 6) / 2 -3; auto radiu = (rect.height() - 6) / 2 - 3;
painter.setBrush(backColor); painter.setBrush(backColor);
painter.setPen(QPen(backColor,3)); painter.setPen(QPen(backColor, 3));
painter.drawEllipse(QPoint(0,0),radiu,radiu); painter.drawEllipse(QPoint(0, 0), radiu, radiu);
painter.setPen(QPen(backColor,3)); painter.setPen(QPen(backColor, 3));
QSvgRenderer m_svgRender; QSvgRenderer m_svgRender;
m_svgRender.load(svgPath); m_svgRender.load(svgPath);
m_svgRender.render(&painter ,QRectF(-radiu / 2,-radiu / 2,radiu,radiu)); m_svgRender.render(&painter, QRectF(-radiu / 2, -radiu / 2, radiu, radiu));
QRect rect = QRect(-radiu, -radiu, QRect rect = QRect(-radiu, -radiu,
radiu*2, radiu*2); radiu * 2, radiu * 2);
painter.setPen(QPen(color.darker(100),3)); painter.setPen(QPen(color.darker(100), 3));
auto angle = progress * 360 / 100; auto angle = progress * 360 / 100;
painter.drawArc(rect.adjusted(-3,-3,3,3),90 * 16,-static_cast<int>(angle * 16)); painter.drawArc(rect.adjusted(-3, -3, 3, 3), 90 * 16, -static_cast<int>(angle * 16));
} }
else if(buttonState == state::closeProgress) else if (buttonState == state::closeProgress)
{ {
auto radiu = (rect.height() - 6) / 2; auto radiu = (rect.height() - 6) / 2;
painter.translate(rect.center()); painter.translate(rect.center());
painter.setPen(Qt::transparent); painter.setPen(Qt::transparent);
painter.setBrush(QColor(0, 0, 0, 63)); painter.setBrush(QColor(0, 0, 0, 63));
painter.drawEllipse(QPoint(0,0),radiu,radiu); painter.drawEllipse(QPoint(0, 0), radiu, radiu);
radiu -= 3; radiu -= 3;
painter.setBrush(backColor); painter.setBrush(backColor);
painter.drawEllipse(QPoint(0,0),radiu,radiu); painter.drawEllipse(QPoint(0, 0), radiu, radiu);
painter.setPen(QPen(color,3,Qt::SolidLine,Qt::RoundCap,Qt::RoundJoin)); painter.setPen(QPen(color, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
painter.drawLine(QPoint(-radiu / 3,0), painter.drawLine(QPoint(-radiu / 3, 0),
QPoint(-radiu / 5,radiu / 3)); QPoint(-radiu / 5, radiu / 3));
painter.drawLine(QPoint(-radiu / 5,radiu / 3), painter.drawLine(QPoint(-radiu / 5, radiu / 3),
QPoint(radiu / 4,-radiu / 4)); QPoint(radiu / 4, -radiu / 4));
} }
} }
@@ -90,12 +90,12 @@ void ProgressButton::setProgress(int progress)
{ {
buttonState = state::openProgress; buttonState = state::openProgress;
ProgressButton::progress = progress; ProgressButton::progress = progress;
if(progress == 0) if (progress == 0)
{ {
buttonState = state::normal; buttonState = state::normal;
update(); update();
} }
if(progress == 100) if (progress == 100)
{ {
buttonState = state::closeProgress; buttonState = state::closeProgress;
update(); update();
@@ -127,7 +127,7 @@ void ProgressButton::setColor(QColor color)
void ProgressButton::leaveEvent(QEvent *event) void ProgressButton::leaveEvent(QEvent *event)
{ {
if(buttonState == state::hover) if (buttonState == state::hover)
{ {
buttonState = state::normal; buttonState = state::normal;
update(); update();
@@ -137,12 +137,12 @@ void ProgressButton::leaveEvent(QEvent *event)
void ProgressButton::mousePressEvent(QMouseEvent *event) void ProgressButton::mousePressEvent(QMouseEvent *event)
{ {
if(buttonState == state::hover || buttonState == state::normal) if (buttonState == state::hover || buttonState == state::normal)
{ {
widthChangeValue = (this->width() - 6) / 2; widthChangeValue = (this->width() - 6) / 2;
update(); update();
} }
else if(buttonState == state::closeProgress) else if (buttonState == state::closeProgress)
{ {
update(); update();
} }
@@ -152,24 +152,21 @@ void ProgressButton::mousePressEvent(QMouseEvent *event)
void ProgressButton::operationProcessing() void ProgressButton::operationProcessing()
{ {
} }
const int RADIUS = 60; const int RADIUS = 60;
WaterDrop::WaterDrop(QWidget *parent) WaterDrop::WaterDrop(QWidget *parent)
: QWidget(parent) : QWidget(parent), m_waterDropAnimation(nullptr), m_animationRadius(0)
, m_waterDropAnimation(nullptr)
, m_animationRadius(0)
{ {
this->setFixedSize(QSize(RADIUS * 2, RADIUS * 2)); this->setFixedSize(QSize(RADIUS * 2, RADIUS * 2));
this->setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); this->setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);
this->setAttribute(Qt::WA_TranslucentBackground); this->setAttribute(Qt::WA_TranslucentBackground);
this->setAttribute(Qt::WA_DeleteOnClose); this->setAttribute(Qt::WA_DeleteOnClose);
m_waterDropAnimation = new QVariantAnimation(this); m_waterDropAnimation = new QVariantAnimation(this);
// m_waterDropAnimation->setEasingCurve(QEasingCurve(static_cast<QEasingCurve::Type>(QRandomGenerator::global()->bounded(40)))); // m_waterDropAnimation->setEasingCurve(QEasingCurve(static_cast<QEasingCurve::Type>(QRandomGenerator::global()->bounded(40))));
} }
//把鼠标点击的点转换为圆心点坐标 // 把鼠标点击的点转换为圆心点坐标
void WaterDrop::move(const QPoint &point) void WaterDrop::move(const QPoint &point)
{ {
QPoint translatePoint = point - QPoint(RADIUS, RADIUS); QPoint translatePoint = point - QPoint(RADIUS, RADIUS);
@@ -196,7 +193,7 @@ void WaterDrop::paintEvent(QPaintEvent *event)
pen.setColor(QColor(0xffffff80)); pen.setColor(QColor(0xffffff80));
pen.setWidth(5); pen.setWidth(5);
painter.setPen(pen); painter.setPen(pen);
painter.drawEllipse(event->rect().center(),m_animationRadius, m_animationRadius); painter.drawEllipse(event->rect().center(), m_animationRadius, m_animationRadius);
} }
void WaterDrop::onRaduisChanged(QVariant value) void WaterDrop::onRaduisChanged(QVariant value)
+3 -3
View File
@@ -5,13 +5,13 @@
#include <QDebug> #include <QDebug>
SmoothListWidget::SmoothListWidget(QWidget *parent) : QListWidget(parent) SmoothListWidget::SmoothListWidget(QWidget *parent) : QListWidget(parent)
{ {
vScrollBar->setOrientation(Qt::Orientation::Vertical); //将滚动条设置为纵向 vScrollBar->setOrientation(Qt::Orientation::Vertical); // 将滚动条设置为纵向
setVerticalScrollBar(vScrollBar); //设置纵向滚动条 setVerticalScrollBar(vScrollBar); // 设置纵向滚动条
connect(vScrollBar, SIGNAL(valueChanged(int)), this, SLOT(onSliderChanged(int))); connect(vScrollBar, SIGNAL(valueChanged(int)), this, SLOT(onSliderChanged(int)));
} }
void SmoothListWidget::wheelEvent(QWheelEvent *e) void SmoothListWidget::wheelEvent(QWheelEvent *e)
{ {
//当捕获到事件后,调用相对滚动的槽函数 // 当捕获到事件后,调用相对滚动的槽函数
vScrollBar->scroll(e->angleDelta().y()); vScrollBar->scroll(e->angleDelta().y());
} }
void SmoothListWidget::onSliderChanged(int p) void SmoothListWidget::onSliderChanged(int p)
+19 -19
View File
@@ -1,56 +1,56 @@
#include "smoothscrollbar.h" #include "smoothscrollbar.h"
#include <QWheelEvent> #include <QWheelEvent>
#include <QDebug> #include <QDebug>
SmoothScrollBar::SmoothScrollBar(QWidget* parent):QScrollBar(parent) SmoothScrollBar::SmoothScrollBar(QWidget *parent) : QScrollBar(parent)
{ {
m_scrollAni=new QPropertyAnimation(this); m_scrollAni = new QPropertyAnimation(this);
m_scrollAni->setTargetObject(this); m_scrollAni->setTargetObject(this);
m_scrollAni->setPropertyName("value"); m_scrollAni->setPropertyName("value");
m_scrollAni->setEasingCurve(QEasingCurve::OutQuint); //设置动画曲线,在Qt文档中有详细的介绍 m_scrollAni->setEasingCurve(QEasingCurve::OutQuint); // 设置动画曲线,在Qt文档中有详细的介绍
m_scrollAni->setDuration(500); //设置动画时间,数值越小播放越快 m_scrollAni->setDuration(500); // 设置动画时间,数值越小播放越快
m_targetValue_v=value(); //将m_targetValue_v初始化 m_targetValue_v = value(); // 将m_targetValue_v初始化
} }
void SmoothScrollBar::setValue(int value) void SmoothScrollBar::setValue(int value)
{ {
m_scrollAni->stop();//停止现在的动画,防止出现冲突 m_scrollAni->stop(); // 停止现在的动画,防止出现冲突
m_scrollAni->setStartValue(this->value()); //设置动画滚动的初始值为当前位置 m_scrollAni->setStartValue(this->value()); // 设置动画滚动的初始值为当前位置
m_scrollAni->setEndValue(value); //设置动画的结束位置为目标值 m_scrollAni->setEndValue(value); // 设置动画的结束位置为目标值
m_scrollAni->start(); //开始动画 m_scrollAni->start(); // 开始动画
} }
void SmoothScrollBar::scrollTop() void SmoothScrollBar::scrollTop()
{ {
setValue(-m_targetValue_v); //开始动画 setValue(-m_targetValue_v); // 开始动画
m_targetValue_v=0; m_targetValue_v = 0;
} }
void SmoothScrollBar::scroll(int value) void SmoothScrollBar::scroll(int value)
{ {
//这里推荐评论区中大佬优化的写法 // 这里推荐评论区中大佬优化的写法
if(m_targetValue_v-value>=0) if (m_targetValue_v - value >= 0)
{ {
m_targetValue_v-=value; //将目标值和相对位置进行运算 m_targetValue_v -= value; // 将目标值和相对位置进行运算
setValue(m_targetValue_v); //开始动画 setValue(m_targetValue_v); // 开始动画
} }
} }
void SmoothScrollBar::mousePressEvent(QMouseEvent *e) void SmoothScrollBar::mousePressEvent(QMouseEvent *e)
{ {
//当使用鼠标操作滚动条时,不会刷新m_targetValue_v的值,因而需要重写事件,对其进行刷新。 // 当使用鼠标操作滚动条时,不会刷新m_targetValue_v的值,因而需要重写事件,对其进行刷新。
m_scrollAni->stop(); m_scrollAni->stop();
QScrollBar::mousePressEvent(e); QScrollBar::mousePressEvent(e);
m_targetValue_v=value(); m_targetValue_v = value();
} }
void SmoothScrollBar::mouseReleaseEvent(QMouseEvent *e) void SmoothScrollBar::mouseReleaseEvent(QMouseEvent *e)
{ {
m_scrollAni->stop(); m_scrollAni->stop();
QScrollBar::mouseReleaseEvent(e); QScrollBar::mouseReleaseEvent(e);
m_targetValue_v=value(); m_targetValue_v = value();
} }
void SmoothScrollBar::mouseMoveEvent(QMouseEvent *e) void SmoothScrollBar::mouseMoveEvent(QMouseEvent *e)
{ {
m_scrollAni->stop(); m_scrollAni->stop();
QScrollBar::mouseMoveEvent(e); QScrollBar::mouseMoveEvent(e);
m_targetValue_v=value(); m_targetValue_v = value();
} }
+20 -2
View File
@@ -1,10 +1,26 @@
#include "webenginepage.h" #include "webenginepage.h"
#include <QDesktopServices> #include <QDesktopServices>
#include <QWebEngineSettings>
#include <QWebEngineProfile>
WebEnginePage::WebEnginePage(QObject *parent) WebEnginePage::WebEnginePage(QObject *parent)
: QWebEnginePage(parent) : QWebEnginePage(parent)
{ {
QLocale ql;
switch (ql.language())
{
case QLocale::Chinese:
{
// 系统语言是中文,获取网页为中文 @momen @uniartisan
QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
qDebug() << profile->httpAcceptLanguage();
profile->setHttpAcceptLanguage("zh-CN,zh;q=0.8,en;q=0.6");
}
break;
default:
break;
}
} }
WebEnginePage::~WebEnginePage() WebEnginePage::~WebEnginePage()
@@ -13,7 +29,8 @@ WebEnginePage::~WebEnginePage()
void WebEnginePage::setUrl(const QUrl &url) void WebEnginePage::setUrl(const QUrl &url)
{ {
if (m_currentUrl == url) { if (m_currentUrl == url)
{
return; return;
} }
@@ -32,7 +49,8 @@ QWebEnginePage *WebEnginePage::createWindow(QWebEnginePage::WebWindowType type)
void WebEnginePage::slotUrlChanged(const QUrl &url) void WebEnginePage::slotUrlChanged(const QUrl &url)
{ {
if (m_currentUrl == url) { if (m_currentUrl == url)
{
sender()->deleteLater(); sender()->deleteLater();
return; return;
} }
+37 -31
View File
@@ -3,22 +3,22 @@
#include <QGraphicsOpacityEffect> #include <QGraphicsOpacityEffect>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QDebug> #include <QDebug>
DownloadListWidget::DownloadListWidget(QWidget *parent) : DownloadListWidget::DownloadListWidget(QWidget *parent) : DBlurEffectWidget(parent),
DBlurEffectWidget(parent),
ui(new Ui::DownloadListWidget) ui(new Ui::DownloadListWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowTitle("Download list");
installEventFilter(this); installEventFilter(this);
this->setAttribute(Qt::WA_Hover,true); this->setAttribute(Qt::WA_Hover, true);
setFocus(); setFocus();
setFixedSize(500,400); setFixedSize(500, 400);
setMaskAlpha(250); setMaskAlpha(250);
ui->listWidget->hide(); ui->listWidget->hide();
ui->widget->show(); ui->widget->show();
// 计算显示下载速度 // 计算显示下载速度
download_speed.setInterval(1000); download_speed.setInterval(1000);
download_speed.start(); download_speed.start();
connect(&download_speed,&QTimer::timeout,[=]() connect(&download_speed, &QTimer::timeout, [=]()
{ {
if(isdownload && theSpeed == "") if(isdownload && theSpeed == "")
{ {
@@ -47,21 +47,25 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) :
downloaditemlist[nowDownload - 1]->setSpeed(theSpeed); downloaditemlist[nowDownload - 1]->setSpeed(theSpeed);
}else{ }else{
emit downloadProgress(0); emit downloadProgress(0);
} } });
});
} }
DownloadListWidget::~DownloadListWidget() DownloadListWidget::~DownloadListWidget()
{ {
if (downloadController)
{
downloadController->stopDownload(); downloadController->stopDownload();
delete downloadController; downloadController->deleteLater();
}
delete ui; delete ui;
} }
void DownloadListWidget::clearItem() void DownloadListWidget::clearItem()
{ {
ui->listWidget->vScrollBar->scrollTop(); ui->listWidget->vScrollBar->scrollTop();
int n=ui->listWidget->count(); int n = ui->listWidget->count();
for(int i=0;i<n;i++) for (int i = 0; i < n; i++)
{ {
QListWidgetItem *item = ui->listWidget->takeItem(0); QListWidgetItem *item = ui->listWidget->takeItem(0);
QWidget *card = ui->listWidget->itemWidget(item); QWidget *card = ui->listWidget->itemWidget(item);
@@ -72,26 +76,26 @@ void DownloadListWidget::clearItem()
} }
ui->listWidget->clear(); ui->listWidget->clear();
} }
void DownloadListWidget::addItem(QString name,QString fileName,QString pkgName,const QPixmap icon,QString downloadurl) void DownloadListWidget::addItem(QString name, QString fileName, QString pkgName, const QPixmap icon, QString downloadurl)
{ {
if(fileName.isEmpty()) if (fileName.isEmpty())
{ {
return; return;
} }
urList.append(downloadurl); urList.append(downloadurl);
allDownload += 1; allDownload += 1;
DownloadItem *di=new DownloadItem(this); DownloadItem *di = new DownloadItem(this);
dlist<<downloadurl; dlist << downloadurl;
downloaditemlist<<di; downloaditemlist << di;
di->setName(name); di->setName(name);
di->setFileName(fileName); di->setFileName(fileName);
di->pkgName=pkgName; di->pkgName = pkgName;
di->seticon(icon); di->seticon(icon);
QListWidgetItem* pItem = new QListWidgetItem(); QListWidgetItem *pItem = new QListWidgetItem();
pItem->setSizeHint(QSize(240, 50)); pItem->setSizeHint(QSize(240, 50));
ui->listWidget->addItem(pItem); ui->listWidget->addItem(pItem);
ui->listWidget->setItemWidget(pItem, di); ui->listWidget->setItemWidget(pItem, di);
if(!isBusy) if (!isBusy)
{ {
nowDownload += 1; nowDownload += 1;
startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求 startRequest(urList.at(nowDownload - 1), fileName); // 进行链接请求
@@ -119,7 +123,7 @@ void DownloadListWidget::startRequest(QUrl url, QString fileName)
downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化 downloadController = new DownloadController(this); // 并发下载,在点击下载按钮的时候才会初始化
connect(downloadController, &DownloadController::downloadProcess, this, &DownloadListWidget::updateDataReadProgress); connect(downloadController, &DownloadController::downloadProcess, this, &DownloadListWidget::updateDataReadProgress);
connect(downloadController, &DownloadController::downloadFinished, this, &DownloadListWidget::httpFinished); connect(downloadController, &DownloadController::downloadFinished, this, &DownloadListWidget::httpFinished);
//connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);}); // connect(downloadController, &DownloadController::errorOccur, this, [=](QString msg){this->sendNotification(msg);});
downloadController->setFilename(fileName); downloadController->setFilename(fileName);
downloadController->startDownload(url.toString()); downloadController->startDownload(url.toString());
} }
@@ -131,28 +135,28 @@ void DownloadListWidget::httpFinished() // 完成下载
downloaditemlist[nowDownload - 1]->readyInstall(); downloaditemlist[nowDownload - 1]->readyInstall();
downloaditemlist[nowDownload - 1]->free = true; downloaditemlist[nowDownload - 1]->free = true;
emit downloadFinished(); emit downloadFinished();
if(nowDownload < allDownload) if (nowDownload < allDownload)
{ {
// 如果有排队则下载下一个 // 如果有排队则下载下一个
qDebug() << "切换下一个下载..."; qDebug() << "切换下一个下载...";
nowDownload += 1; nowDownload += 1;
while(downloaditemlist[nowDownload - 1]->close) while (downloaditemlist[nowDownload - 1]->close)
{ {
nowDownload += 1; nowDownload += 1;
if(nowDownload >= allDownload) if (nowDownload >= allDownload)
{ {
nowDownload = allDownload; nowDownload = allDownload;
return; return;
} }
} }
QString fileName = downloaditemlist[nowDownload - 1]->getName(); QString fileName = downloaditemlist[nowDownload - 1]->getName();
startRequest(urList.at(nowDownload-1), fileName); startRequest(urList.at(nowDownload - 1), fileName);
} }
} }
void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesRead, qint64 totalBytes) void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesRead, qint64 totalBytes)
{ {
if(totalBytes <= 0) if (totalBytes <= 0)
{ {
return; return;
} }
@@ -161,7 +165,7 @@ void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesR
downloaditemlist[nowDownload - 1]->setValue(int(bytesRead * 100 / totalBytes) * 100); // 当前值 downloaditemlist[nowDownload - 1]->setValue(int(bytesRead * 100 / totalBytes) * 100); // 当前值
emit downloadProgress(int(bytesRead * 100 / totalBytes)); emit downloadProgress(int(bytesRead * 100 / totalBytes));
download_size = bytesRead; download_size = bytesRead;
if(downloaditemlist[nowDownload - 1]->close) if (downloaditemlist[nowDownload - 1]->close)
{ {
// 随时检测下载是否被取消 // 随时检测下载是否被取消
downloadController->disconnect(); downloadController->disconnect();
@@ -171,21 +175,23 @@ void DownloadListWidget::updateDataReadProgress(QString speedInfo, qint64 bytesR
} }
} }
void DownloadListWidget::m_move(int x, int y)
void DownloadListWidget::m_move(int x,int y)
{ {
m_rect.setX(x); m_rect.setX(x);
m_rect.setY(y); m_rect.setY(y);
move(x,y); move(x, y);
return; return;
} }
bool DownloadListWidget::eventFilter(QObject *watched, QEvent *event) bool DownloadListWidget::eventFilter(QObject *watched, QEvent *event)
{ {
if (Q_NULLPTR == watched) { if (Q_NULLPTR == watched)
{
return false; return false;
} }
if (QEvent::ActivationChange == event->type()) { if (QEvent::ActivationChange == event->type())
if(QApplication::activeWindow() != this){ {
if (QApplication::activeWindow() != this)
{
this->close(); this->close();
} }
} }
+4
View File
@@ -73,6 +73,10 @@ else
zenity --info --icon-name=spark-store --height 270 --width 500 --text "软件包校验失败!这不应该发生!\n可能是因为软件包已损坏,星火仓库未同步,或者最坏的情况:恶意软件尝试利用自动安装来入侵系统!\n如果你不清楚发生了什么,请在接下来的认证窗口中选择取消认证\n执行 sudo aptss ssupdate 后再尝试安装。\n如果问题仍然存在,请在应用信息界面点击 应用反馈 来提交反馈给我们!\n\n如果你是审核人员,这是正常现象,在审核通过前星火仓库不会保存相关信息。请在接下来的弹窗中进行认证即可" zenity --info --icon-name=spark-store --height 270 --width 500 --text "软件包校验失败!这不应该发生!\n可能是因为软件包已损坏,星火仓库未同步,或者最坏的情况:恶意软件尝试利用自动安装来入侵系统!\n如果你不清楚发生了什么,请在接下来的认证窗口中选择取消认证\n执行 sudo aptss ssupdate 后再尝试安装。\n如果问题仍然存在,请在应用信息界面点击 应用反馈 来提交反馈给我们!\n\n如果你是审核人员,这是正常现象,在审核通过前星火仓库不会保存相关信息。请在接下来的弹窗中进行认证即可"
echo "软件包校验失败!这不应该发生!"
echo "执行 sudo aptss ssupdate 后再尝试安装。"
echo "如果问题仍然存在,请在应用信息界面点击 应用反馈 来提交反馈给我们!"
echo "如果你是审核人员,这是正常现象,在审核通过前星火仓库不会保存相关信息。请在接下来的弹窗中进行认证即可"
pkexec_as_current_user bash -c "dpkg -i "$DEBPATH" || aptss install -yf " pkexec_as_current_user bash -c "dpkg -i "$DEBPATH" || aptss install -yf "
+18 -5
View File
@@ -1,19 +1,32 @@
#!/bin/bash #!/bin/bash
if [ "$(id -u)" != "0" ];then if [ "$(id -u)" != "0" ] ; then
pkexec "$0" "$@" pkexec "$0" "$@"
exit exit
fi fi
case $1 in case $1 in
ssupdate) ssupdate)
aptss ssupdate 2>&1 | tee /tmp/spark-store-app-ssupdate-log.txt aptss ssupdate 2>&1 | tee /tmp/spark-store-app-ssupdate-log.txt
IS_SSUPDATE_ERROR=`cat /tmp/spark-store-app-ssupdate-log.txt | grep "E: "` IS_SSUPDATE_ERROR=`cat /tmp/spark-store-app-ssupdate-log.txt | grep "E: "`
echo "$IS_SSUPDATE_ERROR" > /tmp/spark-store-app-ssupdate-status.txt echo "$IS_SSUPDATE_ERROR" > /tmp/spark-store-app-ssupdate-status.txt
;; ;;
upgradable-list) upgradable-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 output=$(env LANGUAGE=en_US 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="/dev/null" -o APT::Get::List-Cleanup="0" | awk NR\>1)
IFS_OLD="$IFS"
IFS=$'\n'
for line in $output ; do
PKG_NAME=$(echo $line | awk -F '/' '{print $1}')
PKG_NEW_VER=$(echo $line | awk -F ' ' '{print $2}')
PKG_CUR_VER=$(echo $line | awk -F ' ' '{print $6}' | awk -F ']' '{print $1}')
echo "${PKG_NAME} ${PKG_NEW_VER} ${PKG_CUR_VER}"
done
IFS="$IFS_OLD"
;; ;;
upgrade-app) upgrade-app)
aptss install "${@:2}" --only-upgrade 2>&1 | tee /tmp/spark-store-app-upgrade-log.txt aptss install "${@:2}" --only-upgrade 2>&1 | tee /tmp/spark-store-app-upgrade-log.txt
IS_UPGRADE_ERROR=`cat /tmp/spark-store-app-upgrade-log.txt | grep "Package manager quit with exit code."` IS_UPGRADE_ERROR=`cat /tmp/spark-store-app-upgrade-log.txt | grep "Package manager quit with exit code."`
+61 -37
View File
@@ -1,58 +1,82 @@
#!/bin/bash #!/bin/bash
touch /tmp/spark-store/upgradeStatus.txt touch /tmp/spark-store/upgradeStatus.txt
# 执行 apt update
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh ssupdate | zenity --progress --auto-close --pulsate --no-cancel --text="正在检查更新,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh ssupdate | zenity --progress --auto-close --pulsate --no-cancel --text="正在检查更新,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
if [ -z `cat /tmp/spark-store-app-ssupdate-status.txt` != "0" ];then if [ -z `cat /tmp/spark-store-app-ssupdate-status.txt` ] ; then
echo "无错误" echo "无错误"
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log
else else
zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
zenity --text-info --filename=/tmp/spark-store-app-ssupdate-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --text-info --filename=/tmp/spark-store-app-ssupdate-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log
exit rm -f /tmp/spark-store/upgradeStatus.txt
exit
fi fi
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log
# 获取可更新应用列表
PKG_LIST="$(pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)" PKG_LIST="$(pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)"
####如果没更新,就弹出不需要更新 ## 如果没更新,就弹出不需要更新
if [ -z "$PKG_LIST" ];then if [ -z "$PKG_LIST" ] ; then
zenity --info --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --info --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
else else
PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST; ## 获取用户选择的要更新的应用
do ### 指定分隔符为 \n
#### 检测是否是hold状态 IFS_OLD="$IFS"
if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" = "" ];then IFS=$'\n'
PKG_UPGRADE_LIST=`for line in $PKG_LIST ; do
PKG_NAME=$(echo $line | awk -F ' ' '{print $1}')
PKG_NEW_VER=$(echo $line | awk -F ' ' '{print $2}')
PKG_CUR_VER=$(echo $line | awk -F ' ' '{print $3}')
dpkg --compare-versions $PKG_NEW_VER le $PKG_CUR_VER
if [ $? -eq 0 ] ; then
continue
fi
#### 检测是否是 hold 状态
PKG_STA=$(dpkg-query -W -f='${db:Status-Want}' $PKG_NAME)
if [ "$PKG_STA" != "hold" ] ; then
echo "true" echo "true"
echo "$PKG_NAME" echo "$PKG_NAME"
echo "$PKG_NAME" echo "$PKG_NEW_VER"
echo "$PKG_CUR_VER"
else else
echo "false" echo "false"
echo "$PKG_NAME(无法更新:已被标记为保留)" echo "$PKG_NAME(无法更新:已被标记为保留)"
echo "$PKG_NAME" echo "$PKG_NEW_VER"
echo "$PKG_CUR_VER"
fi fi
done | zenity --list --text="选择你想更新的应用" --column=是否更新 --column=应用包名 --column="真的应用包名" --separator=" " --checklist --print-column=3 --multiple --height 350 --width 550 --hide-column=3 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg` done`
#### 如果没有选择,则直接退出 ### 还原分隔符
IFS="$IFS_OLD"
if [ "$PKG_UPGRADE_LIST" = "" ];then ## 如果没有应用需要更新,则直接退出
zenity --info --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg if [ -z "$PKG_UPGRADE_LIST" ] ; then
else zenity --info --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
else
PKG_UPGRADE_LIST=$(echo "$PKG_UPGRADE_LIST" | zenity --list --text="选择你想更新的应用" --column="是否更新" --column="包名" --column="新版本" --column="从该版本更新" --separator=" " --checklist --multiple --print-column=2 --height 350 --width 550 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg)
## 如果没有选择,则直接退出
if [ -z "$PKG_UPGRADE_LIST" ] ; then
zenity --info --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
else
### 更新用户选择的应用
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgrade-app $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text="正在更新已选中的应用,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgrade-app $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新已选中的应用,请稍候... --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg #### 更新成功
if [ -z "`cat /tmp/spark-store-app-upgrade-status.txt`" ] ; then
if [ -z "`cat /tmp/spark-store-app-upgrade-status.txt`" ];then zenity --info --text "选中的软件已经更新完毕" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
else
zenity --info --text "选中的软件已经更新完毕" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg #### 更新异常
else zenity --error --text "更新出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
zenity --error --text "更新出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --text-info --filename=/tmp/spark-store-app-upgrade-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里往下拉" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg
zenity --text-info --filename=/tmp/spark-store-app-upgrade-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里往下拉" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg fi
fi
fi
fi fi
rm -f /tmp/spark-store/upgradeStatus.txt
# 从最开头
fi
fi
rm -f touch /tmp/spark-store/upgradeStatus.txt
####从最开头
+44 -47
View File
@@ -1,96 +1,93 @@
#!/bin/bash #!/bin/bash
set -e LANGUAGE=en_US
LANG=en.US
# 发送通知
function notify-send() { function notify-send() {
#Detect the name of the display in use # Detect name of the display in use
local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)"
#Detect the user using such display # Detect user using the display
local user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1) local user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1)
#Detect the id of the user # Detect uid of the user
local uid=$(id -u $user) local uid=$(id -u $user)
sudo -u $user DISPLAY=$display DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send "$@" sudo -u $user DISPLAY=$display DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${uid}/bus notify-send "$@"
} }
#检测网络链接畅通 # 检测网络链接畅通
function network() function network()
{ {
#超时时间 # 超时时间
local timeout=15 local timeout=15
#目标网站 # 目标网站
local target=www.baidu.com local target=www.baidu.com
#获取响应状态码 # 获取响应状态码
local ret_code=`curl -I -s --connect-timeout ${timeout} ${target} -w %{http_code} | tail -n1` local ret_code=`curl -I -s --connect-timeout ${timeout} ${target} -w %{http_code} | tail -n1`
if [ "x$ret_code" = "x200" ]; then if [ "x$ret_code" = "x200" ] ; then
#网络畅通 # 网络畅通
return 0 return 0
else else
#网络不畅通 # 网络不畅通
return 1 return 1
fi fi
return 0
} }
network network
if [ $? -eq 1 ];then if [ $? -ne 0 ] ; then
echo "Network fail. Stop to avoid bother dpkg" echo "Network fail. Stop to avoid bother dpkg"
exit -1 exit -1
fi fi
#The code above is modified from https://blog.csdn.net/yaxuan88521/article/details/120516298 # The code above is modified from https://blog.csdn.net/yaxuan88521/article/details/120516298
curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
# 每日更新星火源文件 # 每日更新星火源文件
mkdir -p /etc/apt/preferences.d curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list"
touch /etc/apt/preferences.d/sparkstore
cat << EOF >/etc/apt/preferences.d/sparkstore
Package: *
Pin: origin *.deepinos.org.cn
Pin-Priority: 100
EOF
updatetext=`aptss ssupdate` updatetext=`aptss ssupdate`
rm /etc/apt/preferences.d/sparkstore
isupdate=`echo ${updatetext: -5}` isupdate=`echo ${updatetext: -5}`
if [ "$isupdate" = "date." ];then if [ "$isupdate" = "date." ] ; then
exit 0 exit 0
fi fi
#### 从这里开始,只有检测到了更新才会进行
## 从这里开始,只有检测到了更新才会进行
update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串` update_app_number=`echo ${updatetext%package*} #从右向左截取第一个 src 后的字符串`
update_app_number=`echo ${update_app_number##*information...}` update_app_number=`echo ${update_app_number##*information...}`
# 获取用户选择的要更新的应用
PKG_LIST="$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)"
# 指定分隔符为 \n
IFS_OLD="$IFS"
IFS=$'\n'
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 line in $PKG_LIST ; do
PKG_NAME=$(echo $line | awk -F ' ' '{print $1}')
PKG_NEW_VER=$(echo $line | awk -F ' ' '{print $2}')
PKG_CUR_VER=$(echo $line | awk -F ' ' '{print $3}')
dpkg --compare-versions $PKG_NEW_VER le $PKG_CUR_VER
if [ $? -eq 0 ] ; then
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 let update_app_number=$update_app_number-1
echo $update_app_number continue
echo $PKG_NAME fi
fi
## 检测是否是 hold 状态
PKG_STA=$(dpkg-query -W -f='${db:Status-Want}' $PKG_NAME)
if [ "$PKG_STA" = "hold" ] ; then
let update_app_number=$update_app_number-1
fi
done done
# 还原分隔符
IFS="$IFS_OLD"
if [ $update_app_number -le 0 ] ; then
if [ $update_app_number -lt 1 ];then exit 0
exit
fi fi
#### 如果都是hold的那就直接退出,否则把剩余的给提醒了
notify-send -i spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理"
## 如果都是hold或者版本一致的那就直接退出,否则把剩余的给提醒了
notify-send -a spark-store "星火更新提醒" "星火商店仓库中有$update_app_number个软件包可以更新啦!请到星火商店的菜单处理"
+81 -79
View File
@@ -9,210 +9,212 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="234"/> <location filename="../src/pages/appintopage.ui" line="244"/>
<location filename="../src/pages/appintopage.cpp" line="146"/> <location filename="../src/pages/appintopage.cpp" line="147"/>
<location filename="../src/pages/appintopage.cpp" line="201"/> <location filename="../src/pages/appintopage.cpp" line="209"/>
<source>Download</source> <source>Download</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="280"/> <location filename="../src/pages/appintopage.ui" line="290"/>
<source>Uninstall</source> <source>Uninstall</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="336"/> <location filename="../src/pages/appintopage.ui" line="346"/>
<source>0</source> <source>0</source>
<translation type="unfinished">0B {0?}</translation> <translation type="unfinished">0B {0?}</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="346"/> <location filename="../src/pages/appintopage.ui" line="356"/>
<source>Download Times</source> <source>Download Times</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="400"/> <location filename="../src/pages/appintopage.ui" line="410"/>
<location filename="../src/pages/appintopage.ui" line="403"/> <location filename="../src/pages/appintopage.ui" line="413"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="406"/> <location filename="../src/pages/appintopage.ui" line="416"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="419"/> <location filename="../src/pages/appintopage.ui" line="429"/>
<location filename="../src/pages/appintopage.ui" line="422"/> <location filename="../src/pages/appintopage.ui" line="432"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="425"/> <location filename="../src/pages/appintopage.ui" line="435"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="438"/> <location filename="../src/pages/appintopage.ui" line="448"/>
<location filename="../src/pages/appintopage.ui" line="441"/> <location filename="../src/pages/appintopage.ui" line="451"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="444"/> <location filename="../src/pages/appintopage.ui" line="454"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="457"/> <location filename="../src/pages/appintopage.ui" line="467"/>
<location filename="../src/pages/appintopage.ui" line="460"/> <location filename="../src/pages/appintopage.ui" line="470"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="463"/> <location filename="../src/pages/appintopage.ui" line="473"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="476"/> <location filename="../src/pages/appintopage.ui" line="486"/>
<location filename="../src/pages/appintopage.ui" line="479"/> <location filename="../src/pages/appintopage.ui" line="489"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="482"/> <location filename="../src/pages/appintopage.ui" line="492"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="495"/> <location filename="../src/pages/appintopage.ui" line="505"/>
<location filename="../src/pages/appintopage.ui" line="498"/> <location filename="../src/pages/appintopage.ui" line="508"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="501"/> <location filename="../src/pages/appintopage.ui" line="511"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="514"/> <location filename="../src/pages/appintopage.ui" line="524"/>
<location filename="../src/pages/appintopage.ui" line="517"/> <location filename="../src/pages/appintopage.ui" line="527"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="520"/> <location filename="../src/pages/appintopage.ui" line="530"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="533"/> <location filename="../src/pages/appintopage.ui" line="543"/>
<location filename="../src/pages/appintopage.ui" line="536"/> <location filename="../src/pages/appintopage.ui" line="546"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.Spark Store will automatically configure the wine kit for you&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.Spark Store will automatically configure the wine kit for you&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="539"/> <location filename="../src/pages/appintopage.ui" line="549"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="592"/> <location filename="../src/pages/appintopage.ui" line="602"/>
<source>Share</source> <source>Share</source>
<translation type="unfinished">Spk share link</translation> <translation type="unfinished">Spk share link</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="599"/> <location filename="../src/pages/appintopage.ui" line="609"/>
<source>APP Feedback</source> <source>APP Feedback</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="755"/> <location filename="../src/pages/appintopage.ui" line="765"/>
<location filename="../src/pages/appintopage.ui" line="1055"/> <source>Introduction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.ui" line="1068"/>
<source>Description</source> <source>Description</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="890"/> <location filename="../src/pages/appintopage.ui" line="903"/>
<source>Screen capture</source> <source>Screen capture</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1142"/> <location filename="../src/pages/appintopage.ui" line="1161"/>
<source>Update</source> <source>Update</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1171"/> <location filename="../src/pages/appintopage.ui" line="1190"/>
<source>Contributor</source> <source>Contributor</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1178"/> <location filename="../src/pages/appintopage.ui" line="1197"/>
<source>Pkgname</source> <source>Pkgname</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1281"/> <location filename="../src/pages/appintopage.ui" line="1303"/>
<source>Author</source> <source>Author</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1314"/> <location filename="../src/pages/appintopage.ui" line="1339"/>
<source>Size</source> <source>Size</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1347"/> <location filename="../src/pages/appintopage.ui" line="1375"/>
<source>Website</source> <source>Website</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="88"/> <location filename="../src/pages/appintopage.cpp" line="89"/>
<source>Click Open</source> <source>Click Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="131"/> <location filename="../src/pages/appintopage.cpp" line="132"/>
<location filename="../src/pages/appintopage.cpp" line="297"/> <location filename="../src/pages/appintopage.cpp" line="224"/>
<location filename="../src/pages/appintopage.cpp" line="316"/>
<source>Reinstall</source> <source>Reinstall</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="138"/> <location filename="../src/pages/appintopage.cpp" line="139"/>
<source>Upgrade</source> <source>Upgrade</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="206"/> <location filename="../src/pages/appintopage.cpp" line="214"/>
<source>Downloading</source> <location filename="../src/pages/appintopage.cpp" line="308"/>
<translation type="unfinished"></translation> <location filename="../src/pages/appintopage.cpp" line="341"/>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="211"/>
<source>Downloaded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="321"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="325"/> <location filename="../src/pages/appintopage.cpp" line="219"/>
<location filename="../src/pages/appintopage.cpp" line="336"/> <source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="345"/>
<location filename="../src/pages/appintopage.cpp" line="356"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="325"/> <location filename="../src/pages/appintopage.cpp" line="345"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="336"/> <location filename="../src/pages/appintopage.cpp" line="356"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -253,79 +255,79 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="192"/> <location filename="../src/widgets/common/downloaditem.ui" line="198"/>
<source>Waiting to download</source> <source>Waiting to download</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="243"/> <location filename="../src/widgets/common/downloaditem.ui" line="249"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="262"/> <location filename="../src/widgets/common/downloaditem.ui" line="268"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="281"/> <location filename="../src/widgets/common/downloaditem.ui" line="287"/>
<source>Info</source> <source>Info</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="39"/> <location filename="../src/widgets/common/downloaditem.cpp" line="40"/>
<source>Download Complete.</source> <source>Download Complete.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="141"/> <location filename="../src/widgets/common/downloaditem.cpp" line="142"/>
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/> <location filename="../src/widgets/common/downloaditem.cpp" line="152"/>
<location filename="../src/widgets/common/downloaditem.cpp" line="156"/> <location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="98"/> <location filename="../src/widgets/common/downloaditem.cpp" line="99"/>
<source>Installing</source> <source>Installing</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="141"/> <location filename="../src/widgets/common/downloaditem.cpp" line="142"/>
<source>Installation complete.</source> <source>Installation complete.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="142"/> <location filename="../src/widgets/common/downloaditem.cpp" line="143"/>
<source>Finish</source> <source>Finish</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/> <location filename="../src/widgets/common/downloaditem.cpp" line="150"/>
<source>Retry</source> <source>Retry</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/> <location filename="../src/widgets/common/downloaditem.cpp" line="152"/>
<source>Error happened in dpkg progress , you can try it again.</source> <source>Error happened in dpkg progress , you can try it again.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="150"/> <location filename="../src/widgets/common/downloaditem.cpp" line="153"/>
<source>Error happened in dpkg progress , you can try it again</source> <source>Error happened in dpkg progress , you can try it again</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="156"/> <location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
<source>dpkg progress had been abortedyou can retry installation.</source> <source>dpkg progress had been abortedyou can retry installation.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="157"/> <location filename="../src/widgets/common/downloaditem.cpp" line="160"/>
<source>dpkg progress had been abortedyou can retry installation</source> <source>dpkg progress had been abortedyou can retry installation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="178"/> <location filename="../src/widgets/common/downloaditem.cpp" line="181"/>
<source>Download canceled</source> <source>Download canceled</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -446,12 +448,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="180"/> <location filename="../src/mainwindow-dtk.cpp" line="158"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="181"/> <location filename="../src/mainwindow-dtk.cpp" line="159"/>
<source>Search or enter spk://</source> <source>Search or enter spk://</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
+81 -79
View File
@@ -9,210 +9,212 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="234"/> <location filename="../src/pages/appintopage.ui" line="244"/>
<location filename="../src/pages/appintopage.cpp" line="146"/> <location filename="../src/pages/appintopage.cpp" line="147"/>
<location filename="../src/pages/appintopage.cpp" line="201"/> <location filename="../src/pages/appintopage.cpp" line="209"/>
<source>Download</source> <source>Download</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="280"/> <location filename="../src/pages/appintopage.ui" line="290"/>
<source>Uninstall</source> <source>Uninstall</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="336"/> <location filename="../src/pages/appintopage.ui" line="346"/>
<source>0</source> <source>0</source>
<translation type="unfinished">0B {0?}</translation> <translation type="unfinished">0B {0?}</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="346"/> <location filename="../src/pages/appintopage.ui" line="356"/>
<source>Download Times</source> <source>Download Times</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="400"/> <location filename="../src/pages/appintopage.ui" line="410"/>
<location filename="../src/pages/appintopage.ui" line="403"/> <location filename="../src/pages/appintopage.ui" line="413"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="406"/> <location filename="../src/pages/appintopage.ui" line="416"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="419"/> <location filename="../src/pages/appintopage.ui" line="429"/>
<location filename="../src/pages/appintopage.ui" line="422"/> <location filename="../src/pages/appintopage.ui" line="432"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="425"/> <location filename="../src/pages/appintopage.ui" line="435"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="438"/> <location filename="../src/pages/appintopage.ui" line="448"/>
<location filename="../src/pages/appintopage.ui" line="441"/> <location filename="../src/pages/appintopage.ui" line="451"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="444"/> <location filename="../src/pages/appintopage.ui" line="454"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="457"/> <location filename="../src/pages/appintopage.ui" line="467"/>
<location filename="../src/pages/appintopage.ui" line="460"/> <location filename="../src/pages/appintopage.ui" line="470"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="463"/> <location filename="../src/pages/appintopage.ui" line="473"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="476"/> <location filename="../src/pages/appintopage.ui" line="486"/>
<location filename="../src/pages/appintopage.ui" line="479"/> <location filename="../src/pages/appintopage.ui" line="489"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="482"/> <location filename="../src/pages/appintopage.ui" line="492"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="495"/> <location filename="../src/pages/appintopage.ui" line="505"/>
<location filename="../src/pages/appintopage.ui" line="498"/> <location filename="../src/pages/appintopage.ui" line="508"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="501"/> <location filename="../src/pages/appintopage.ui" line="511"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="514"/> <location filename="../src/pages/appintopage.ui" line="524"/>
<location filename="../src/pages/appintopage.ui" line="517"/> <location filename="../src/pages/appintopage.ui" line="527"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="520"/> <location filename="../src/pages/appintopage.ui" line="530"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="533"/> <location filename="../src/pages/appintopage.ui" line="543"/>
<location filename="../src/pages/appintopage.ui" line="536"/> <location filename="../src/pages/appintopage.ui" line="546"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.Spark Store will automatically configure the wine kit for you&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.Spark Store will automatically configure the wine kit for you&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="539"/> <location filename="../src/pages/appintopage.ui" line="549"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="592"/> <location filename="../src/pages/appintopage.ui" line="602"/>
<source>Share</source> <source>Share</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="599"/> <location filename="../src/pages/appintopage.ui" line="609"/>
<source>APP Feedback</source> <source>APP Feedback</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="755"/> <location filename="../src/pages/appintopage.ui" line="765"/>
<location filename="../src/pages/appintopage.ui" line="1055"/> <source>Introduction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.ui" line="1068"/>
<source>Description</source> <source>Description</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="890"/> <location filename="../src/pages/appintopage.ui" line="903"/>
<source>Screen capture</source> <source>Screen capture</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1142"/> <location filename="../src/pages/appintopage.ui" line="1161"/>
<source>Update</source> <source>Update</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1171"/> <location filename="../src/pages/appintopage.ui" line="1190"/>
<source>Contributor</source> <source>Contributor</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1178"/> <location filename="../src/pages/appintopage.ui" line="1197"/>
<source>Pkgname</source> <source>Pkgname</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1281"/> <location filename="../src/pages/appintopage.ui" line="1303"/>
<source>Author</source> <source>Author</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1314"/> <location filename="../src/pages/appintopage.ui" line="1339"/>
<source>Size</source> <source>Size</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1347"/> <location filename="../src/pages/appintopage.ui" line="1375"/>
<source>Website</source> <source>Website</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="88"/> <location filename="../src/pages/appintopage.cpp" line="89"/>
<source>Click Open</source> <source>Click Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="131"/> <location filename="../src/pages/appintopage.cpp" line="132"/>
<location filename="../src/pages/appintopage.cpp" line="297"/> <location filename="../src/pages/appintopage.cpp" line="224"/>
<location filename="../src/pages/appintopage.cpp" line="316"/>
<source>Reinstall</source> <source>Reinstall</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="138"/> <location filename="../src/pages/appintopage.cpp" line="139"/>
<source>Upgrade</source> <source>Upgrade</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="206"/> <location filename="../src/pages/appintopage.cpp" line="214"/>
<source>Downloading</source> <location filename="../src/pages/appintopage.cpp" line="308"/>
<translation type="unfinished"></translation> <location filename="../src/pages/appintopage.cpp" line="341"/>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="211"/>
<source>Downloaded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="321"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="325"/> <location filename="../src/pages/appintopage.cpp" line="219"/>
<location filename="../src/pages/appintopage.cpp" line="336"/> <source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="345"/>
<location filename="../src/pages/appintopage.cpp" line="356"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="325"/> <location filename="../src/pages/appintopage.cpp" line="345"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="336"/> <location filename="../src/pages/appintopage.cpp" line="356"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -253,79 +255,79 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="192"/> <location filename="../src/widgets/common/downloaditem.ui" line="198"/>
<source>Waiting to download</source> <source>Waiting to download</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="243"/> <location filename="../src/widgets/common/downloaditem.ui" line="249"/>
<source>Install</source> <source>Install</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="262"/> <location filename="../src/widgets/common/downloaditem.ui" line="268"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="281"/> <location filename="../src/widgets/common/downloaditem.ui" line="287"/>
<source>Info</source> <source>Info</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="39"/> <location filename="../src/widgets/common/downloaditem.cpp" line="40"/>
<source>Download Complete.</source> <source>Download Complete.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="141"/> <location filename="../src/widgets/common/downloaditem.cpp" line="142"/>
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/> <location filename="../src/widgets/common/downloaditem.cpp" line="152"/>
<location filename="../src/widgets/common/downloaditem.cpp" line="156"/> <location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="98"/> <location filename="../src/widgets/common/downloaditem.cpp" line="99"/>
<source>Installing</source> <source>Installing</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="141"/> <location filename="../src/widgets/common/downloaditem.cpp" line="142"/>
<source>Installation complete.</source> <source>Installation complete.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="142"/> <location filename="../src/widgets/common/downloaditem.cpp" line="143"/>
<source>Finish</source> <source>Finish</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/> <location filename="../src/widgets/common/downloaditem.cpp" line="150"/>
<source>Retry</source> <source>Retry</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/> <location filename="../src/widgets/common/downloaditem.cpp" line="152"/>
<source>Error happened in dpkg progress , you can try it again.</source> <source>Error happened in dpkg progress , you can try it again.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="150"/> <location filename="../src/widgets/common/downloaditem.cpp" line="153"/>
<source>Error happened in dpkg progress , you can try it again</source> <source>Error happened in dpkg progress , you can try it again</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="156"/> <location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
<source>dpkg progress had been abortedyou can retry installation.</source> <source>dpkg progress had been abortedyou can retry installation.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="157"/> <location filename="../src/widgets/common/downloaditem.cpp" line="160"/>
<source>dpkg progress had been abortedyou can retry installation</source> <source>dpkg progress had been abortedyou can retry installation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="178"/> <location filename="../src/widgets/common/downloaditem.cpp" line="181"/>
<source>Download canceled</source> <source>Download canceled</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -446,12 +448,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="180"/> <location filename="../src/mainwindow-dtk.cpp" line="158"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="181"/> <location filename="../src/mainwindow-dtk.cpp" line="159"/>
<source>Search or enter spk://</source> <source>Search or enter spk://</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
+85 -75
View File
@@ -9,57 +9,57 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="234"/> <location filename="../src/pages/appintopage.ui" line="244"/>
<location filename="../src/pages/appintopage.cpp" line="146"/> <location filename="../src/pages/appintopage.cpp" line="147"/>
<location filename="../src/pages/appintopage.cpp" line="201"/> <location filename="../src/pages/appintopage.cpp" line="209"/>
<source>Download</source> <source>Download</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="280"/> <location filename="../src/pages/appintopage.ui" line="290"/>
<source>Uninstall</source> <source>Uninstall</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="336"/> <location filename="../src/pages/appintopage.ui" line="346"/>
<source>0</source> <source>0</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="346"/> <location filename="../src/pages/appintopage.ui" line="356"/>
<source>Download Times</source> <source>Download Times</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="400"/> <location filename="../src/pages/appintopage.ui" line="410"/>
<location filename="../src/pages/appintopage.ui" line="403"/> <location filename="../src/pages/appintopage.ui" line="413"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Linux生态的贡献&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Linux生态的贡献&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="406"/> <location filename="../src/pages/appintopage.ui" line="416"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="419"/> <location filename="../src/pages/appintopage.ui" line="429"/>
<location filename="../src/pages/appintopage.ui" line="422"/> <location filename="../src/pages/appintopage.ui" line="432"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="425"/> <location filename="../src/pages/appintopage.ui" line="435"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="438"/> <location filename="../src/pages/appintopage.ui" line="448"/>
<location filename="../src/pages/appintopage.ui" line="441"/> <location filename="../src/pages/appintopage.ui" line="451"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UOS家庭版 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UOS家庭版 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="444"/> <location filename="../src/pages/appintopage.ui" line="454"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -68,46 +68,46 @@
<translation type="obsolete">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt; deepin-wine2 使使ubuntu deepin-wine2 &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation type="obsolete">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt; deepin-wine2 使使ubuntu deepin-wine2 &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="457"/> <location filename="../src/pages/appintopage.ui" line="467"/>
<location filename="../src/pages/appintopage.ui" line="460"/> <location filename="../src/pages/appintopage.ui" line="470"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app. Spark Store will automatically configure the wine kit for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation> deepin-wine2 wine环境</translation> <translation> deepin-wine2 wine环境</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="463"/> <location filename="../src/pages/appintopage.ui" line="473"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="476"/> <location filename="../src/pages/appintopage.ui" line="486"/>
<location filename="../src/pages/appintopage.ui" line="479"/> <location filename="../src/pages/appintopage.ui" line="489"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DTK5应用使&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DTK5应用使&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="482"/> <location filename="../src/pages/appintopage.ui" line="492"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="495"/> <location filename="../src/pages/appintopage.ui" line="505"/>
<location filename="../src/pages/appintopage.ui" line="498"/> <location filename="../src/pages/appintopage.ui" line="508"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="501"/> <location filename="../src/pages/appintopage.ui" line="511"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="514"/> <location filename="../src/pages/appintopage.ui" line="524"/>
<location filename="../src/pages/appintopage.ui" line="517"/> <location filename="../src/pages/appintopage.ui" line="527"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Appimage转制应用.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Appimage转制应用.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="520"/> <location filename="../src/pages/appintopage.ui" line="530"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -116,111 +116,121 @@
<translation type="obsolete">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin-wine5应用使使ubuntudeepin-wine5环境&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation type="obsolete">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin-wine5应用使使ubuntudeepin-wine5环境&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="533"/> <location filename="../src/pages/appintopage.ui" line="543"/>
<location filename="../src/pages/appintopage.ui" line="536"/> <location filename="../src/pages/appintopage.ui" line="546"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.Spark Store will automatically configure the wine kit for you&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.Spark Store will automatically configure the wine kit for you&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation> deepin-wine5 wine环境</translation> <translation> deepin-wine5 wine环境</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="539"/> <location filename="../src/pages/appintopage.ui" line="549"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="592"/> <location filename="../src/pages/appintopage.ui" line="602"/>
<source>Share</source> <source>Share</source>
<translation>Spk分享链接</translation> <translation>Spk分享链接</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="599"/> <location filename="../src/pages/appintopage.ui" line="609"/>
<source>APP Feedback</source> <source>APP Feedback</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="755"/> <location filename="../src/pages/appintopage.ui" line="1068"/>
<location filename="../src/pages/appintopage.ui" line="1055"/>
<source>Description</source> <source>Description</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="890"/> <location filename="../src/pages/appintopage.ui" line="903"/>
<source>Screen capture</source> <source>Screen capture</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1142"/> <location filename="../src/pages/appintopage.ui" line="765"/>
<source>Introduction</source>
<translation></translation>
</message>
<message>
<location filename="../src/pages/appintopage.ui" line="1161"/>
<source>Update</source> <source>Update</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1171"/> <location filename="../src/pages/appintopage.ui" line="1190"/>
<source>Contributor</source> <source>Contributor</source>
<translation>稿</translation> <translation>稿</translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1178"/> <location filename="../src/pages/appintopage.ui" line="1197"/>
<source>Pkgname</source> <source>Pkgname</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1281"/> <location filename="../src/pages/appintopage.ui" line="1303"/>
<source>Author</source> <source>Author</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1314"/> <location filename="../src/pages/appintopage.ui" line="1339"/>
<source>Size</source> <source>Size</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.ui" line="1347"/> <location filename="../src/pages/appintopage.ui" line="1375"/>
<source>Website</source> <source>Website</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="88"/> <location filename="../src/pages/appintopage.cpp" line="89"/>
<source>Click Open</source> <source>Click Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="131"/> <location filename="../src/pages/appintopage.cpp" line="132"/>
<location filename="../src/pages/appintopage.cpp" line="297"/> <location filename="../src/pages/appintopage.cpp" line="224"/>
<location filename="../src/pages/appintopage.cpp" line="316"/>
<source>Reinstall</source> <source>Reinstall</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="138"/> <location filename="../src/pages/appintopage.cpp" line="139"/>
<source>Upgrade</source> <source>Upgrade</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="206"/>
<source>Downloading</source> <source>Downloading</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="211"/>
<source>Downloaded</source> <source>Downloaded</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="321"/> <location filename="../src/pages/appintopage.cpp" line="214"/>
<location filename="../src/pages/appintopage.cpp" line="308"/>
<location filename="../src/pages/appintopage.cpp" line="341"/>
<source>Install</source> <source>Install</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="325"/> <location filename="../src/pages/appintopage.cpp" line="219"/>
<location filename="../src/pages/appintopage.cpp" line="336"/> <source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/pages/appintopage.cpp" line="345"/>
<location filename="../src/pages/appintopage.cpp" line="356"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="325"/> <location filename="../src/pages/appintopage.cpp" line="345"/>
<source>Uninstall succeeded</source> <source>Uninstall succeeded</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/pages/appintopage.cpp" line="336"/> <location filename="../src/pages/appintopage.cpp" line="356"/>
<source>The URL has been copied to the clipboard</source> <source>The URL has been copied to the clipboard</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -261,22 +271,22 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="192"/> <location filename="../src/widgets/common/downloaditem.ui" line="198"/>
<source>Waiting to download</source> <source>Waiting to download</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="243"/> <location filename="../src/widgets/common/downloaditem.ui" line="249"/>
<source>Install</source> <source>Install</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="262"/> <location filename="../src/widgets/common/downloaditem.ui" line="268"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.ui" line="281"/> <location filename="../src/widgets/common/downloaditem.ui" line="287"/>
<source>Info</source> <source>Info</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -305,59 +315,59 @@
<translation type="vanished"> APP </translation> <translation type="vanished"> APP </translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="39"/> <location filename="../src/widgets/common/downloaditem.cpp" line="40"/>
<source>Download Complete.</source> <source>Download Complete.</source>
<translation>.</translation> <translation>.</translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="141"/> <location filename="../src/widgets/common/downloaditem.cpp" line="142"/>
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/> <location filename="../src/widgets/common/downloaditem.cpp" line="152"/>
<location filename="../src/widgets/common/downloaditem.cpp" line="156"/> <location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="98"/> <location filename="../src/widgets/common/downloaditem.cpp" line="99"/>
<source>Installing</source> <source>Installing</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="141"/> <location filename="../src/widgets/common/downloaditem.cpp" line="142"/>
<source>Installation complete.</source> <source>Installation complete.</source>
<translation>.</translation> <translation>.</translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="142"/> <location filename="../src/widgets/common/downloaditem.cpp" line="143"/>
<source>Finish</source> <source>Finish</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="148"/> <location filename="../src/widgets/common/downloaditem.cpp" line="150"/>
<source>Retry</source> <source>Retry</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="149"/> <location filename="../src/widgets/common/downloaditem.cpp" line="152"/>
<source>Error happened in dpkg progress , you can try it again.</source> <source>Error happened in dpkg progress , you can try it again.</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="150"/> <location filename="../src/widgets/common/downloaditem.cpp" line="153"/>
<source>Error happened in dpkg progress , you can try it again</source> <source>Error happened in dpkg progress , you can try it again</source>
<translation>dpkg出现错误</translation> <translation>dpkg出现错误</translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="156"/> <location filename="../src/widgets/common/downloaditem.cpp" line="159"/>
<source>dpkg progress had been abortedyou can retry installation.</source> <source>dpkg progress had been abortedyou can retry installation.</source>
<translation type="unfinished"></translation> <translation>dpkg进程被中断</translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="157"/> <location filename="../src/widgets/common/downloaditem.cpp" line="160"/>
<source>dpkg progress had been abortedyou can retry installation</source> <source>dpkg progress had been abortedyou can retry installation</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/widgets/common/downloaditem.cpp" line="178"/> <location filename="../src/widgets/common/downloaditem.cpp" line="181"/>
<source>Download canceled</source> <source>Download canceled</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -486,12 +496,12 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="180"/> <location filename="../src/mainwindow-dtk.cpp" line="158"/>
<source>Spark Store</source> <source>Spark Store</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow-dtk.cpp" line="181"/> <location filename="../src/mainwindow-dtk.cpp" line="159"/>
<source>Search or enter spk://</source> <source>Search or enter spk://</source>
<translation></translation> <translation></translation>
</message> </message>