feat(background): implement IndexedDB for custom background storage and enhance background management features

This commit is contained in:
alexsparkes
2026-01-24 18:55:27 +00:00
parent d84b09801c
commit 76c9aa4df9
9 changed files with 552 additions and 106 deletions

View File

@@ -38,7 +38,7 @@ export function useBackgroundEvents(backgroundData, refreshBackground) {
const needsRefresh =
(type !== backgroundData.type && !(backgroundData.photoInfo?.offline && type === backgroundData.type)) ||
(backgroundData.type === 'api' && localStorage.getItem('backgroundAPI') !== backgroundData.currentAPI) ||
(backgroundData.type === 'custom' && localStorage.getItem('customBackground') !== backgroundData.url) ||
(type === 'custom' && backgroundData.type !== 'custom') ||
(backgroundData.photoInfo?.pun && JSON.parse(localStorage.getItem('backgroundExclude') || '[]').includes(backgroundData.photoInfo.pun));
if (needsRefresh) refreshBackground();