-
Notifications
You must be signed in to change notification settings - Fork 49
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(web): favorites support local fiction #89
feat(web): favorites support local fiction #89
Conversation
这两天有点事,明天晚上我看看 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用Promise.all有潜在的隐患,而且Indexeddb似乎不支持并发写操作,因此速度可能区别不大。等下我改成普通循环,以后有需要再优化吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
收藏夹本身是有限的,没必要塞进indexeddb里面,等下我会移动到localstorage里面。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
稍微牵扯的有点太多了,想一步到位缓存web/wenku收藏夹的话,得在数据层区分下dataSource和repository,明天接着做。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里我打算直接在indexeddb版本号升级里面批量编辑,就不用留下负债了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const createMetadata = (value: LocalVolumeMetadata) => |
那对应创建metadata
的时候也要加一个默认的favoriteId
eb49966
to
2345907
Compare
搞定了,顺便把本地缓存收藏夹也一起做了,有空测试下吗? |
啊,想起来了。 |
我建议是直接多对多的关系,加一张中间表 |
你意思的tag表和tag-小说关系表?不会方便的。现在搜索两个方案,一是把tag数组塞进es里面,二是使用mongodb自带的全文搜索,不管哪个都比中间表方便,但都需要标签字面量。 |
浏览器 indexdb volumes
新增 favorite 表 表字段 id: string, title: string
修改 metadata 表 新增 favoriteId: string
页面优化
我的收藏:本地小说 /favorite/local/default
支持管理标签,批量对文章分类
Sakura工作区 /workspace/sakura本地小说 支持管理标签,批量对文章分类#87
此issuse提到工作区需要全面升级,此pr暂时不调整工作区页面
#88 (comment)