Yu-Core / SwashbucklerDiary

侠客日记是一个开源、跨平台的本地日记app,使用MAUI Blazor 构建。"SwashbucklerDiary" is an open source cross-platform local diary app using MAUI Blazor .
GNU Affero General Public License v3.0
797 stars 80 forks source link

请问成就这些数据是怎么在浏览器的indexdb里初始化的呢? #22

Closed Hdurian-CH closed 2 months ago

Hdurian-CH commented 8 months ago

学习一下

Yu-Core commented 8 months ago

是指日记这些数据吗,存在sqlite里的,sqlite文件存在indexedDB里。 初始化时候,把indexedDB的内容同步到内存中的文件系统 https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/wwwroot/js/fileSystem.js

Hdurian-CH commented 8 months ago

是指日记这些数据吗,存在sqlite里的,sqlite文件存在indexedDB里。 初始化时候,把indexedDB的内容同步到内存中的文件系统 https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/wwwroot/js/fileSystem.js

噢,那么默认的数据是在那个服务里导进SQLite的,我只看到了sqlsuger建表的那个静态方法。(默认数据指的是:比如日记自带的那些成就)

Yu-Core commented 8 months ago

应该是这个吧 https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/Extensions/ServiceCollectionExtensions/AddGlobal.cs

https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/Services/Data/AchievementService/AchievementService.cs#L18

Hdurian-CH commented 8 months ago

应该是这个吧 https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/Extensions/ServiceCollectionExtensions/AddGlobal.cs

https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/Services/Data/AchievementService/AchievementService.cs#L18 噢,我明白了,blazor调js我不太熟,感谢!

Hdurian-CH commented 8 months ago

应该是这个吧 https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/Extensions/ServiceCollectionExtensions/AddGlobal.cs

https://github.com/Yu-Core/SwashbucklerDiary/blob/master/src/SwashbucklerDiary.WebAssembly/Services/Data/AchievementService/AchievementService.cs#L18

请教一下masa Blazor 能否做到像vue那样加一个全局的骨架屏,在页面未渲染完之前显示骨架屏呢?

Yu-Core commented 8 months ago

抱歉,这个不太清楚。你可以到masa blazor的qq群或者微信群问问。