mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
fix: background migration not working properly
This commit is contained in:
@@ -40,6 +40,10 @@
|
|||||||
{
|
{
|
||||||
"resources": ["resources/icons/*"],
|
"resources": ["resources/icons/*"],
|
||||||
"matches": ["*://*/*"]
|
"matches": ["*://*/*"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resources": ["seqta/utils/migration/migrate.html"],
|
||||||
|
"matches": ["*://*/*"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,23 @@ const getSelectedBackground = (): string | null => {
|
|||||||
const startMigration = async () => {
|
const startMigration = async () => {
|
||||||
try {
|
try {
|
||||||
console.info('Starting background extraction...');
|
console.info('Starting background extraction...');
|
||||||
const backgrounds = await getAllBackgrounds();
|
let backgrounds: Data[];
|
||||||
|
try {
|
||||||
|
backgrounds = await getAllBackgrounds();
|
||||||
|
if (!backgrounds || backgrounds.length === 0) {
|
||||||
|
console.info('No backgrounds to migrate');
|
||||||
|
window.parent.postMessage({ type: 'MIGRATION_COMPLETE' }, '*');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (error: any) {
|
||||||
|
if (error.name === 'NotFoundError' && error.message.includes('object stores was not found')) {
|
||||||
|
console.info('No backgrounds to migrate: object store not found');
|
||||||
|
window.parent.postMessage({ type: 'MIGRATION_COMPLETE' }, '*');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.error('Error fetching backgrounds:', error);
|
||||||
|
throw new Error('Failed to fetch backgrounds');
|
||||||
|
}
|
||||||
const selectedBackground = getSelectedBackground();
|
const selectedBackground = getSelectedBackground();
|
||||||
console.info(`Found ${backgrounds.length} backgrounds`);
|
console.info(`Found ${backgrounds.length} backgrounds`);
|
||||||
|
|
||||||
|
|||||||
+1
-8
@@ -1,17 +1,10 @@
|
|||||||
const {
|
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
|
||||||
default: flattenColorPalette,
|
|
||||||
} = require("tailwindcss/lib/util/flattenColorPalette");
|
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: [
|
content: [
|
||||||
"./src/**/*.{js,ts,jsx,tsx,html,svelte}",
|
"./src/**/*.{js,ts,jsx,tsx,html,svelte}",
|
||||||
],
|
],
|
||||||
//safelist: [
|
|
||||||
//{
|
|
||||||
// pattern: / */,
|
|
||||||
//}
|
|
||||||
//],
|
|
||||||
darkMode: "class",
|
darkMode: "class",
|
||||||
theme: {
|
theme: {
|
||||||
fontSize: {
|
fontSize: {
|
||||||
|
|||||||
Reference in New Issue
Block a user