fix: crxjs plugin issues

This commit is contained in:
SethBurkart123
2025-03-26 17:00:58 +11:00
parent 68159ddd0e
commit f2b594a13b
9 changed files with 119 additions and 55 deletions
@@ -75,6 +75,7 @@
await InstallTheme(result);
await fetchThemes();
} catch (error) {
console.error('Error parsing file:', error);
alert('Error parsing file. Please upload a valid JSON theme file.');
}
tempTheme = null;
@@ -95,6 +96,11 @@
onDestroy(() => {
themeUpdates.removeListener(fetchThemes);
})
$effect(() => {
if (!themes) return;
console.log(themes.selectedTheme);
})
</script>
<div
@@ -125,7 +131,7 @@
{#if themes}
{#each themes.themes as theme (theme.id)}
<button
class="relative group w-full aspect-theme flex justify-center items-center rounded-xl transition ring-3 dark:ring-white ring-zinc-300 {theme.id === themes.selectedTheme ? 'dark:ring-2 ring-4' : 'ring-0'}"
class="relative group w-full aspect-theme flex justify-center items-center rounded-xl transition outline-2 outline-zinc-300 dark:outline-white {theme.id === themes.selectedTheme ? 'outline-4' : 'outline-0'}"
onclick={() => handleThemeClick(theme)}
>
{#if isEditMode}
+2 -6
View File
@@ -1,6 +1,7 @@
import styles from "./index.css?inline"
//import styles from "./index.css?inline"
import { mount } from "svelte"
import type { ComponentType } from "svelte"
import './index.css'
export default function renderSvelte(
Component: ComponentType | any,
@@ -15,10 +16,5 @@ export default function renderSvelte(
},
})
const style = document.createElement("style")
style.setAttribute("type", "text/css")
style.innerHTML = styles
mountPoint.appendChild(style)
return app
}