feat: add debug functions for backing up and restoring data #146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
为了调试的时候方便备份和恢复数据,所以在设置界面的Debug区域添加了备份和导入数据的功能。
另外不连接player-be的时候也可以用这个方法来备份和迁移数据。
目前看核心配置信息和歌单完整信息都在localStorage里,所以就只备份了这块;
部分登录信息在Cookies中,处于实用性和安全方面考虑暂未包含这部分的备份。
导入数据的功能不会删除现有数据,仅会覆盖备份文件中提供的字段。