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

Refactor gui #113

Merged
merged 14 commits into from
Oct 30, 2024
Merged

Refactor gui #113

merged 14 commits into from
Oct 30, 2024

Conversation

ly5519
Copy link
Collaborator

@ly5519 ly5519 commented Sep 9, 2024

when I want to test the first module, gui, is diffcult, so I want to refactor it first, do you like it? first submit a check for you, give me some advise if you dont like this behavior

#103

@ly5519 ly5519 mentioned this pull request Sep 9, 2024
@sanmusen214
Copy link
Owner

sanmusen214 commented Sep 10, 2024

目前这个GUI的文件结构更改看起来不错。感觉GUI架构的主要缺点是没有对象化各个配置项,纯列表操作导致扩展性和理解性较差,后面可以看看修改下对象化各个配置项以支持解析与导出(可以先改一个配置项然后review一下效果

Copy link
Owner

Choose a reason for hiding this comment

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

storage_secret参数应该不能删,你删了能跑起来吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

在网上搜索了一段这个字段的功能,发现他是需要调用nicegui的持久化存储使用的,并没有发现在项目中使用nicegui的存储功能,本项目也不存储比较安全系数较高的账号密码、密钥等信息,所以觉得并不需要此参数来加密浏览器会话 cookie, 并且本项目的加密字段是写死在json文件里的,安全性并不高

故删除,测试了一下不影响现有的项目运作

Copy link
Owner

Choose a reason for hiding this comment

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

使用命令行启动GUI时如果指定了token字段是会使用到storage_secret的,启动时没有给定会报错。python jsoneditor.py --token happytree

@ly5519
Copy link
Collaborator Author

ly5519 commented Sep 19, 2024

中场休息,森哥检视一下, 模块化正在弄,先拆每个json文件的,最后拆每个json文件里面每一个小项的,必须要先提交一波了,要不然搞不清楚自己到底在写啥,需要commit摆正自己正在干的事

@sanmusen214
Copy link
Owner

必须要先提交一波了,要不然搞不清楚自己到底在写啥,需要commit摆正自己正在干的事

目前为止well done,不过你好像没有保留启动时给定参数的功能, 定位到 #96 和commit 04bfec2

@ly5519
Copy link
Collaborator Author

ly5519 commented Sep 24, 2024

必须要先提交一波了,要不然搞不清楚自己到底在写啥,需要commit摆正自己正在干的事

目前为止well done,不过你好像没有保留启动时给定参数的功能, 定位到 #96 和commit 04bfec2

因为本次重构还是为了unittest服务,所以搞不懂的代码 & 删了好像还能跑的代码一律删除,有点破坏性修改了,看了PR和issue大概知道是干啥的了,之后重构这部分重新添加上去

@ly5519 ly5519 marked this pull request as ready for review October 7, 2024 16:03
@ly5519
Copy link
Collaborator Author

ly5519 commented Oct 7, 2024

因为有部分功能排在了此PR之后不能,再拖了😌菜的安详,麻烦森哥看一眼吧帮忙排一下版之类的,nicegui太难写了

@sanmusen214
Copy link
Owner

最近有点忙,等几天哈

@sanmusen214 sanmusen214 merged commit d6ba009 into dev Oct 30, 2024
@sanmusen214
Copy link
Owner

已合并,我测几天

@ly5519 ly5519 deleted the refactor_gui branch November 8, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants