Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): finish about page #27

Merged
merged 28 commits into from
Sep 5, 2024
Merged

feat(ui): finish about page #27

merged 28 commits into from
Sep 5, 2024

Conversation

RooobinYe
Copy link
Collaborator

@RooobinYe RooobinYe commented Aug 15, 2024

「TODO LIST」

  • 添加「检查更新」按钮
  • 给「贡献者」框添加逻辑
  • 版本信息放在单独的圆角矩形框内
  • 不要用冒号做分隔,改成左右分散对齐
  • 网页版改成独立一栏
  • 网页版改名网页端
  • 两个链接用 SLink 组件标注
  • 点击两个链接可以跳转到网页的逻辑
  • license 栏直接改成 "开源协议 MIT license Copyright (c) 2024 NJUPT-SAST"
  • ” 开发使用框架 / 组件库 “改名 “项目依赖”
  • “开发者名单” 改名 “贡献者”,
  • 「贡献者」栏显示头像,注意排版
  • 新增 功能建议/漏洞报告 点击按钮跳转仓库的github issue网页
  • 网络请求逻辑应该是在 slint 中设置本页面的全局 status 状态枚举值,包括 loading, success, error 三个状态,相关组件根据这三个状态更改自己的显示逻辑,在 C++ 的回调中根据当前情况设置全局状态量,如请求发起前进入 loading 状态,请求成功后更新数据,然后更改为 success 状态,error 状态需要刷新按钮重新请求数据
  • 建议单独为需要网络请求的信息加入懒加载逻辑
  • 进入页面后在组件中适当位置显示加载 icon 动画
  • 检查更新的功能:点击「检查更新」,如果有更新,就跳出一个框
    有新版本:version abcd
    更新内容:

button:前往下载/取消
如果没有更新,就显示「已是最新版本」

  • format 问题:已经注意到了,下次更新解决
  • 修 bug:没有滑动框

@RooobinYe RooobinYe added the feature New feature or request label Aug 15, 2024
@RooobinYe
Copy link
Collaborator Author

RooobinYe commented Aug 15, 2024

Linked with #8

@RooobinYe RooobinYe changed the title feat(ui): Finish about page feat(ui): finish about page Aug 15, 2024
@cEvolve05 cEvolve05 linked an issue Aug 15, 2024 that may be closed by this pull request
@cEvolve05
Copy link
Member

应当合并到dev而不是main

@cEvolve05 cEvolve05 self-requested a review August 15, 2024 05:17
@RooobinYe RooobinYe changed the base branch from main to dev August 15, 2024 05:18
@ArcticLampyrid
Copy link
Collaborator

也许应当加上我们自己的应用图标、应用介绍、贡献者列表等内容

@RooobinYe
Copy link
Collaborator Author

也许应当加上我们自己的应用图标、应用介绍、贡献者列表等内容

嗯嗯 对的 还没写完

主要是 about page 没有设计稿 我要参考一下其他的 about page 是什么样的

ui/views/page/about.slint Outdated Show resolved Hide resolved
ui/views/page/about.slint Outdated Show resolved Hide resolved
@Serein207 Serein207 linked an issue Aug 16, 2024 that may be closed by this pull request
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@RooobinYe
Copy link
Collaborator Author

RooobinYe commented Aug 19, 2024

已经完成前端的主要工作

image

目前的想法是:点击「检查更新」按钮 会通过 checkUpdate() 进行一个 callback,之后根据版本情况,显示「已是最新」或者「需要更新」的 text
如果需要更新 则自动跳转到 GitHub 的 releases 页面
但是 .cc 和 .h 文件不太会写,我明天再研究一下

@RooobinYe
Copy link
Collaborator Author

抱歉 由于一些待完成的工作 导致编译没过 已经重新 git pull 了

Copy link

clang-tidy review says "All clean, LGTM! 👍"

@NJUPT-SAST NJUPT-SAST deleted a comment from RooobinYe Aug 20, 2024
@Serein207
Copy link
Member

Serein207 commented Aug 20, 2024

  • 版本信息放在单独的圆角矩形框内,需要显示更新日志
  • 不要用冒号做分隔,改成左右分散对齐
  • 网页版改成独立一栏
  • 链接用 SLink 组件标注
  • license 栏直接改成 "开源协议 MIT license Copyright (c) 2024 NJUPT-SAST"
  • ”开发使用框架/组件库“改名“项目依赖”
  • “开发者名单” 改名 “贡献者”,并且本栏只显示头像,注意排版
  • 网络请求逻辑应该是在 slint 中设置本页面的全局 status 状态枚举值,包括 loading, success, error 三个状态,相关组件根据这三个状态更改自己的显示逻辑,在C++的回调中根据当前情况设置全局状态量,如请求发起前进入loading状态,请求成功后更新数据,然后更改为success状态,error状态需要刷新按钮重新请求数据
  • 建议单独为需要网络请求的信息加入懒加载逻辑,进入页面后在组件中适当位置显示加载 icon 动画

Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

clang-tidy review says "All clean, LGTM! 👍"

@RooobinYe
Copy link
Collaborator Author

RooobinYe commented Aug 20, 2024

添加另一个「项目依赖」栏的新功能
当 width 低于某个值时:
image
当 width 高于某个值时:
image

目前存在的 bug:
我无法点击「使用 Link 登录」(点击按钮没有反应)macOS 系统
image

此外,CMakeLists.txt 文件我必须删去第十一行中的「x86_64」我才能顺利编译(apple Silicon chip)

@RooobinYe
Copy link
Collaborator Author

此外,麻烦师傅们有空的时候能不能看一下 AboutPage.cc 我注释掉的部分呀 这部分的功能是打开网站 但是不知道为什么编译不过(可能是我技术不到位 写的代码有问题)
感觉有点到瓶颈期了 师傅们能不能指点一下 .cc 文件的编写呀 不胜感谢~

@Serein207
Copy link
Member

Serein207 commented Aug 20, 2024

  • 文件格式化一下
  • 把仓库链接最后面的 / 去掉

目前存在的 bug: 我无法点击「使用 Link 登录」(点击按钮没有反应)macOS 系统

sast-link-cxx-sdk 的bug,已修复,等待明天合入 dev 分支

此外,CMakeLists.txt 文件我必须删去第十一行中的「x86_64」我才能顺利编译(apple Silicon chip)

@ArcticLampyrid 能处理一下吗

此外,麻烦师傅们有空的时候能不能看一下 AboutPage.cc 我注释掉的部分呀 这部分的功能是打开网站 但是不知道为什么编译不过(可能是我技术不到位 写的代码有问题)

lambda表达式写的不对,看文档

dev 分支最新提交新增了跨平台的 openBrowser 函数,在 src/Infrastructure/Utils/Tools.h

@RooobinYe
Copy link
Collaborator Author

15271724340840_ pic
15281724340857_ pic

已知的 bug:
弹窗没有滑动条 明天修

DTPA101 and others added 4 commits August 23, 2024 00:37
* feat:some basic laying

* feat(ui): basic laying on the page

* ui laying primary draft

* feat(ui): callbacks and root

* attempt to fill in .cc and .slint

* callbacks fiied

* feat: setting page

* feat: change theme when app start

* chore: clean up code

* feat(ui): add scroll view in setting page

---------

Co-authored-by: Serein <[email protected]>
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@RooobinYe
Copy link
Collaborator Author

RooobinYe commented Aug 23, 2024

增加了动画,修缮了一点小细节
.cc 文件的网络请求好难写啊 QAQ
😭

Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 4, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 4, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 4, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 4, 2024

clang-tidy review says "All clean, LGTM! 👍"

@Serein207 Serein207 marked this pull request as ready for review September 5, 2024 13:55
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

executor()
->asyncExecute(networkClient()->getFile(contributors[i].avatar_url),
[&self = *this, i](Result<std::filesystem::path> result) {
if (result.isErr()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: if with identical then and else branches [bugprone-branch-clone]

                                       if (result.isErr()) {
                                       ^
Additional context

src/Controller/View/AboutPage.cc:53: else branch starts here

                                       } else {
                                         ^

@Serein207 Serein207 merged commit b9e737a into dev Sep 5, 2024
5 checks passed
@Serein207 Serein207 deleted the feat/ui/about-page branch September 5, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(ui): implement about page feat(ui): about page
5 participants